Ref Tools

Developer toolsDocs and learning

Token efficient search for coding agents over public and private documentation.

Your AI app calls the Ref Tools MCP server, which does the developer tools and docs and learning work and sends the result back to the chat.

About Ref Tools

Ref Tools is a community MCP server from ref-tools, filed in our directory under developer tools and docs and learning. Token efficient search for coding agents over public and private documentation.

Ref Tools runs on your own machine: your AI app starts it with the command npx -y ref-tools-mcp@3.0.1 and talks to it over standard input and output. It needs REF_API_KEY set before Ref Tools starts.

The README for Ref Tools lists tools such as query and url, which your AI app can call once the server is connected.

Ref Tools is listed in the official MCP registry as io.github.ref-tools/ref-tools-mcp, version 3.0.1.

At a glance

Publisher
ref-tools (community)
Runs
Locally on your machine
Install from
Node.js package on npm: ref-tools-mcp
Written in
TypeScript
License
MIT
GitHub stars
1,188
Official MCP registry
io.github.ref-tools/ref-tools-mcp

Tools Ref Tools gives your AI app

  • query(required): Query to search for relevant documentation. This should be a full sentence or question.
  • url(required): The URL of the webpage to read.

Tool names as the Ref Tools README lists them. Your AI app shows the live list once Ref Tools is connected.

How to set up Ref Tools

  1. Install Node.js on the machine that runs your AI app, because Ref Tools starts with npx and downloads its package on first run.
  2. Create REF_API_KEY for Ref Tools in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Ref Tools to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Ref tools to confirm the connection.
  5. Run one read-only task with Ref Tools first, such as a call to query, before you allow anything that writes or sends.

Ref Tools compared with similar servers

  • CloudBase by TencentCloudBase has fewer GitHub stars than Ref Tools (1.2k against 1.2k); both are community servers, and both run locally.
  • AgentRQ by agentrq has more GitHub stars than Ref Tools (1.2k against 1.2k); both are community servers, and AgentRQ runs as a remote server and Ref Tools runs on your own machine. The AgentRQ README lists 10 tools to Ref Tools's 2.
  • UniFi Access by sirkirby has fewer GitHub stars than Ref Tools (1.2k against 1.2k); both are community servers, and both run locally.

Before you connect Ref Tools

  • Give Ref Tools its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Ref tool call until you trust what it does with them.
  • Treat text that Ref Tools fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Ref Tools on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Ref Tools

How marketing and sales teams put Ref Tools to work, by company size. Pick the size closest to yours and start Ref Tools on one use case.

Small business

  • A small business with a developer can use Ref Tools to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Ref Tools to explain and fix a marketing site issue without context switching between tools.
  • A small business can use Ref Tools to keep help docs and how-tos current, answering customer questions before they become tickets.
  • Ref Tools runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Ref Tools to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Ref Tools to keep scripts and automations documented and versioned as they change.
  • Marketing teams can connect Ref Tools so agents write from current product docs, keeping launch copy accurate.
  • Start with query and url, the tools Ref Tools lists first, and add more once the team trusts the results.

Enterprise

  • Enterprise engineering teams can roll out Ref Tools with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Ref Tools so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can serve approved docs through Ref Tools, so every agent answers from the same source of truth.
  • Ref Tools is a community server, so have security review the code and pin a version before Ref Tools touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Ref Tools README

From ref-tools/ref-tools-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Ref MCP

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.

For more see info ref.tools

Agentic search for exactly the right context

Ref's tools are designed to match how models search while using as little context as possible to reduce context rot. The goal is to find exactly the context your coding agent needs to be successful while using minimum tokens.

Depending on the complexity of the prompt, LLM coding agents like Claude Code will typically do one or more searches and then choose a few resources to read in more depth.

For a simple query about Figma's Comment REST API it will make a couple calls to get exactly what it needs:

SEARCH 'Figma API post comment endpoint documentation' (54 tokens)
READ https://www.figma.com/developers/api#post-comments-endpoint (385 tokens)

For more complex situations, the LLM will try to refine its prompt as it reads results. For example:

