RefLib

MCP server

The Model Context Protocol (MCP) server is the way assistants search and read RefLib corpora. The server is hosted by us. Tools are list_corpora, search, and read. Cite section IDs in answers.

Connect natively in Cursor, Claude, and other clients that speak remote MCP, or use the mcp-remote module for clients that only run a local command.

Mint a key on your account page first (sign in or create an account).

Setup

General

Transport is Streamable HTTP: JSON-RPC on POST to one path. Authenticate every request with a Bearer API key. We do not run an OAuth authorization server in this version.

URL: https://mcp.reflib.online/mcp

Header: Authorization: Bearer YOUR_KEY

Missing or bad token → HTTP 401. A key can search every corpus we host.

Claude

Claude.ai connectors and Claude desktop Connectors use OAuth. This version of RefLib authenticates with a Bearer key only. Use Claude Code (below), or add mcp-remote with the Authorization header as in the Visual Studio Code block.

Claude Code

claude mcp add --transport http reflib https://mcp.reflib.online/mcp --header "Authorization: Bearer YOUR_KEY"

Then /mcp in the session to confirm the server.

Codex

codex mcp add reflib --url https://mcp.reflib.online/mcp

Add the Bearer header in that client’s MCP settings. If this is the first remote MCP, enable it in ~/.codex/config.toml:

[features]
experimental_use_rmcp_client = true

Cursor

Install from this link, then add the Bearer header in MCP settings (the link only carries the URL): Add RefLib to Cursor.

Or paste into project or user mcp.json and reload MCP servers. Put the key in REFLIB_API_KEY if you use ${env:REFLIB_API_KEY} instead of YOUR_KEY.

{
  "mcpServers": {
    "reflib": {
      "url": "https://mcp.reflib.online/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Visual Studio Code

CTRL/CMD+P → MCP: Add Server → Command (stdio), or put this in MCP settings. Clients that cannot set HTTP headers on a URL use mcp-remote:

{
  "mcpServers": {
    "reflib": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://mcp.reflib.online/mcp",
        "--header", "Authorization:Bearer YOUR_KEY"
      ]
    }
  }
}

Windsurf

Settings → Cascade → MCP servers → Add custom server. Same native JSON as Cursor, or the mcp-remote block above.

Zed

{
  "context_servers": {
    "reflib": {
      "source": "custom",
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://mcp.reflib.online/mcp",
        "--header", "Authorization:Bearer YOUR_KEY"
      ]
    }
  }
}

Others

If the client supports a remote MCP URL, use that URL and the Bearer header. If it asks for an API key, paste the secret from your account page. If it only launches a command:

Common use cases

After the server is connected, try prompts like these.

Cite the manual, not memory

Before answering a language or API question, call list_corpora if needed, search with a precise question, then read the section IDs you will cite. Do not invent text that is not in those sections.

PostgreSQL listen port

Search corpus postgresql_16 for “How do I change the port PostgreSQL listens on?” then read the top section ID.

Unknown API in this repo

If the project uses a library we host, search that corpus and paste section IDs into the answer so a human can open the same paragraph.

FAQ

Why do I get HTTP 401?

Every request, including initialize, needs Authorization: Bearer and a key from your account. A missing header or a typo in the key is 401. Create a new key if you lost the secret; we only store a hash.

The connection dropped

Disconnect and reconnect the server in the client’s MCP settings. That does not change your keys or corpora.

mcp-remote fails after a previous login

Clear saved auth for that helper: rm -rf ~/.mcp-auth, then reconnect. RefLib itself uses Bearer; this cache is the mcp-remote client, not our server.

Is there an SSE URL?

No. Only POST to /mcp. There is no /sse fallback.

Can I use more than one key?

Yes. Mint separate keys on the account page and point different clients at different keys.