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

# Quickstart

> Get ContextOne working with your AI agents in minutes

<Steps>
  <Step title="Get your API key">
    1. Go to [app.contextone.ai](https://app.contextone.ai)
    2. Sign up or log in to your account
    3. Copy your API key - you'll need this for the next steps
  </Step>

  <Step title="Install Node.js and npm">
    Requires Node.js. Download from [nodejs.org](https://nodejs.org/) if needed.
  </Step>

  <Step title="Connect ContextOne to your AI agent">
    Choose your AI agent below and add the MCP server configuration:
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Cursor">
    1. Open Cursor settings
    2. Go to MCP (Model Context Protocol)
    3. Add the following configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    4. Replace `your-api-key-here` with your API key from Step 1
    5. Restart Cursor to apply changes
  </Accordion>

  <Accordion title="Claude Code">
    1. Open your Claude Code configuration file
    2. Add the ContextOne MCP server:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    3. Replace `your-api-key-here` with your API key from Step 1
    4. Restart Claude Code
  </Accordion>

  <Accordion title="OpenCode">
    1. Open your OpenCode settings
    2. Navigate to MCP server configuration
    3. Add this server configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    4. Replace `your-api-key-here` with your API key from Step 1
    5. Restart OpenCode
  </Accordion>

  <Accordion title="Windsurf">
    Add this to your Windsurf MCP configuration. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) for more info.

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="VS Code">
    Add this to your VS Code MCP configuration. See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info.

    ```json theme={null}
    {
      "mcp.servers": {
        "contextone": {
          "type": "stdio",
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Cline">
    You can easily install ContextOne through the [Cline MCP Server Marketplace](https://cline.bot/mcp-marketplace) or manually edit MCP servers configuration.

    1. Open **Cline**.
    2. Click the hamburger menu icon (☰) to enter the **MCP Servers** section.
    3. Add a new MCP server by clicking the `+ Add` button.
    4. Add the name and server configuration from below:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Zed">
    Add this to your Zed `settings.json`. See [Zed Context Server docs](https://zed.dev/docs/assistant/context-servers) for more info.

    ```json theme={null}
    {
      "context_servers": {
        "ContextOne": {
          "source": "custom",
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Roo Code">
    Add this to your Roo Code MCP configuration. See [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) for more info.

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Gemini CLI">
    See [Gemini CLI Configuration](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for details.

    Add the following to your Gemini CLI `settings.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Claude Desktop">
    Open Claude Desktop and edit your `claude_desktop_config.json` file. See [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info.

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="OpenAI Codex">
    See [OpenAI Codex](https://github.com/openai/codex) for more information.

    Add the following configuration to your OpenAI Codex MCP server settings:

    ```toml theme={null}
    [mcp_servers.contextone]
    args = ["@contextone/mcp@latest", "--yes"]
    command = "npx"
    env = { API_KEY = "your-api-key-here" }
    ```

    ⚠️ Windows Notes

    On Windows, some users may encounter request timed out errors with the default configuration.
    In that case, explicitly configure the MCP server with the full path to Node.js and the installed package:

    ```toml theme={null}
    [mcp_servers.contextone]
    command = "C:\\Program Files\\nodejs\\node.exe"
    args = [
      "C:\\Users\\yourname\\AppData\\Roaming\\npm\\node_modules\\@contextone\\mcp-server\\dist\\index.js",
      "--transport",
      "stdio",
      "--api-key",
      "your-api-key-here"
    ]
    ```

    Alternatively, you can use the following configuration:

    ```toml theme={null}
    [mcp_servers.contextone]
    command = "cmd"
    args = [
        "/c",
        "npx",
        "-y",
        "@contextone/mcp-server",
        "--api-key",
        "your-api-key-here"
    ]
    env = { SystemRoot="C:\\Windows" }
    startup_timeout_ms = 20_000
    ```

    This ensures Codex CLI works reliably on Windows.

    ⚠️ MacOS Notes

    On MacOS, some users may encounter the same request timed out errors like Windows,
    it also can be solved tith the full path to Node.js and the installed package:

    ```toml theme={null}
    [mcp_servers.contextone]
    command = "/Users/yourname/.nvm/versions/node/v22.14.0/bin/node"
    args = ["/Users/yourname/.nvm/versions/node/v22.14.0/lib/node_modules/@contextone/mcp-server/dist/index.js",
      "--transport",
      "stdio",
      "--api-key",
      "your-api-key-here"
    ]
    ```

    This ensures Codex CLI works reliably on MacOS.
  </Accordion>

  <Accordion title="JetBrains AI Assistant">
    See [JetBrains AI Assistant Documentation](https://www.jetbrains.com/help/ai-assistant/configure-an-mcp-server.html) for more details.

    1. In JetBrains IDEs, go to `Settings` -> `Tools` -> `AI Assistant` -> `Model Context Protocol (MCP)`
    2. Click `+ Add`.
    3. Click on `Command` in the top-left corner of the dialog and select the As JSON option from the list
    4. Add this configuration and click `OK`

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    5. Click `Apply` to save changes.
    6. The same way contextone could be added for JetBrains Junie in `Settings` -> `Tools` -> `Junie` -> `MCP Settings`
  </Accordion>

  <Accordion title="Kiro">
    See [Kiro Model Context Protocol Documentation](https://kiro.dev/docs/mcp/configuration/) for details.

    1. Navigate `Kiro` > `MCP Servers`
    2. Add a new MCP server by clicking the `+ Add` button.
    3. Paste the configuration given below:

    ```json theme={null}
    {
      "mcpServers": {
        "ContextOne": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          },
          "env": {},
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    ```

    4. Click `Save` to apply the changes.
  </Accordion>

  <Accordion title="Trae">
    Use the Add manually feature and fill in the JSON configuration information for that MCP server.
    For more details, visit the [Trae documentation](https://docs.trae.ai/ide/model-context-protocol?_lang=en).

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Other MCP-compatible agents">
    For any MCP-compatible AI agent, add this server configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    Replace `your-api-key-here` with your API key from Step 1.
  </Accordion>

  <Accordion title="Docker">
    If you prefer to run the MCP server in a Docker container:

    1. **Build the Docker Image:**

       First, create a `Dockerfile` in the project root (or anywhere you prefer):

       ```Dockerfile theme={null}
       FROM node:18-alpine

       WORKDIR /app

       # Install the latest version globally
       RUN npm install -g @contextone/mcp@latest

       # Expose default port if needed (optional, depends on MCP client interaction)
       # EXPOSE 3000

       # Default command to run the server
       CMD ["contextone-mcp"]
       ```

       Then, build the image using a tag (e.g., `contextone-mcp`).

       ```bash theme={null}
       docker build -t contextone-mcp .
       ```

    2. **Configure Your MCP Client:**

       Update your MCP client's configuration to use the Docker command.

       *Example for Cursor:*

       ```json theme={null}
       {
         "mcpServers": {
           "contextone": {
             "command": "docker",
             "args": ["run", "-i", "--rm", "contextone-mcp"],
             "env": {
               "API_KEY": "your-api-key-here"
             }
           }
         }
       }
       ```
  </Accordion>

  <Accordion title="Windows">
    The configuration on Windows is slightly different compared to Linux or macOS.

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "cmd",
          "args": ["/c", "npx", "@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Amazon Q Developer CLI">
    Add this to your Amazon Q Developer CLI configuration. See [Amazon Q Developer CLI docs](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html) for more details.

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Warp">
    See [Warp Model Context Protocol Documentation](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server) for details.

    1. Navigate `Settings` > `AI` > `Manage MCP servers`.
    2. Add a new MCP server by clicking the `+ Add` button.
    3. Paste the configuration given below:

    ```json theme={null}
    {
      "ContextOne": {
        "command": "npx",
        "args": ["@contextone/mcp@latest", "--yes"],
        "env": {
          "API_KEY": "your-api-key-here"
        }
      }
    }
    ```

    4. Click `Save` to apply the changes.
  </Accordion>

  <Accordion title="Copilot Coding Agent">
    Add the following configuration to the `mcp` section of your Copilot Coding Agent configuration file Repository->Settings->Copilot->Coding agent->MCP configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="LM Studio">
    See [LM Studio MCP Support](https://lmstudio.ai/blog/lmstudio-v0.3.17) for more information.

    1. Navigate to `Program` (right side) > `Install` > `Edit mcp.json`.
    2. Paste the configuration given below:

    ```json theme={null}
    {
      "mcpServers": {
        "ContextOne": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    3. Click `Save` to apply the changes.
    4. Toggle the MCP server on/off from the right hand side, under `Program`, or by clicking the plug icon at the bottom of the chat box.
  </Accordion>

  <Accordion title="Visual Studio 2022">
    You can configure ContextOne MCP in Visual Studio 2022 by following the [Visual Studio MCP Servers documentation](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).

    Add this to your Visual Studio MCP config file (see the [Visual Studio docs](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022) for details):

    ```json theme={null}
    {
      "inputs": [],
      "servers": {
        "contextone": {
          "type": "stdio",
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Crush">
    Add this to your Crush configuration file. See [Crush MCP docs](https://github.com/charmbracelet/crush#mcps) for more info.

    ```json theme={null}
    {
      "$schema": "https://charm.land/crush.json",
      "mcp": {
        "contextone": {
          "type": "stdio",
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="BoltAI">
    Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Rovo Dev CLI">
    Edit your Rovo Dev CLI MCP config by running the command below -

    ```bash theme={null}
    acli rovodev mcp
    ```

    Example config -

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Zencoder">
    To configure ContextOne MCP in Zencoder, follow these steps:

    1. Go to the Zencoder menu (...)
    2. From the dropdown menu, select Agent tools
    3. Click on the Add custom MCP
    4. Add the name and server configuration from below, and make sure to hit the Install button

    ```json theme={null}
    {
      "command": "npx",
      "args": ["@contextone/mcp@latest", "--yes"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
    ```
  </Accordion>

  <Accordion title="Qodo Gen">
    See [Qodo Gen docs](https://docs.qodo.ai/qodo-documentation/qodo-gen/qodo-gen-chat/agentic-mode/agentic-tools-mcps) for more details.

    1. Open Qodo Gen chat panel in VSCode or IntelliJ.
    2. Click Connect more tools.
    3. Click + Add new MCP.
    4. Add the following configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "contextone": {
          "command": "npx",
          "args": ["@contextone/mcp@latest", "--yes"],
          "env": {
            "API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Perplexity Desktop">
    See [Local and Remote MCPs for Perplexity](https://www.perplexity.ai/help-center/en/articles/11502712-local-and-remote-mcps-for-perplexity) for more information.

    1. Navigate `Perplexity` > `Settings`
    2. Select `Connectors`.
    3. Click `Add Connector`.
    4. Select `Advanced`.
    5. Enter Server Name: `ContextOne`
    6. Paste the following JSON in the text area:

    ```json theme={null}
    {
      "args": ["@contextone/mcp@latest", "--yes"],
      "command": "npx",
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
    ```

    7. Click `Save`.
  </Accordion>
</AccordionGroup>

## Test the connection

After setup, ask your AI agent: *"What can you tell me about React using ContextOne?"* or *"Search for Python documentation using ContextOne"*

If ContextOne is connected properly, your AI will access our knowledge base and provide enhanced responses with accurate documentation.

## Next steps

<Card title="Watch Video Walkthrough" icon="play" href="/video-walkthrough">
  Learn how to use ContextOne with a step-by-step video guide.
</Card>
