> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shuriken.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to Claude Code

> Step-by-step guide to connect your Shuriken Agent Key to Claude Code.

This guide gets Claude Code connected to Shuriken in about a minute. Once set up, you can ask Claude to scan your alpha, research tokens, check your portfolio, and trade - all from the terminal.

**Time required:** About 1 minute.

## Prerequisites

* [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) installed
* A Shuriken Agent Key ([create one here](/agent-kit/create-agent-key) if you haven't already)

## Step-by-step setup

<Steps>
  <Step title="Copy your Agent Key">
    If you just created your key, copy it from the setup screen. It starts with `sk_`.

    If you already closed that screen, you'll need to [create a new key](/agent-kit/create-agent-key) - keys are only shown once.
  </Step>

  <Step title="Add the Shuriken server">
    Claude Code supports native HTTP transport, so no bridge or extra dependencies are needed. This works the same on macOS, Windows, and Linux.

    **Option A: CLI command (recommended)**

    Run this in your terminal, replacing `YOUR_AGENT_KEY` with the key you copied in step 1:

    ```bash theme={null}
    claude mcp add --transport http Shuriken https://api.shuriken.trade/mcp \
      --header "Authorization: AgentKey YOUR_AGENT_KEY"
    ```

    **Option B: Edit `.mcp.json` manually**

    Add the following to your `.mcp.json` file (in your project root or `~/.claude/.mcp.json` for global access). Replace `YOUR_AGENT_KEY` with your key.

    **If the file is empty or doesn't exist**, paste this entire block:

    ```json .mcp.json theme={null}
    {
      "mcpServers": {
        "Shuriken": {
          "type": "http",
          "url": "https://api.shuriken.trade/mcp",
          "headers": {
            "Authorization": "AgentKey YOUR_AGENT_KEY"
          }
        }
      }
    }
    ```

    **If you already have other MCP servers**, add the `"Shuriken"` block inside the existing `"mcpServers"` object:

    ```json .mcp.json theme={null}
    {
      "mcpServers": {
        "your-existing-server": {
          "...": "..."
        },
        "Shuriken": {
          "type": "http",
          "url": "https://api.shuriken.trade/mcp",
          "headers": {
            "Authorization": "AgentKey YOUR_AGENT_KEY"
          }
        }
      }
    }
    ```

    <Warning>
      Make sure there's a comma between each server entry. Missing commas are the most common cause of connection failures.
    </Warning>
  </Step>

  <Step title="Verify the connection">
    Start a new Claude Code session and try one of these prompts:

    ```
    What tokens were called in my Discord today?
    ```

    ```
    What's my SOL balance?
    ```

    Claude will ask for your approval before using each tool for the first time. Type **y** to let it proceed.

    <Check>
      If you see results, you're all set. Claude Code is now connected to Shuriken.
    </Check>
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Shuriken tools not appearing">
    * If you used the CLI command, start a new Claude Code session for the changes to take effect
    * If you edited `.mcp.json` manually, check for JSON syntax errors (missing commas, mismatched brackets)
    * Make sure the file is in the right location (project root for project-level, `~/.claude/.mcp.json` for global)
    * Run `claude mcp list` to see if Shuriken is registered
  </Accordion>

  <Accordion title="Tools show up but return errors">
    * Double-check that your Agent Key is correct (starts with `sk_`)
    * Make sure you included the `AgentKey ` prefix before the key (with a space)
    * Check that the key hasn't been revoked on the [Agent Keys dashboard](https://app.shuriken.trade/agents)
  </Accordion>
</AccordionGroup>
