Indexed
Searching your Index

MCP Integration

Connect any MCP-compatible client to Indexed in three steps.

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:

Terminal
indexed mcp inspect

You 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:

Terminal
indexed mcp run

`-h` is host, not help

On indexed mcp run, -h is short for --host (bind address for HTTP-based transports); the indexed mcp group itself has no options. 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 prints FastMCP's own banner (suppress it with --no-banner) and then waits for a client. It does not list collections at startup.

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):

Terminal
indexed mcp run --transport http --host 127.0.0.1 --port 8000

Point 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 lists hits from your collections with the document name, relevance score, and an excerpt of the matched chunk. The client calls the search tool automatically — you don't need to invoke it explicitly.

For exact file paths and per-client differences

See MCP Setup for paths, Copilot’s servers format, Codex notes, and troubleshooting.

What the tools return

search and search_collection answer with the documented payload — schema: "indexed.search/1" — the same object indexed index search --json prints:

  • documents — matched documents, best first. Each states its collection, source_type, id, path/url and score_kind once.
  • hits — the matched chunks of that document: relevance (0–1 in normal use, higher is better, not clamped, comparable across collections), score (the raw engine value, only comparable within one score_kind), a locator (line_span, page, headings or document) and text.
  • counts, collections, collection_errors — what was searched, how much, and which collections failed. collections: [] means no collection answered: an empty store (a success payload, not an error) or every collection the search reached failed, which is what collection_errors lists. A failed collection never reads as "no matches".

Branch on schema: a result without it carries an error instead. Field-by-field detail is in Index commands → Search output, and score semantics in Search Index.

What's Next

On this page