Ref MCP
Ref's MCP server: documentation search for APIs and libraries that hands the agent only the relevant parts of pages
Install
"Ref": {
"type": "http",
"url": "https://api.ref.tools/mcp?apiKey=YOUR_API_KEY"
}Recommended remote option; snippet for the mcpServers section.
This is third-party code. Review the repository files before installing.
What it does
Ref gives the agent two tools: technical documentation search and reading a page by URL converted to Markdown. It searches public docs on the web and GitHub as well as private sources such as repositories and PDFs. The server tracks search history within a session: it never repeats results already shown, and when reading a large page it keeps only the most relevant parts. This saves context compared with a plain fetch. For OpenAI clients the tools are exposed as search and fetch.
Who it is for. For developers whose agents often read third-party API and library docs and burn many tokens doing so.
Good fit when
- The agent gets a library API wrong from outdated knowledge
- A plain docs fetch floods the context
- You need to search the team's private documentation
Not a fit when
- You cannot sign up for a Ref API key
- The docs already live in the repository as files the agent can read
Example request
Find the Figma API endpoint for posting a comment in the docs and show its parametersLimitations
Requires signing up at ref.tools for an API key; plan terms are on the site. This repository holds the legacy stdio server; the authors recommend the remote HTTP one. Queries go to an external service; access from Russia without a VPN is unverified.
How to disable. Remove the Ref block from the MCP client config.
MCP
- Transport
- http, stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| REF_API_KEY required, secret | Ref API key for the stdio server |
Security check
- Sends search queries to an external service
- Can index private repositories and PDFs
README in short
The README explains how an agent searches and reads docs through Ref using sample call chains. It describes two context-saving mechanisms and why extra tokens hurt quality and cost. It gives HTTP and stdio configs, describes the tools and OpenAI deep research compatibility. MIT licensed.
FAQ
Which connection option should I pick?
Remote HTTP: the authors call it recommended and the stdio server in this repo legacy.
How does Ref differ from plain page reading?
It returns about 5k tokens of the most relevant sections based on earlier searches rather than the whole page.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything
Up-to-date, version-specific library docs and code examples in your agent's context, via MCP or a CLI plus skill