Indexed
Searching your IndexAI Agent Integration

MCP Setup

Connect Indexed to Claude, OpenAI Codex, Cursor, and GitHub Copilot via MCP — plus a standard config for other clients.

MCP setup for agents

By the end of this guide, you will have Indexed connected to your coding agent and verified with a search against your codebase or docs.

Coding agents benefit from Indexed because they gain project-specific context — Jira decisions, architecture docs, runbooks — that the model cannot infer from open files alone.

Prerequisites

  • Indexed installed and at least one collection created
  • An MCP-capable agent (below) and permission to edit its MCP config

Index your codebase or docs

Terminal
indexed index create files -c my-repo -p ~/work/my-project

To narrow what gets indexed, use repeatable --include / --exclude arguments with regex patterns (see Index commands):

Terminal
indexed index create files -c my-repo -p ~/work/my-project \
  --include ".*\\.py$" --include ".*\\.ts$" \
  --exclude ".*test.*" --exclude ".*node_modules.*"

Smoke-check the server

Before editing client config, confirm the indexed binary works on its own. If you installed with uv tool install indexed-sh or pip install indexed-sh, indexed should be on your PATH. (Full walkthrough: MCP Integration — step 1.)

List tools (fast)
indexed mcp inspect
Stdio (Ctrl+C after the banner)
indexed mcp run
HTTP (Ctrl+C when done; see MCP commands for all transports)
indexed mcp run --transport http --host 127.0.0.1 --port 8000

Connect your agent (stdio MCP)

Indexed speaks MCP over stdio by default: the client launches indexed mcp run as a subprocess. The Standard mcpServers JSON (below) is the right shape for Claude Desktop, Claude Code file-based config, and Cursor. GitHub Copilot uses a servers block instead; see that subsection. For HTTP, run indexed mcp run with --transport http and --port, then point the client at the URL (schema depends on the client’s MCP version).

Claude Desktop

Edit claude_desktop_config.json and add the indexed entry under mcpServers:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Use the standard mcpServers JSON below. Fully quit and relaunch Claude Desktop after saving. Walkthrough: Claude Plugin Integration.

Claude Code

CLI (stdio) — Claude Code’s own CLI documents claude mcp add (run claude mcp add --help for flags such as transport and scope). To register Indexed as a local stdio server:

Terminal
claude mcp add indexed -- indexed mcp run

File-based — you can use the same mcpServers JSON in the project or user config file your Claude Code build expects; check current docs if the filename differs.

Cursor

Create .cursor/mcp.json in the project root, or ~/.cursor/mcp.json for a user-wide config. Use the standard mcpServers JSON below. Reload the window or restart Cursor if tools do not appear. See Model Context Protocol (Cursor).

OpenAI Codex

Register a stdio server whose command is indexed with arguments mcp and run — the same process as the standard mcpServers JSON, expressed in the format Codex expects (often ~/.codex/config.toml or a project file). OpenAI Codex — MCP has the up-to-date schema and paths.

GitHub Copilot (VS Code)

Create .vscode/mcp.json in the project root. Use MCP in VS Code describes the servers format:

.vscode/mcp.json
{
  "servers": {
    "indexed": {
      "type": "stdio",
      "command": "indexed",
      "args": ["mcp", "run"]
    }
  }
}

Copilot uses the top-level key "servers" (not "mcpServers") and requires "type": "stdio".

Standard mcpServers JSON

Claude Desktop, Cursor, file-based Claude Code, and most stdio clients use a top-level mcpServers object:

{
  "mcpServers": {
    "indexed": {
      "command": "indexed",
      "args": ["mcp", "run"]
    }
  }
}

Merge the indexed object into any existing mcpServers map. If indexed is not on the agent’s PATH, set "command" to the absolute path from which indexed (common on macOS with GUI apps).

Other editors and agents

Point their MCP UI at the same stdio command (indexed with args mcp, run). One-line pointers (confirm paths in each product’s docs):

  • WindsurfCascade MCP; config file is often ~/.codeium/windsurf/mcp_config.json with the same mcpServers shape as above.
  • ZedMCP in Zed; custom servers typically live under context_servers in settings with "source": "custom".
  • ContinueMCP (Continue); YAML or JSON definitions under project config as documented for your version.

Installed from source with uv?

Use uv as the command and run the CLI from your clone (adjust the path):

{
  "mcpServers": {
    "indexed": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/indexed", "indexed", "mcp", "run"]
    }
  }
}

If your workspace uses a different entrypoint, run uv run indexed mcp run manually once to confirm, then mirror that invocation in JSON.

Verify it works

In the agent, try:

  • "What tools do you have from Indexed?"
  • "Search my indexed documents for the authentication middleware"

You should see search or search_collection invoked with paths or titles from your index.

Keeping the index fresh

Terminal
indexed index update my-repo

Cron example (use the path from which indexed):

crontab
0 8 * * * /path/to/indexed index update my-repo 2>&1 >> ~/.indexed/update.log

Troubleshooting

Tools missing — Confirm which indexed, fix JSON (no trailing commas), restart the editor or agent.

Empty resultsindexed index inspect and indexed index search "…" from a terminal to separate index issues from MCP wiring.

Slow first answer — the embedding model loads on first use in a session; later calls are faster.

What's Next