CIDX logo
← Back to Resources
If you haven't set up the terminal application, go here first.

How to set up the Code Index MCP on CursorAI

Follow these steps to integrate the Code Index MCP with CursorAI and unlock powerful documentation, code search, and agent features directly in your IDE.

Last Updated: May 13, 2025

Important

Make sure you've already run npx cidx@latest login in your terminal before proceeding with these steps. See CLI setup instructions for more details.

  1. Open Cursor settings

    Go to Settings through the menu (File → Settings) or use keyboard shortcut Cmd/Ctrl+,

  2. Navigate to the MCP server section

    In the left navigation panel, look for and click on MCP Server under AI section.

  3. Click the + Add new global MCP server button

    This will open a JSON editor where you can configure MCP servers.

  4. Add the Code Index MCP configuration

    In the editor, you'll need to add the proper configuration for CIDX. Delete any placeholder content and copy-paste the following:

    {
      "mcpServers": {    
        "cidx-mcp": {
          "command": "npx",
          "args": [
            "cidx@latest"
          ]
        }
      }
    }
    Note: If you already have other MCP servers installed, you only need to add this portion inside your mcpServers object:
      "cidx-mcp": {
        "command": "npx",
        "args": [
          "cidx@latest"
        ]
      }
    Example with another server:
    {
      "mcpServers": {
        "cidx-mcp": {
          "command": "npx",
          "args": ["cidx@latest"]
        },
        "dummy-server": {
          "command": "dummy",
          "args": ["--mcp"]
        }
      }
    }
  5. Save and verify the configuration

    1. Click Save or press Cmd/Ctrl+S to save the configuration.
    2. If successful, you'll see a green status indicator next to cidx-mcp in the list.
    3. If you see a red indicator, make sure you've completed the login step correctly.

Try it out!

Now that CIDX MCP is installed, try some example commands in CursorAI (be sure to mention mcp in your prompt):

Create a 3D game that makes use of Threejs and Rapier, please consult with the code index mcp
Setup OAUTH authentication with GitHub and be sure to look up the mcp for the right documentation.
Please fix this bug attatched and look up the mcp documentation to speed up the fix

For more help, visit our Resources page or contact support.