SEARCH 'n8n merge node vs Code node multiple inputs best practices' (126)
READ https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.merge/#merge (4961)
READ https://docs.n8n.io/flow-logic/merging/#merge-data-from-multiple-node-executions (138)
SEARCH 'n8n Code node multiple inputs best practices when to use' (107)
READ https://docs.n8n.io/code/code-node/#usage (80)
SEARCH 'n8n Code node access multiple inputs from different nodes' (370)
SEARCH 'n8n Code node $input access multiple node inputs' (372)
READ https://docs.n8n.io/code/builtin/output-other-nodes/#output-of-other-nodes (2310)

Ref takes advantage of MCP sessions to track search trajectory and minimize context usage. There's a lot more ideas cooking but here's what we've implemented so far.

1. Filtering search results

For repeated similar searches in a session, Ref will never return repeated results. Traditionally, you dig farther in to search results by paging to the next result but this approach allows the agent to page AND adjust the prompt at the same time.

2. Fetching the part of the page that matters

When reading a page of documentation, Ref will use the agent's session search history to dropout less relevant sections and return the most relevant 5k tokens. This helps Ref avoid a big problem with standard fetch() web scraping which is when it hits a large documentation page you can easily end up pull in 20k+ tokens into context, most of which are irrelevant.

Why does minimizing tokens from documentation context matter?

1. More context makes models dumber

It's well documented that as of July 2025 that models get dumber as you put in more tokens. You might have heard about how models are great with long context now and that's kind of true but not the whole picture. For a quick primer on some research, checkout this video from the team at Chroma.

2. Tokens cost $$$

Imagine you are using Claude Opus as a background agent and you start by having the agent pull in documentation context and suppose it pulls in 10000 tokens of context with 4000 being relevant and 6000 being extra noise. At API pricing, that 6k tokens cost about $0.09 PER STEP. If one prompt ends up taking 11 steps with Opus, you've spent $1 for no reason.

Setup

There are two options for setting up Ref as an MCP server, either via the streamable-http server (recommended) or local stdio server (legacy).

This repo contains the legacy stdio server.

Streamable HTTP (recommended)
"Ref": {
  "type": "http",
  "url": "https://api.ref.tools/mcp?apiKey=YOUR_API_KEY"
}
stdio
"Ref": {
  "command": "npx",
  "args": ["ref-tools-mcp@latest"],
  "env": {
    "REF_API_KEY": <sign up to get an api key>
  }
}

Tools

Ref MCP server provides all the documentation related tools for your agent needs.

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 github as well from private resources like repos and pdfs.

Parameters:

  • query (required): Query to search for relevant documentation. This should be a full sentence or question.
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 ref_search_documentation tool that returns urls of relevant content.

Parameters:

  • url (required): The URL of the webpage to read.

OpenAI deep research support

Ref can be used as a source for deep research. OpenAI requires specific tool definitions so when used with an OpenAI client, Ref will provide the same tools with slightly different naming.

ref_search_documentation(query) -> search(query)
ref_read_url(url) -> fetch(id)

Development

npm install
npm run dev
Running with Inspector

For development and debugging purposes, you can use the MCP Inspector tool. The Inspector provides a visual interface for testing and monitoring MCP server interactions.

Visit the Inspector documentation for detailed setup instructions.

To test locally with Inspector:

npm run inspect

Or run both the watcher and inspector:

npm run dev
Local Development
  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. For development with auto-rebuilding:
npm run watch

License

MIT

Questions about Ref Tools

What is the Ref Tools MCP server?

Token efficient search for coding agents over public and private documentation. Ref Tools is maintained by ref-tools on GitHub at ref-tools/ref-tools-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Ref Tools MCP server?

Add Ref Tools to your AI app's MCP config with the command npx -y ref-tools-mcp@3.0.1. In Claude Code, run claude mcp add --transport stdio ref-tools -- npx -y ref-tools-mcp@3.0.1. To run Ref Tools this way you need Node.js installed.

Does Ref Tools need an API key?

Yes. Ref Tools expects REF_API_KEY to be set. Create the key for Ref Tools in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Ref Tools an official MCP server?

No. Ref Tools is a community server maintained by ref-tools. Community servers can be excellent; read the code and the open issues before you give Ref Tools access to company data.

What license is Ref Tools under?

Ref Tools is released under the MIT license, according to its GitHub repository. The license covers the code of Ref Tools; the service it connects to has its own terms.