Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,27 @@ console.log(response.response);

## 🔌 Model Context Protocol (MCP)

Connect AI assistants like Cursor and Claude Desktop to your OpenRAG knowledge base:
OpenRAG ships a built-in MCP server over **streamable HTTP**, mounted on your instance at `/mcp`. Connect AI assistants like Cursor, Claude Desktop, and IBM Bob to your OpenRAG knowledge base — no subprocess and no separate install. Authenticate with the same OpenRAG API key you use for the REST API, passed via the `X-API-Key` header.

```bash
pip install openrag-mcp
```
> **Important:** The standalone `openrag-mcp` PyPI package is deprecated. Connect your MCP client directly to the `/mcp` endpoint instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edwin will investigate these as part of deprecating the pypi package.


**Quick Example (Cursor/Claude Desktop config):**
```json
{
"mcpServers": {
"openrag": {
"command": "uvx",
"args": ["openrag-mcp"],
"env": {
"OPENRAG_URL": "http://localhost:3000",
"OPENRAG_API_KEY": "your_api_key_here"
"url": "http://localhost:3000/mcp",
"headers": {
"X-API-Key": "orag_your_api_key_here"
}
}
}
}
```

The MCP server provides tools for RAG-enhanced chat, semantic search, and settings management.
The MCP server provides tools for RAG-enhanced chat, semantic search, document ingestion, knowledge filters, and settings management.

