-
Notifications
You must be signed in to change notification settings - Fork 447
docs: MCP streamable HTTP endpoint instead of PyPI package #1712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6a42c5e
Document built-in MCP server and update refs
edwinjosechittilappilly 9cfed15
Rename MCP server key to openrag
edwinjosechittilappilly 5530184
Unify MCP docs: remove tabs, add IBM Bob link
edwinjosechittilappilly 8f972a4
peer review
aimurphy 26e75be
Merge branch 'main' into fix-docs-draft-mcp
aimurphy 7e4dc2a
Merge branch 'main' into fix-docs-draft-mcp
aimurphy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| --- | ||
|
aimurphy marked this conversation as resolved.
Outdated
|
||
| title: MCP server | ||
| slug: /reference/mcp | ||
| --- | ||
|
|
||
| OpenRAG ships a built-in [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server over **streamable HTTP**, mounted on your OpenRAG instance at `/mcp`. | ||
| Any MCP client that supports URL-based server configs — such as [Cursor](https://docs.cursor.com/context/model-context-protocol), [Claude Desktop](https://modelcontextprotocol.io/quickstart/user), and the MCP SDK — can connect directly to this endpoint. | ||
| There is no subprocess to spawn and nothing extra to install: your client connects over HTTP using the same OpenRAG API key you use for the REST API. | ||
|
|
||
| :::warning Deprecation notice | ||
| The standalone `openrag-mcp` PyPI package has been **retired**. It was a separate stdio MCP server that you installed and ran as a subprocess. | ||
|
|
||
| OpenRAG now provides MCP support natively through the streamable-HTTP endpoint described on this page. Connect your MCP client directly to your running OpenRAG instance at `/mcp` instead of installing `openrag-mcp`. | ||
| ::: | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A running OpenRAG instance. | ||
| - An OpenRAG API key (begins with `orag_`). Create one in **Settings → API Keys**. | ||
|
|
||
| ## Endpoint URL | ||
|
|
||
| The MCP endpoint lives at `/mcp` on your OpenRAG instance. Which host and port you use depends on how OpenRAG is deployed: | ||
|
|
||
| | Deployment | MCP URL | | ||
| |:-----------|:--------| | ||
| | Default Docker deployment | `http://localhost:3000/mcp` | | ||
| | Backend run directly (dev, outside Docker) | `http://localhost:8000/mcp` | | ||
| | Remote / deployed instance | `https://your-openrag-instance.com/mcp` | | ||
|
|
||
| :::note | ||
| In the default Docker deployment the backend port (`8000`) is not published to the host. The OpenRAG frontend on port `3000` proxies `/mcp` to the backend and forwards your authentication headers, so **`http://localhost:3000/mcp`** is the correct local URL for a standard install. Use `http://localhost:8000/mcp` only when you run the backend directly without the frontend. | ||
| ::: | ||
|
|
||
| ## Authentication with `x-api-key` | ||
|
|
||
| Pass your OpenRAG API key on every request using the `X-API-Key` header: | ||
|
|
||
| ``` | ||
| X-API-Key: orag_your_api_key_here | ||
| ``` | ||
|
|
||
| The `Authorization: Bearer orag_...` header is also accepted as an alternative. The same key works for both the REST API and MCP, and is forwarded transparently to the underlying endpoints. | ||
|
|
||
| ## Connect a client | ||
|
|
||
| Add OpenRAG to your MCP client config using the `url` of your instance and the `X-API-Key` header. The examples below use the default local Docker URL — swap in your own host for a remote instance. | ||
|
|
||
| ### Cursor | ||
|
|
||
| Edit `~/.cursor/mcp.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "openrag": { | ||
| "url": "http://localhost:3000/mcp", | ||
| "headers": { | ||
| "X-API-Key": "orag_your_api_key_here" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Restart Cursor after saving the config. | ||
|
|
||
| ### Claude Desktop | ||
|
|
||
| Edit your `claude_desktop_config.json`: | ||
|
|
||
| - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json` | ||
| - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "openrag": { | ||
| "url": "http://localhost:3000/mcp", | ||
| "headers": { | ||
| "X-API-Key": "orag_your_api_key_here" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Restart Claude Desktop after editing the file. | ||
|
|
||
| ### IBM Bob | ||
|
|
||
| Add the server to your IBM Bob MCP config, setting `type` to `streamable-http`. For a step-by-step walkthrough, see [MCP integration with IBM Bob](https://www.ibm.com/think/tutorials/mcp-integration-ibm-bob). | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "openrag": { | ||
| "type": "streamable-http", | ||
| "url": "http://localhost:3000/mcp", | ||
| "headers": { | ||
| "x-api-key": "orag_your_api_key_here" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Available tools | ||
|
|
||
| All tools are auto-exposed from the OpenRAG `/v1/` API and are available immediately after connecting: | ||
|
|
||
| | Tool | Description | | ||
| |:-----|:------------| | ||
| | `openrag_chat` | Send a message and get a RAG-enhanced response. Supports `chat_id` and `filter_id`. | | ||
| | `openrag_list_chats` | List all chat conversations. | | ||
| | `openrag_get_chat` | Get a specific chat conversation by ID. | | ||
| | `openrag_delete_chat` | Delete a chat conversation by ID. | | ||
| | `openrag_search` | Semantic search over the knowledge base. Supports filters, score threshold, data sources. | | ||
| | `openrag_ingest` | Ingest documents (files, URLs, text) into the knowledge base. Returns a `task_id`. | | ||
| | `openrag_get_task_status` | Check the status of an ingestion task by `task_id`. | | ||
| | `openrag_delete_document` | Delete a document from the knowledge base by filename. | | ||
| | `openrag_get_settings` | Get current OpenRAG configuration (LLM, embeddings, chunk settings, system prompt). | | ||
| | `openrag_update_settings` | Update OpenRAG configuration. All fields are optional. | | ||
| | `openrag_list_models` | List available models for a provider (`openai`, `anthropic`, `ollama`, `watsonx`). | | ||
| | `openrag_create_knowledge_filter` | Create a knowledge filter to scope searches and chats. | | ||
| | `openrag_search_knowledge_filters` | Search knowledge filters by name or criteria. | | ||
| | `openrag_get_knowledge_filter` | Get a knowledge filter by ID. | | ||
| | `openrag_update_knowledge_filter` | Update an existing knowledge filter. | | ||
| | `openrag_delete_knowledge_filter` | Delete a knowledge filter by ID. | | ||
|
|
||
| ## Why streamable HTTP? | ||
|
|
||
| - **No subprocess** — your MCP client connects over HTTP; nothing to install or spawn locally. | ||
| - **Full tool surface** — document ingestion, task tracking, and knowledge filters are available from day one. | ||
| - **One auth model** — the same API key you use for the REST API works for MCP. | ||
| - **Self-hosted and secure** — the `/mcp` endpoint is part of your OpenRAG deployment; nothing leaves your network. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.