> ## 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 Cursor

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

This guide gets Cursor connected to Shuriken in about 2 minutes. Once set up, you can ask your AI to scan alpha, research tokens, check your portfolio, and trade  - all from the chat panel.

**Time required:** About 2 minutes.

## Prerequisites

* [Cursor](https://cursor.com) installed on your computer with a **Pro plan or higher** (MCP requires Agent mode, which is not available on the free plan)
* 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="Open the MCP config file">
    You need to edit a file called `mcp.json`. This is where Cursor stores its MCP server connections.

    **Option A: Use the Command Palette (recommended)**

    1. Open Cursor
    2. Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (macOS)
    3. Type **MCP** and select **"Cursor Settings: Open MCP Settings"**
    4. This opens your `mcp.json` file

    **Option B: Open the file manually**

    The file lives in your home directory:

    <Tabs>
      <Tab title="Windows">
        ```
        C:\Users\YOUR_USERNAME\.cursor\mcp.json
        ```

        Replace `YOUR_USERNAME` with your Windows username.

        <Tip>
          Quick way to get there: press `Win+R`, type `%USERPROFILE%\.cursor` and hit Enter. Look for `mcp.json`. If it doesn't exist, create it.
        </Tip>
      </Tab>

      <Tab title="macOS">
        ```
        ~/.cursor/mcp.json
        ```

        Open Finder, press `Cmd+Shift+G`, and paste the path above.
      </Tab>

      <Tab title="Linux">
        ```
        ~/.cursor/mcp.json
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Add the Shuriken server">
    Paste the following into your `mcp.json` file. Replace `YOUR_AGENT_KEY` with the key you copied in step 1.

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

    ```json mcp.json theme={null}
    {
      "mcpServers": {
        "Shuriken": {
          "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": {
          "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="Save and restart Cursor">
    Save the file, then **completely quit and reopen Cursor**. The MCP connection won't activate until you restart.
  </Step>

  <Step title="Verify the connection">
    Open a new chat in Cursor (the Composer or Agent panel) and try one of these prompts:

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

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

    If Shuriken is connected, you'll see the agent use Shuriken tools to answer your question. The tool names will show up in the chat (like `get_recent_calls` or `get_balances`).

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

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cursor doesn't show Shuriken tools">
    * Make sure you saved the `mcp.json` file
    * Make sure you fully quit and restarted Cursor (not just closed the window)
    * Check that there are no syntax errors in your JSON (missing commas, extra commas, mismatched brackets)
    * Try opening the Command Palette (`Ctrl+Shift+P`) and searching for "MCP" - you should see Shuriken listed
  </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>

  <Accordion title="JSON syntax errors">
    Common mistakes:

    * Missing comma between server entries
    * Trailing comma after the last entry
    * Using single quotes instead of double quotes
    * Missing closing brackets

    Paste your `mcp.json` into [jsonlint.com](https://jsonlint.com) to check for syntax errors.
  </Accordion>

  <Accordion title="'Cannot find mcp.json'">
    The file might not exist yet. Create a new file called `mcp.json` in the `.cursor` folder inside your home directory and paste the full config block from step 3.
  </Accordion>
</AccordionGroup>

## Multiple Agent Keys

You can connect multiple Shuriken Agent Keys to Cursor at the same time - for example, one read-only key for research and one with trading enabled. Give each one a different name:

```json mcp.json theme={null}
{
  "mcpServers": {
    "shuriken-research": {
      "url": "https://api.shuriken.trade/mcp",
      "headers": {
        "Authorization": "AgentKey sk_YOUR_READ_ONLY_KEY"
      }
    },
    "shuriken-trading": {
      "url": "https://api.shuriken.trade/mcp",
      "headers": {
        "Authorization": "AgentKey sk_YOUR_TRADING_KEY"
      }
    }
  }
}
```

<Note>
  When using multiple keys, each one appears as a separate MCP server in Cursor. The AI will have access to all tools from all connected keys.
</Note>
