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.
What you’ll build
Section titled “What you’ll build”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, andindx_get_document. - One flag switches between
stdio(default, for local desktop clients) and a networked transport for remote or container deployments.
The build
Section titled “The build”-
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
--offlineproduces a fully queryable archive — no cloud keys needed for a local desktop setup.Terminal window indx ./docs --out ./ai-ready --offlineindx ./docs → ./ai-ready01 walk 38 files, 6 folders02 parse 38 ok, 0 skipped03 chunk 294 chunks04 relate 87 relations05 enrich 38 documents (plaintext)06 embed 294 vectors → none, sealed handbook.indxdone: 294 chunks, 38 docs (2.1s)The result is
ai-ready/handbook.indx— a single portable file. -
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.indxThe 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 thepip installhint — it will never silently do nothing. -
Wire Claude Desktop or Cursor to the server.
Both clients use the same
mcpServersJSON 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 callindx_search, read the result, and cite the source file. -
Networked clients: switch the transport.
stdioonly works when the client launches the process locally. For remote clients, containers, or a shared team server, use--transport sseor--transport streamable-http:Terminal window indx mcp ai-ready/handbook.indx --transport streamable-http --name team-docs--namesets 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 connectfrom claude_agent_sdk import ClaudeAgentOptions, query
kb = connect("ai-ready/handbook.indx")
# kb.claude() → in-process MCP server for the Claude Agent SDKoptions = 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.
What you learned
Section titled “What you learned”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.
--transportswitches between localstdioand networked deployments;--namecontrols what the client sees.- For Python agents,
kb.claude()delivers the same three tools in-process without a subprocess.