Skip to Content
MCP ServerOverview

MCP Server

Expose RAG-Forge to Claude Desktop, Cursor, and other Model Context Protocol clients.

What you get

The RAG-Forge MCP server wraps your indexed pipeline as a set of tools any MCP client can call. The server registers five tools:

  • rag_query — Execute a RAG query against the indexed pipeline and return retrieved context with an answer
  • rag_audit — Run the evaluation suite against a golden set and return scored results
  • rag_status — Return pipeline health metrics and cache statistics (no arguments required)
  • rag_ingest — Index new documents into the pipeline
  • rag_inspect — Debug a specific chunk by ID, useful for tracing retrieval issues

Running the server

stdio is the default transport and the right choice for local desktop clients:

rag-forge serve --mcp

For multi-client or networked deployments, use the HTTP transport. The default port is 3100.

⚠️ Security. The HTTP transport is unauthenticated by default and has no TLS, rate-limiting, or origin checking. Do not expose it directly to the public internet. For any networked deployment, place it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel) that terminates TLS, enforces authentication, and restricts the allowed clients. For single-machine local use, bind it only to 127.0.0.1.

rag-forge serve --mcp --transport http --port 3100

You can pick any available port with -p:

rag-forge serve --mcp --transport http -p 3333

The HTTP transport uses Server-Sent Events. Each connection gets its own MCP server instance and session ID — multiple clients can connect concurrently without interfering. The /health endpoint reports the active session count.

Claude Desktop configuration

Add to claude_desktop_config.json:

{ "mcpServers": { "rag-forge": { "command": "rag-forge", "args": ["serve", "--mcp"] } } }

For HTTP mode, use the url field instead:

{ "mcpServers": { "rag-forge": { "url": "http://localhost:3100/sse" } } }

Transports

TransportWhen to use
stdio (default)Local desktop clients (Claude Desktop, Cursor)
httpMulti-client or networked deployments