📖 [Full MCP Documentation](https://pypi.org/project/openrag-mcp/)
📖 [Full MCP Documentation](https://github.com/langflow-ai/openrag/tree/main/sdks/mcp)

## 🛠️ Development

Expand Down
16 changes: 11 additions & 5 deletions docs/docs/reference/api-sdk-overview.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
---
title: OpenRAG SDKs
title: OpenRAG SDK and MCP API references
slug: /reference/api-sdk-overview
---

Use the OpenRAG SDKs to interact with OpenRAG programmatically or integrate OpenRAG into an application:

* [OpenRAG MCP Server](https://github.com/langflow-ai/openrag/tree/main/sdks/mcp)
* [Python SDK README](https://github.com/langflow-ai/openrag/tree/main/sdks/python)
* [TypeScript/JavaScript SDK README](https://github.com/langflow-ai/openrag/tree/main/sdks/typescript)
* [MCP API (streamable-HTTP endpoint)](https://github.com/langflow-ai/openrag/tree/main/sdks/mcp)

For the core APIs, see [`main.py`](https://github.com/langflow-ai/openrag/blob/main/src/main.py)
Connect your MCP client directly to your running OpenRAG instance at `/mcp`.

The standalone `openrag-mcp` package is deprecated; use the built-in endpoint instead.

* [Python SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/python)

* [TypeScript/JavaScript SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/typescript)

* [Core OpenRAG APIs (`main.py`)](https://github.com/langflow-ai/openrag/blob/main/src/main.py)
2 changes: 1 addition & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const sidebars = {
{
type: "doc",
id: "reference/api-sdk-overview",
label: "APIs and SDKs",
label: "SDK and MCP API references",
},
"support/contribute",
"support/troubleshoot",
Expand Down
108 changes: 48 additions & 60 deletions sdks/mcp/README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,72 @@
# OpenRAG MCP — Final Release Notice
# OpenRAG MCP

> **This package (`openrag-mcp`) has been retired.**
>
> OpenRAG now ships a built-in [Model Context Protocol](https://modelcontextprotocol.io/) server over **streamable HTTP** — no subprocess, no separate install, no API key in a subprocess env block. Connect your MCP client directly to your running OpenRAG instance.
>
> The last published version of `openrag-mcp` on PyPI is the final release. No further updates will be made to this package.
> **The Python package `openrag-mcp` is deprecated and no longer updated. Use the built-in streamable HTTP endpoint instead.**

---
OpenRAG ships a built-in [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server over **streamable HTTP**, mounted on your OpenRAG instance at `/mcp`. This endpoint is part of your OpenRAG deployment; when connecting locally, nothing leaves your network.

## Migrating to streamable HTTP
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.

The OpenRAG backend exposes an MCP endpoint at `/mcp` using the streamable-HTTP transport. Any MCP client that supports `"url"`-based server configs (Cursor, Claude Desktop, and the MCP SDK) can connect to it directly.
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. Document ingestion, task tracking, and knowledge filter tools are available directly.

### Prerequisites
## Prerequisites

- A running OpenRAG instance (v0.3.0 or later)
- An OpenRAG API key — create one in **Settings → API Keys**
In addition to a running OpenRAG instance, you need an OpenRAG API key and your OpenRAG MCP endpoint URL.

---
### Authentication

## Cursor
You need an OpenRAG API key (prefixed by `orag_`). You can create an OpenRAG API key in **Settings → API Keys**.

**Config file:** `~/.cursor/mcp.json`
Pass your OpenRAG API key on every request using the `X-API-Key` or `Authorization: Bearer` headers.

**Standard API key:**
The same key works for both the REST API and MCP, and it is forwarded transparently to the underlying endpoints.

```json
{
"mcpServers": {
"openrag": {
"url": "https://your-openrag-instance.com/mcp",
"headers": {
"X-API-Key": "orag_your_api_key_here"
}
}
}
}
```
### Endpoint URL

The MCP endpoint is `/mcp` on your OpenRAG instance. The host and port depend 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` |

**IBM auth (when `IBM_AUTH_ENABLED=true` on the server):**
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. Therefore, **`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.

The following examples use the local Docker URL; replace this URL with your own host if you need to connect to a remote instance.

## Cursor

Config file: `~/.cursor/mcp.json`

```json
{
"mcpServers": {
"openrag": {
"url": "https://your-openrag-instance.com/mcp",
"url": "http://localhost:3000/mcp",
"headers": {
"X-Username": "your_ibm_username",
"X-Api-Key": "your_ibm_api_key"
"X-API-Key": "orag_your_api_key_here"
}
}
}
}
```

Restart Cursor after saving the config.

---
Restart Cursor after saving the config file.

## Claude Desktop

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
Config file:

**Standard API key:**
* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
"mcpServers": {
"openrag": {
"url": "https://your-openrag-instance.com/mcp",
"url": "http://localhost:3000/mcp",
"headers": {
"X-API-Key": "orag_your_api_key_here"
}
Expand All @@ -78,32 +75,34 @@ Restart Cursor after saving the config.
}
```

**IBM auth:**
Restart Claude Desktop after editing the config file.

## IBM Bob

Add the server to your IBM Bob MCP config with `type` set to `streamable-http`:

```json
{
"mcpServers": {
"openrag": {
"url": "https://your-openrag-instance.com/mcp",
"type": "streamable-http",
"url": "http://localhost:3000/mcp",
"headers": {
"X-Username": "your_ibm_username",
"X-Api-Key": "your_ibm_api_key"
"x-api-key": "orag_your_api_key_here"
}
}
}
}
```

Restart Claude Desktop after editing the file.

---
For more information, see [MCP integration with IBM Bob](https://www.ibm.com/think/tutorials/mcp-integration-ibm-bob).

## Available tools

All tools are auto-exposed from the `/v1/` API and are available immediately after connecting:
All tools are auto-exposed from the `/v1/` API, and they 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. |
Expand All @@ -121,17 +120,6 @@ All tools are auto-exposed from the `/v1/` API and are available immediately aft
| `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 (previously listed as "coming later" in the stdio package).
- **One auth model** — the same API key or IBM credentials you use for the REST API work for MCP.
- **Self-hosted and secure** — the `/mcp` endpoint is part of your OpenRAG deployment; nothing leaves your network.

---

## License

Apache 2.0 — see [LICENSE](../../LICENSE) for details.
Apache 2.0 — see [LICENSE](../../LICENSE) for details.
Loading