Ref MCP Server

Up-to-date documentation for your coding agent. Covers 1000s of public repos and sites. Built by ref.tools

Local serverstdio

What is the Ref MCP server?

Ref mcp server lets Claude, Cursor and other MCP clients work with Ref directly. Up-to-date documentation for your coding agent. Covers 1000s of public repos and sites. Built by ref.tools.

What Ref does

A ModelContextProtocol server that gives your AI coding tool or agent access to documentation for APIs, services, libraries etc. It's your one-stop-shop to keep your agent up-to-date on documentation in a fast and token-efficient way.

Tools it exposes

Once connected, the assistant can call these 3 tools directly:

  • stdio — The stdio tool exposed by this server
  • ref_search_documentation — A powerful search tool to check technical documentation. Great for finding facts or code snippets. Can be used to search for public documentation on the web or
  • ref_read_url — A tool that fetches content from a URL and converts it to markdown for easy reading with Ref. This is powerful when used in conjunction with the

Installing the ref mcp server

The server is distributed via npm as npm, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 2 environment variables: YOUR_API_KEY, REF_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Knowledge and memory servers address the most frustrating trait of language models — walking into every conversation with no recollection of the last one. Ref sits in that group, and the shape of its toolset — stdio, ref_search_documentation, ref_read_url — tells you what it is really for. Worth comparing against the other knowledge memory servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the ref mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
stdioThe stdio tool exposed by this server.
ref_search_documentationA powerful search tool to check technical documentation. Great for finding facts or code snippets. Can be used to search for public documentation on the web or github as well from private resources like repos and pdfs.
ref_read_urlA tool that fetches content from a URL and converts it to markdown for easy reading with Ref. This is powerful when used in conjunction with the ref_search_documentation tool that returns urls of relevant content.

How to install the Ref MCP server

{
  "mcpServers": {
    "ref-tools": {
      "command": "npx",
      "args": ["-y", "npm"],
      "env": {
        "YOUR_API_KEY": "your-value",
        "REF_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
YOUR_API_KEYCredential the server authenticates with.Yes
REF_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Ref to stdio.
  • Use Ref to ref search documentation.
  • Use Ref to ref read url.

Frequently asked questions

It connects Ref to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (stdio, ref_search_documentation, ref_read_url) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ref directly.