Skip to content

Summary

Documentation search MCP server from Ref that keeps coding agents current on APIs and libraries while returning only the most relevant, token-efficient context.

Features

  • Searches public docs, GitHub and private repositories and PDFs
  • Session-aware search that never repeats results
  • Returns the most relevant ~5k tokens of a page instead of the whole page
  • Hosted streamable HTTP endpoint, or a legacy local stdio server
  • OpenAI deep research compatible tool definitions

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "Ref MCP" tools will be available.
{
  "mcpServers": {
    "ref-mcp": {
      "type": "http",
      "url": "https://api.ref.tools/mcp?apiKey=<your-ref-api-key>"
    }
  }
}

Description

Ref MCP gives AI coding tools access to documentation for APIs, services and libraries, from public docs and GitHub as well as private resources such as your own repositories and PDFs. Its design goal is to find exactly the context an agent needs while spending as few tokens as possible.

Tools
  • ref_search_documentation searches technical documentation from a full-sentence query.
  • ref_read_url fetches a page and converts it to markdown, usually one of the search results.
How it saves context

Ref uses the MCP session to track the agent's search trajectory. Repeated, similar searches never return results the agent has already seen, so it can page and refine its query at once. When reading a page, Ref uses that search history to drop less relevant sections and return the most relevant 5k tokens, instead of the 20k+ tokens a plain fetch of a large documentation page can pull in. It also exposes OpenAI-compatible tool definitions so it can be a source for deep research.

Setup

The recommended setup is the hosted streamable HTTP server at https://api.ref.tools/mcp, with your Ref API key as the apiKey query parameter. The GitHub repository holds the older local stdio server (npx ref-tools-mcp@latest with REF_API_KEY). Both need an account at ref.tools.

Related MCP Servers

See all Ref MCP alternatives

MCP: Snag

by Snag

Snag's official remote MCP server — hands a coding agent the session replay, console logs, network trace and annotated screenshots captured for a bug, then takes the fix PR link back.

Browse all MCP servers →