Claude Code
terminal
claude mcp add cob-rag \
-e COB_RAG_URL=http://127.0.0.1:8000 \
-e COB_RAG_API_KEY=ck_your_corpus_key \
-- npx -y cob-rag-mcp start
Already logged in? claude mcp add cob-rag -- npx -y cob-rag-mcp start is enough.
Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"cob-rag": {
"command": "npx",
"args": ["-y", "cob-rag-mcp", "start"],
"env": {
"COB_RAG_URL": "http://127.0.0.1:8000",
"COB_RAG_API_KEY": "ck_your_corpus_key"
}
}
}
}
macOS: ~/Library/Application Support/Claude/. Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.
Claude Desktop on Windows
when npx is not found
{
"mcpServers": {
"cob-rag": {
"command": "cmd",
"args": ["/c", "npx", "-y", "cob-rag-mcp", "start"],
"env": {
"COB_RAG_URL": "http://127.0.0.1:8000",
"COB_RAG_API_KEY": "ck_your_corpus_key"
}
}
}
}
The cmd /c variant. Or install globally and use cob-rag-mcp as the command. Use 127.0.0.1, not localhost: on Windows it can resolve to IPv6 ::1, which Docker Desktop may not forward.
Cursor
~/.cursor/mcp.json or .cursor/mcp.json
{
"mcpServers": {
"cob-rag": {
"command": "npx",
"args": ["-y", "cob-rag-mcp", "start"],
"env": {
"COB_RAG_URL": "http://127.0.0.1:8000",
"COB_RAG_API_KEY": "ck_your_corpus_key"
}
}
}
}
The first path covers all projects, the second one project.
VS Code
.vscode/mcp.json
{
"inputs": [
{ "type": "promptString", "id": "cob-rag-key", "description": "cob-rag-engine key", "password": true }
],
"servers": {
"cob-rag": {
"type": "stdio",
"command": "npx",
"args": ["-y", "cob-rag-mcp", "start"],
"env": {
"COB_RAG_URL": "http://127.0.0.1:8000",
"COB_RAG_API_KEY": "${input:cob-rag-key}"
}
}
}
}
The inputs block makes VS Code ask for the key once and store it securely, so it never sits in the file.
n8n and anything that speaks HTTP
streamable HTTP
cob-rag-mcp start --transport http --host 127.0.0.1 --port 3333
# MCP over HTTP at http://127.0.0.1:3333/mcp
# Claude Code over HTTP
claude mcp add --transport http cob-rag http://127.0.0.1:3333/mcp \
--header "Authorization: Bearer ck_..."
n8n: add an MCP Client Tool node, endpoint http://127.0.0.1:3333/mcp, transport HTTP Streamable, authentication Bearer, token = the corpus key. Health check: GET /health answers {"status":"ok"} without a key.
HTTP mode, the rules
Every request
Carries the caller's own engine key, as Authorization: Bearer <key> or X-API-Key: <key>. A request without a key gets 401, unless you set COB_RAG_HTTP_USE_SERVER_KEY=true on purpose.
Stateless
One fresh MCP server per request, so it scales horizontally and needs no sticky sessions. Callers may send their own X-LLM-* headers; the server's model key is never spent on a caller's behalf.
Bind
Binds 127.0.0.1 by default and, on loopback, refuses requests whose Host or Origin is not local. Bind wider and put TLS in front: keys travel in headers.
Docker
HTTP mode
docker build -t cob-rag-mcp .
docker run --rm -p 127.0.0.1:3333:3333 \
-e COB_RAG_URL=http://host.docker.internal:8000 \
cob-rag-mcp
The engine URL must be reachable from the container: host.docker.internal for an engine on the host, or the engine's service name on a shared Docker network.
Any other stdio client
Command npx, arguments -y cob-rag-mcp start, plus the COB_RAG_* environment variables. With a global install, the command is simply cob-rag-mcp start.
If a client shows the server as failed, run npx -y cob-rag-mcp start in a terminal with the same environment: the reason is printed on stderr.