Docs / MCP Integration

MCP Integration

RagGo implements the Model Context Protocol (MCP), which lets AI assistants like Claude and Cursor call RagGo as a native tool — no plugins, no wrappers.

What is MCP?

MCP is an open standard (originally by Anthropic) for connecting LLM clients to external tools and data sources. An MCP server exposes a set of tools with typed inputs and outputs that the client can call during inference.

Setup: Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "raggo": {
      "url": "http://127.0.0.1:3235/mcp"
    }
  }
}

Restart Claude Desktop. You'll see raggo appear in the tools panel.

Setup: Cursor

Add to your Cursor settings (.cursor/mcp.json in your project root):

{
  "mcpServers": {
    "raggo": {
      "url": "http://127.0.0.1:3235/mcp"
    }
  }
}

Auto-configure: Open the RagGo Web UI at /ui/mcp to automatically apply MCP configuration to Claude Desktop and VS Code.

RagGo also supports stdio transport for clients that require it. Set MCP_SERVER_TRANSPORT=stdio in your .env file.

Available MCP tools (16)

GraphRAG

Tool Description
search_api_docs Search the API documentation graph for relevant classes and functions.
get_class_info Get detailed information about a specific class.
get_class_hierarchy Get the inheritance hierarchy for a class.
get_function_details Get detailed information about a specific function.
explore_graph_stats Get statistics about the code knowledge graph.

Document RAG

Tool Description
search_documents Semantic search across ingested documents. Returns ranked chunks with source paths.
search_code Semantic search across ingested code files.
ingest_file Ingest a single file into the vector store.
ingest_documents_directory Ingest all supported files from a directory.
get_document_collection_info Get information about the document collection (counts, sources).
list_document_sources List all source files that have been ingested.
get_supported_formats List all supported file formats for ingestion.

Resources

Tool Description
list_resource_files List available resource files.
get_resource_file Get the contents of a specific resource file.

Metrics

Tool Description
get_system_metrics Return server status, collection sizes, and system health.

Example: search_documents

// Input
{
  "query": "quantum error correction threshold",
  "limit": 5
}

// Output
{
  "results": [
    {
      "rank": 1,
      "score": 0.97,
      "title": "Chen et al. 2024",
      "text": "The surface code threshold for....",
      "source": "/papers/chen-qec-2024.pdf",
      "page": 12
    }
  ]
}

The MCP endpoint is available on all plans, including free. GraphRAG tools require Individual plan or higher.