Skip to content

Give Claude Desktop and Cursor Your Docs over MCP

Wei is a backend developer on a team of eight. The team has runbooks, architecture decisions, and API references spread across a ./docs folder — living text that gets updated every sprint. The AI tools everyone already uses (Claude Desktop, Cursor) know nothing about it. Every “what’s the retry policy?” question ends with someone digging through the repo instead of asking the assistant.

Wei doesn’t want to build a custom app. He wants the knowledge space inside the tools his teammates already have open.

A running MCP server that makes your team knowledge space available inside Claude Desktop and Cursor:

  • Any MCP-capable client — Claude Desktop, Cursor, the TypeScript Mastra framework — connects to it with no Python on the client side.
  • The server advertises three tools: indx_search, indx_overview, and indx_get_document.
  • One flag switches between stdio (default, for local desktop clients) and a networked transport for remote or container deployments.
  1. Install the MCP extra and build the knowledge space.

    The MCP server lives behind the indx[mcp] extra. indx[agent] pulls in all adapters if you need them later — both include the server.

    Terminal window
    pip install "indx[mcp]"

    Build a knowledge space from the docs folder. Even --offline produces a fully queryable archive — no cloud keys needed for a local desktop setup.

    Terminal window
    indx ./docs --out ./ai-ready --offline
    indx ./docs → ./ai-ready
    01 walk 38 files, 6 folders
    02 parse 38 ok, 0 skipped
    03 chunk 294 chunks
    04 relate 87 relations
    05 enrich 38 documents (plaintext)
    06 embed 294 vectors → none, sealed handbook.indx
    done: 294 chunks, 38 docs (2.1s)

    The result is ai-ready/handbook.indx — a single portable file.

  2. Start the MCP server.

    One command serves the archive over MCP. By default it speaks stdio, which is what local desktop clients expect.

    Terminal window
    indx mcp ai-ready/handbook.indx

    The server advertises three tools to any connected client:

    | Tool | What it does | |---|---| | indx_search | Semantic search → ranked chunks with source, type, and score | | indx_overview | Describes the space: counts, document types, sample summaries | | indx_get_document | Fetches one document’s full text and metadata |

    If indx[mcp] is not installed, the command exits immediately and prints the pip install hint — it will never silently do nothing.

  3. Wire Claude Desktop or Cursor to the server.

    Both clients use the same mcpServers JSON config format. Add this block to your Claude Desktop or Cursor MCP settings:

    {
    "mcpServers": {
    "indx": {
    "command": "indx",
    "args": ["mcp", "ai-ready/handbook.indx"]
    }
    }
    }

    Restart the client. The three indx_* tools appear in the tool list. Wei’s teammates can now ask “What’s the retry policy?” and Claude or Cursor will call indx_search, read the result, and cite the source file.

  4. Networked clients: switch the transport.

    stdio only works when the client launches the process locally. For remote clients, containers, or a shared team server, use --transport sse or --transport streamable-http:

    Terminal window
    indx mcp ai-ready/handbook.indx --transport streamable-http --name team-docs

    --name sets the label the client sees in its tool list (defaults to the archive stem). The TypeScript Mastra framework, Cursor in remote mode, and Claude Desktop with a proxy all speak these transports — still no Python required on the client side.

The in-process alternative for Python agents

Section titled “The in-process alternative for Python agents”

If you’re writing a Python agent rather than wiring a desktop client, skip the subprocess entirely. connect() builds the same MCP server in-process:

from indx.agent import connect
from claude_agent_sdk import ClaudeAgentOptions, query
kb = connect("ai-ready/handbook.indx")
# kb.claude() → in-process MCP server for the Claude Agent SDK
options = ClaudeAgentOptions(mcp_servers={"indx": kb.claude()})
async for message in query(prompt="What's the incident-response runbook?", options=options):
print(message)

kb.serve(transport="stdio") is the programmatic equivalent of indx mcp — it starts the same server from Python if you need that in a script or CI step.

  • indx mcp <archive> is a complete MCP server: one command, no custom code, no Python on the client.
  • Claude Desktop, Cursor, and the TypeScript Mastra framework all speak MCP — any of them connects to the same server with a four-line JSON config.
  • --transport switches between local stdio and networked deployments; --name controls what the client sees.
  • For Python agents, kb.claude() delivers the same three tools in-process without a subprocess.