MCP Integration
MCP Integration
By the end of this guide, you will have Indexed running as an MCP server and verified that a client can call its search tools.
This is the fastest path to MCP connectivity. For exact file paths and client-specific configuration keys, see the individual agent guides linked at the bottom.
Prerequisites
- Indexed installed and at least one collection created
- An MCP-compatible client (Claude Desktop, OpenAI Codex, Cursor, GitHub Copilot, etc.)
Verify the server (stdio, HTTP, tools)
Run these checks in a terminal before you wire any client. They use the indexed CLI only (see indexed mcp --help).
Tools and resources (fast) — no long-running process:
indexed mcp inspectYou should see a short report listing tools (e.g. search, search_collection) and resources. If this fails, fix your install or PATH before continuing.
Stdio (typical for local agents) — the server waits for a client on stdin/stdout; press Ctrl+C after you see the ready banner:
indexed mcp run`-h` is host, not help
On indexed mcp and indexed mcp run, -h is short for --host (bind address for HTTP-based transports). For usage text, run indexed mcp run --help, indexed mcp --help, or indexed --help — the top-level CLI uses --help for that.
A healthy startup looks like this:
Indexed MCP server started
Transport: stdio
Collections available: my-docs, eng-tickets
Waiting for client connection...If you see an error instead (e.g., "command not found"), check your PATH first — which indexed. For a full troubleshooting guide, see Debugging MCP.
Press Ctrl+C to stop the server once you've confirmed it starts.
HTTP (remote or container clients) — bind on loopback to test locally; use --host 0.0.0.0 only on trusted networks (see MCP commands):
indexed mcp run --transport http --host 127.0.0.1 --port 8000Point an HTTP-capable MCP client at http://127.0.0.1:8000 (exact path and protocol depend on the client; MCP Setup summarizes patterns). Press Ctrl+C when done.
Add the config to your client
Most MCP-compatible clients use a JSON configuration file. The universal pattern is:
{
"mcpServers": {
"indexed": {
"command": "indexed",
"args": ["mcp", "run"]
}
}
}This pattern works for Claude Desktop, Claude Code, Cursor, and most stdio MCP clients. GitHub Copilot uses a different top-level shape — see MCP Setup.
Restart the client and verify
After saving the config, fully restart your client (quit and relaunch — a reload or refresh is often not enough).
Then ask a question that requires searching your indexed content:
"Search my indexed documents for the deployment process"
A working response will include results from your collections with document names, scores, and excerpts. The client calls the search tool automatically — you don't need to invoke it explicitly.
Searching indexed documents for "deployment process"...
Found 3 results:
1. [my-docs] deploy-guide.md
To deploy to production, first ensure all CI checks pass,
then run the release pipeline from the main branch...
2. [my-docs] runbook.md
If a rollback is needed, revert the last deployment using
the rollback script in the ops/ directory...For exact file paths and per-client differences
See Claude Plugin and MCP Setup for paths, Copilot’s servers format, Codex notes, and troubleshooting.