# Brand Assets Source: https://docs.ref.tools/brand/assets Download Ref icons and wordmarks. ### Usage Guidelines * Prefer the wordmark in nearly all cases. * Icon should be used for buttons, icons, avatars etc. * Always include the "." in wordmark and icon. * It's fine to modify the color for the context. The font is [Libre Baskerville](https://fonts.google.com/specimen/Libre+Baskerville?preview.text=Ref.). For questions about brand usage, contact us at `hello@ref.tools`. *** ## Wordmark Prefer the wordmark in nearly all cases. Ideal for headers, presentations, and marketing materials. ### For Light Backgrounds Ref Wordmark Light **Download:** * [SVG (Vector)](/logo/ref-wordmark-light.svg) * [PNG (Light)](/logo/ref-wordmark-light.png) ### For Dark Backgrounds Ref Wordmark Dark **Download:** * [SVG (Vector)](/logo/ref-wordmark-dark.svg) * [PNG (Dark)](/logo/ref-wordmark-dark.png) *** ## Icon Icon for buttons, icons, and avatars. ### For Light Backgrounds Ref Icon Light **Download:** * [SVG (Vector)](/logo/ref-logo-light.svg) * [PNG (512x512)](/logo/ref-logo-512-light.png) ### For Dark Backgrounds Ref Icon Dark **Download:** * [SVG (Vector)](/logo/ref-logo-dark.svg) * [PNG (512x512)](/logo/ref-logo-512-dark.png) *** ## Text colors * **Light**: `#e5e5e5` * **Dark**: `#1a1a1a` *** ## Design Files Figma file with icon and wordmark assets. *** ## Need Something Else? If you need additional formats, sizes, or have questions about brand usage, please reach out to us at `hello@ref.tools`. # Monthly Updates Source: https://docs.ref.tools/changelog Updates including new features launched, bugs fixed and relevant content. * `2026-07`: [Ref July 2026 update](https://mailchi.mp/ref/july2026) * `2026-06`: [Ref June 2026 update](https://mailchi.mp/ref/june2026) * `2026-05`: [Ref May 2026 update](https://mailchi.mp/ref/may2026) * `2026-04`: [Ref April 2026 update](https://mailchi.mp/ref/april2026) * `2026-03`: [Ref March 2026 update](https://mailchi.mp/ref/march2026) * `2026-02`: [Ref February 2026 update](https://mailchi.mp/ref/feb2026) * `2026-01`: [Ref January 2026 update](https://mailchi.mp/ref/jan2026) * `2025-12`: [Ref December 2025 update](https://mailchi.mp/ref/dec2025) * `2025-11`: [Ref November 2025 update](https://mailchi.mp/ref/nov2025) * `2025-10`: [Ref October 2025 update](https://mailchi.mp/ref/oct2025) * `2025-09`: [Ref September 2025 update](https://mailchi.mp/ref/sept2025) * `2025-08`: [Ref August 2025 update](https://mailchi.mp/ref/august2025) * `2025-07`: [Ref July 2025 update](https://mailchi.mp/ref/july2025) * `2025-06`: [Ref June 2025 update](https://mailchi.mp/ref/june2025) * `2025-05`: [Ref May 2025 update](https://mailchi.mp/ref/may2025) * `2025-04`: [Ref April 2025 update](https://mailchi.mp/ref/april2025) * `2025-03`: [Ref March 2025 update](https://mailchi.mp/4837408ed44f/ref-updates-33125) ## Roadmap We plan one month at a time. To see the current roadmap, checkout bottom of the most recent monthly update. # Building the Best Documentation Search Source: https://docs.ref.tools/comparison/building-doc-search Principles for coding-agent context. ## Objectives * Deliver precise answers with minimal tokens. * Keep agents in flow without manual hunting. * Blend public and private sources safely. ## Search Loop 1. Use session history to skip duplicate hits. 2. Return only the top \~5k relevant tokens per read. 3. Let agents adjust prompts while paging results. ## Token Discipline * Favor HTTP MCP mode for fast responses. * Trim payloads before handing context to the agent. * Track credits per endpoint to spot waste. ## Source Coverage * Index GitHub repos for code and docs. * Add PDFs and Markdown libraries for gaps. * Combine web search when private data misses. ## Agent Experience * Verify installs with a sample MCP prompt early. * Surface usage cards and alerts in the dashboard. * Keep role-based guardrails tight for teams. ## Continuous Improvement * Monitor credit logs after each feature launch. * Re-run indexing when repos cross major releases. * Capture wins and issues in a monthly changelog. # Ref vs Context7 Source: https://docs.ref.tools/context/comparison/context7 Key differences between the popular documentation search MCP servers. ## Snapshot | | Context7 | Ref | | --------------------------- | ---------------------------------- | ------------------------------------------ | | Approach | Batch retrieval | Iterative search + read | | Content | Code snippets | Any content type (source of truth) | | Token optimization | Consistent \~3k tokens/query | Adaptive 500-5k tokens/query | | Tools | `resolve-library-id`, `query-docs` | `ref_search_documentation`, `ref_read_url` | | Scrape any URL on the fly | No | Yes | | Private repos | Paid add-on | Included | | PDF & file upload | No | Yes | | Repo indexing | Paid | Free | | Prompt injection protection | In-house | [Centure.ai](https://centure.ai/) | | Paid plan | \$10/mo for 500 queries | \$9/mo for 1,000 queries | ## Search Philosophy Both Context7 and Ref now use stateful sessions to optimize token usage and avoid duplicate results. Where they differ is in search patterns and feature depth. ### Context7's Approach Context7 asks your agent to pick a library and then query that library's docs. **Strengths:** * Pre-processed code snippets * One of the most popular MCP servers showing why MCP is valuable **Limitations:** * Batch retrieval doesn't match iterative agent/human search patterns * Limited to snippets from public documentation—no private repos, PDFs, or file uploads without paid upgrades ### Ref's Approach Ref uses **agentic search with MCP sessions**: provides search() and read() tools, allowing agents to: 1. Issue queries and get result overviews 2. Selectively read only relevant documents 3. Iterate efficiently with session state Ref emphasizes **source of truth** access so agents can read any content from docs (explanations, warnings, prose, code), not just pre-extracted code snippets. This prevents information loss from pre-processing while still returning only the relevant chunks needed. **Session-powered improvements:** * **Adaptive token usage** - agents choose which pages to read, so simple queries return only what's needed while complex queries can dig deeper * **Never return same link twice** - agents can access prior results from context * **On-the-fly extraction** - automatically filter large pages (e.g., 90K token Figma docs → 5K relevant tokens) * **Pre-fetching** - results are cached for faster reads ## Why Token Efficiency Matters Both servers optimize for **token usage** because: * Tokens cost money * [Context rot](https://research.trychroma.com/context-rot): irrelevant tokens degrade output quality * Agents build context over multiple searches, so session-level metrics matter more than single-query precision ## Why Ref Wins **2x the value:** \$9/month gets you 1,000 queries on Ref vs. 500 queries for \$10/month on Context7. That's more than double the queries per dollar. **Agent-controlled retrieval:** Ref lets your agent decide which pages to read, adapting token usage to the task at hand. Context7 returns fixed batches—the agent only picks a library, then gets whatever the system decides to send back. **Source of truth access:** Ref can retrieve any content type from documentation—explanatory text, warnings, prose, and code—returning only the relevant chunks needed. Context7 limits results to pre-extracted code snippets, which can miss important context and explanations. **More sources, no extra cost:** Ref includes private GitHub repos, PDF indexing, and file uploads in the base plan. Context7 charges extra for private repos and doesn't support PDFs or file uploads at all. **Free repo indexing:** Index your own repositories at no additional cost. Context7 charges for this feature. **Matches how agents work:** Ref's search + read tools align with how frontier models are trained. OpenAI explicitly requires this pattern for Deep Research integration, signaling this is the future of agentic search. **Prompt injection protection:** Ref uses [Centure.ai](https://centure.ai/) to detect and block prompt injection attacks in real-time. When your agent scrapes external websites or processes user-uploaded content, Centure's multi-modal analysis protects against malicious instructions embedded in text, images, or other data sources. **Enterprise-ready:** Built-in GitHub, PDF, and Markdown indexing with team RBAC, no custom pipelines required. ## Learn more Learn more about [how Ref evaluates agentic search](https://ref.tools/blog/how-make-search-good) and [how Ref leverages advanced MCP features](https://ref.tools/blog/how-does-ref-mcp) from the blog. # Best Practices Source: https://docs.ref.tools/context/getting-started/best-practices How to prompt coding agents to use Ref effectively. ## TLDR 1. **Use the provided `search_docs` and `my_docs` prompts** - When you know your prompt will require working with a tricky library, use Ref's default prompts. 2. **Guide the model with rules files** - Set up a project rules file so the model always knows when you want it to use Ref. # How coding agents use Ref Coding agents leverage Ref's MCP tools to access documentation at the right moment. Understanding when and how agents use Ref helps you guide them more effectively. ### 1. When explicitly guided by the user Agents use Ref when you explicitly instruct them to search documentation. This is the most reliable way to ensure agents access the latest docs. **Example prompts:** * `implement cors in my firebase functions, check docs with ref` * `/Ref:search_docs langchain streaming callback handler implementation python` * `look up how i explained ref.tools in my yc application in my private docs` **Ref's built-in prompts:** Ref provides two autocomplete prompts in compatible clients: * **`search_docs`** - Guides agents to search public documentation * **`my_docs`** - Directs agents to search your [private resources](/resources) Typing `/Ref` and your IDE or CLI will autocomplete these prompts. ### 2. When encountering lint errors When a coding agent detects errors related to library or API usage, they will search Ref for documentation without user guidance. **Example flow:** 1. Agent hallucinates a function name that doesn't exist. 2. Linter flags the error. 3. Agent searches relevant documentation and applies the correct pattern. The best way to encourage this behavior is with a simple prompt in an `AGENTS.md` or similar file. # Guiding Agents with Rules Files Rules files let you provide consistent instructions to coding agents. They're especially powerful for directing agents to use Ref automatically. ### Example Rules File Content Rules files typically include project-specific instructions that guide AI agents in how to work with your codebase. For Ref integration, they should specify when and how to search documentation. They should generally be simple and direct. **✅ Recommended for everyone** It's helpful to provide a basic level of guidance to the agent that you want it to check docs with Ref. ``` When working with libraries, check the docs with Ref. ``` **✅ For sharing context between repos** Ref is great for sharing context between repos. For example if you have microservices or client-server in different repos. ```markdown theme={null} When working with APIs, search my private docs with Ref. ``` **❌ Do not over-prompt** It's very unlikely your agent would need to search with Ref on every prompt. ```markdown theme={null} Always start by checking the docs with Ref. ``` ### Rules Files Different AI coding tools support different rules file formats: | File | Location | Supported Tools | Description | | ------------------------- | -------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `AGENTS.md` | Project root | Cline, Windsurf, Roo Code, Goose, and other MCP-compatible tools | Vendor-neutral instructions file that works across multiple AI coding assistants | | `.cursorrules` | Project root | Cursor (legacy) | Legacy rules file for Cursor IDE | | `.cursor/rules/` | `.cursor/rules/` directory | Cursor | Recommended location for Cursor rules files | | `CLAUDE.md` | Project root | Claude Code, Claude API integrations | Claude-specific instructions with tool-specific guidance | | `.windsurfrules` | Project root | Windsurf | Windsurf Cascade-specific rules | | `copilot-instructions.md` | `.github/` directory | GitHub Copilot | GitHub Copilot-specific instructions | **Recommendation:** For maximum compatibility, use `AGENTS.md` as your primary rules file. It's supported by most modern AI coding tools that implement MCP or read standard project files. ## Next Steps Build your own custom index of private documentation sources for you or your team. # Intro to Ref Source: https://docs.ref.tools/context/getting-started/intro Ref MCP in one page. Ref is a documentation search model MCP server that allows coding agents to search public and private docs. Imagine your coding agent never made mistakes working with libraries (either public or private) and did it without blowing up the context window. The agent can always go find the exact snippet of documentation it needs to be successful. That's what Ref is built to do. Ref diagram Install and try the Ref MCP server. How to get the most out of Ref. # What is MCP? Source: https://docs.ref.tools/context/getting-started/mcp-overview Understanding the Model Context Protocol and why it matters for AI coding agents. ## The Model Context Protocol The **Model Context Protocol (MCP)** is an open standard that enables AI coding agents to connect with external tools, data sources, and services. Think of it as a universal translator that lets your AI assistant reach beyond its training data to access the specific information it needs, when it needs it. Introduced by Anthropic in November 2024, MCP provides a standardized way for AI models to interact with the real world—reading files, querying databases, searching documentation, and executing tools—all through a common protocol. ## Why MCP Matters for Coding Agents ### The Documentation Problem Modern development involves countless libraries, frameworks, and APIs. No AI model can memorize every API endpoint, every configuration option, or every recent update to every library. Traditional approaches either: 1. **Cram everything into the prompt** - This wastes tokens, blows up context windows, and still misses the exact information needed 2. **Hope the training data is current** - Models inevitably work with outdated information and hallucinate deprecated APIs ### The MCP Solution MCP solves this by giving coding agents **just-in-time access** to accurate, up-to-date information: * **Search documentation on-demand** - Find the exact code snippet or API reference needed for the current task * **Access private resources** - Read your company's internal docs, not just public information * **Stay current** - Always get the latest documentation, not what was known at training time * **Preserve context** - Use tokens for reasoning instead of documentation **The result?** Coding agents that make fewer mistakes, write better code, and never need to guess about API syntax or configuration options. ## MCP in Action with Ref Ref is an MCP server specifically built for documentation search. It gives coding agents the ability to: * **Search public documentation** - React, Next.js, Python, Go, and thousands of other libraries * **Search private documentation** - Your team's internal docs, private repos, and custom APIs * **Get precise answers** - Find the exact code snippet or configuration example needed * **Stay up-to-date** - Always access the latest documentation versions Instead of guessing about how to use a library, coding agents can simply ask Ref and get the authoritative answer. ## Learn More Want to dive deeper into MCP? Check out these resources: * [Official MCP Documentation](https://modelcontextprotocol.io) - The complete specification and guides * [MCP Specification](https://modelcontextprotocol.io/specification/2024-11-05/index) - Technical details of the protocol * [Visual Guide to MCP](https://block.github.io/goose/blog/2025/04/10/visual-guide-mcp/) - A beginner-friendly explanation with diagrams Install the Ref MCP server and see it in action. Explore the tools and capabilities Ref provides. # Quick Start Source: https://docs.ref.tools/context/getting-started/quick-start Steps to get started with Ref. ## 1. Sign up Sign up at [ref.tools/signup](https://ref.tools/signup) to create your account. ## 2. Install the MCP server Follow the installation instructions at [ref.tools/install](https://ref.tools/install) with prepopulated API key. Alternately, we provide [instructions for many different clients](/install#installation-guides). ## 3. Run a search Ask your agent to search for documentation: ``` what is ref tools mcp, search the docs with ref ``` Confirm that the `ref_search_documentation` tool is called and returns relevant results. ## Next steps How to get the most out of Ref. # Amp Source: https://docs.ref.tools/context/install/amp Connect Amp to up-to-date and token-efficient documentation. How to set up Ref with [Amp CLI](https://ampcode.com/manual#mcp). ## Install Run the `claude` install command. You can copy a version of the command with your API key pre-populated at [ref.tools/install](https://ref.tools/install) ``` amp mcp add Ref https://api.ref.tools/mcp --header "x-ref-api-key: " ``` You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Verify Run the command: ``` claude mcp doctor ``` You should see: ``` ➜ amp mcp doctor User settings: Workspace settings: Ref (user settings): connected (2 tools: ref_search_documentation, ref_read_url) ``` ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Antigravity Source: https://docs.ref.tools/context/install/antigravity Connect Antigravity to up-to-date and token-efficient documentation. [Antigravity MCP docs](https://antigravity.google/docs/mcp) You can find your Ref API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open Agent Chat. 2. Click the `...` Additional options button and select `MCP Servers` 3. Click `Manage MCP Servers`. This should open an editor tab called `Managed MCPS` 4. Update `mcp_config.json` ```mcp_config.json theme={null} { "mcpServers": { "ref": { "serverUrl": "https://api.ref.tools/mcp", "headers": { "x-ref-api-key": "" } } } } ``` ## Verify Go back to the `Manage MCP Servers` page and hit `Refresh` You should see Ref with a green dot. It should say `2 tools, 2 prompts enabled`. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Augment Source: https://docs.ref.tools/context/install/augment Connect Augment to up-to-date and token-efficient documentation. [Augment MCP docs](https://docs.augmentcode.com/setup-augment/mcp) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open `Augment Settings`. This can be done either from the VSCode command palette or the gear icon in Augment. 2. Under `Tools`, click `Add remote MCP`. 3. Update the settings to `Connection Type = HTTP` and `Authentication Type = Header`. 4. Fill in `Url` as `https://api.ref.tools/mcp` and add a header `x-ref-api-key` with your api key as the value. 5. Click `Add`. ## Verify See the Ref server present with a green dot. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # ChatGPT Source: https://docs.ref.tools/context/install/chatgpt Connect ChatGPT to up-to-date and token-efficient documentation. [ChatGPT MCP docs](https://platform.openai.com/docs/mcp) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open `Settings` 2. Click `Apps & Connectors` 3. If you are not already in developer mode, scroll to the bottom and click `Advanced settings` and toggle on Developer mode. 4. Click the `Create` button in the top right of the settings modal. 5. Fill in Name as `Ref` 6. Fill in MCP Server URL `https://api.ref.tools/mcp?apiKey=` 7. Under Authentication select `No authentication`. Your API key is set in the server url already. 8. Check the `I understand` box and click Create. ## Verify 1. To use Ref, click the `+` button in the left of the prompt input, go to `More` and select `Ref`. 2. Issue the following prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Claude Code Source: https://docs.ref.tools/context/install/claude-code Connect Claude Code to up-to-date and token-efficient documentation. How to set up Ref with [Claude Code](https://www.claude.com/product/claude-code). ## Install Run the `claude` install command. You can copy a version of the command with your API key pre-populated at [ref.tools/install](https://ref.tools/install) ``` claude mcp add --transport http Ref https://api.ref.tools/mcp --header "x-ref-api-key: " ``` You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Verify Run the command: ``` claude mcp list ``` You should see: ``` ➜ claude mcp list Ref: https://api.ref.tools/mcp (HTTP) ``` ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Claude Desktop and Web Source: https://docs.ref.tools/context/install/claude-desktop Connect Claude Desktop and Web to up-to-date and token-efficient documentation. You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open `Settings` 2. Click `Connectors` 3. Click `Add custom connector` 4. Fill in Name as `Ref` 5. Fill in Remote MCP Server URL `https://api.ref.tools/mcp?apiKey=` ## Verify Start a new chat and issue the following prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Cline Source: https://docs.ref.tools/context/install/cline Connect Cline to up-to-date and token-efficient documentation. [Cline MCP docs](https://docs.cline.bot/mcp/configuring-mcp-servers) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open Cline plugin in VSCode and click the `MCP Servers` button at the top. 2. Select the `Configure` tab and click `Configure MCP Servers`. This should open `cline_mcp_settings.json`. 3. Update `cline_mcp_settings.json` ``` { "mcpServers": { "Ref": { "command": "npx", "args": ["ref-tools-mcp@latest"], "env": { "REF_API_KEY": "" } } } } ``` ## Verify Open a new chat with Cline and run the following prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Codex CLI Source: https://docs.ref.tools/context/install/codex Connect Codex CLI to up-to-date and token-efficient documentation. *Updated Oct 14, 2025* [Codex MCP install docs](https://github.com/openai/codex/blob/main/docs/config.md#connecting-to-mcp-servers) You can find your Ref API key at [ref.tools/keys](https://ref.tools/keys) ## Install Codex is configured in a `config.toml` file. This typically lives at `~/.codex/config.toml` To enable Ref update your `config.toml` to include: ```config.toml theme={null} [mcp_servers.ref] url = "https://api.ref.tools/mcp?apiKey=" ``` If you are on an older version of Codex and you get the error `Error loading configuration: missing field 'command' in 'mcp_servers.ref'` and do not want to update, you can install the `stdio` server: ```config.toml theme={null} [mcp_servers.ref] command = "npx" args = ["-y", "ref-tools-mcp@latest"] env = { "REF_API_KEY" = "" } ``` ## Verify Run the command: ``` codex mcp list ``` You should see: ``` ➜ codex mcp list Name Url Bearer Token Env Var Status Auth ref https://api.ref.tools/mcp?apiKey=. - enabled Unsupporte ``` ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Cursor Source: https://docs.ref.tools/context/install/cursor Connect Cursor to up-to-date and token-efficient documentation. [Cursor MCP docs](https://cursor.com/docs/context/mcp) You can find your Ref API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps Installing in Cursor is as easy as 1-click. Visit [ref.tools/install]() You can also manually install via Cursor's settings. 1. Open `Cursor Settings` 2. Click `Tools & MCP` 3. Click `New MCP Server`. This will open an `mcp.json` file. 4. Update `mcp.json` ```mcp.json theme={null} { "mcpServers": { "Ref": { "type": "http", "url": "https://api.ref.tools/mcp", "headers": { "x-ref-api-key": "your-api-key" } } } } ``` ## Verify In `Cursor Settings` click `Tools & MCP`. You should see Ref with a green dot. It should say `2 tools, 2 prompts enabled`. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Devin Source: https://docs.ref.tools/context/install/devin Connect Devin to up-to-date and token-efficient documentation. [Devin MCP Marketplace docs](https://docs.devin.ai/work-with-devin/mcp) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Log into Devin and visit [https://app.devin.ai/settings/mcp-marketplace](https://app.devin.ai/settings/mcp-marketplace) 2. Search `Ref.tools` and select Ref from the results. 3. Enter your API key and click `Enable` and enable the integration. ## Verify Open a new chat and run the following prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Droid CLI Source: https://docs.ref.tools/context/install/droid-cli Connect Factory Droid CLI to up-to-date and token-efficient documentation. *Updated Oct 20, 2025* [Droid CLI MCP install docs](https://docs.factory.ai/cli/configuration/mcp) You can find your Ref API key at [ref.tools/keys](https://ref.tools/keys) ## Install Start Droid ``` droid ``` Run the `/mcp` command ``` /mcp add --type http Ref "https://api.ref.tools/mcp?apiKey=" ``` ## Verify Start Droid: ``` droid ``` Run the `/mcp` command in the Droid TUI ``` /mcp list ``` You should see: ``` ● Configured MCP servers: Ref Type: http URL: https://api.ref.tools/mcp?apiKey=ref-3be3e42726eaebd3b8b7 ``` ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Gemini CLI Source: https://docs.ref.tools/context/install/gemini-cli Connect Gemini CLI to up-to-date and token-efficient documentation. [Gemini CLI Docs](https://github.com/google-gemini/gemini-cli) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps Gemini CLI is configured through a `settings.json` file, typically found at `~/.gemini/settings.json`. To enable Ref, update `settings.json`: ```settings.json theme={null} { "mcpServers": { "ref": { "httpUrl": "https://api.ref.tools/mcp?apiKey=" } } } ``` ## Verify Run the command: ``` gemini mcp list ``` You should see: ``` ➜ gemini mcp list ✓ ref: https://api.ref.tools/mcp?apiKey= (http) - Connected ``` ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Goose Source: https://docs.ref.tools/context/install/goose Connect Goose to up-to-date and token-efficient documentation. [Goose Extensions docs](https://block.github.io/goose/docs/getting-started/using-extensions) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Click the `Extensions` button in the left side nav. 2. Click `Add custom extension` 3. Fill in Extension Name as `Ref` 4. Fill in Endpoint as `https://api.ref.tools/mcp` 5. Add a Request Header `x-ref-api-key` with value being your API key. 6. IMPORTANT: make sure you hit "+ Add" next to the request header to ensure it is actually added. 7. Click `Add extension` ## Verify Open a new chat and issue the prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Installation Source: https://docs.ref.tools/context/install/index Install Ref in your preferred coding environment ## About Ref's MCP Server Ref runs as a **streamable HTTP server** that implements the Model Context Protocol (MCP). This means you can connect to Ref's documentation search capabilities from any MCP-compatible client without installing additional packages locally. ### Authentication Ref's API accepts authentication in three ways: 1. **As a header**: `x-ref-api-key: YOUR_API_KEY` 2. **As a query parameter**: `?apiKey=YOUR_API_KEY` 3. **OAuth**: Include neither header or query param and your MCP client will initiate OAuth sign-in. The streamable HTTP endpoint is available at `https://api.ref.tools/mcp`. You can find your API key at [ref.tools/keys](https://ref.tools/keys) ### OAuth and Teams If you use OAuth in combination with [Teams](/usage/teams), you may need to specify the team you want Ref to access. Ref will do it's best to intelligently pick the correct team but you may want to manually force a specific team. Here is the algorithm Ref uses to pick the user or team scope: ``` For base OAuth url https://api.ref.tools/mcp if the user belongs to: - no teams -> user scope - one team -> team scope for the users single team - multiple teams -> user scope, require specifying team When specifying scope in OAuth url https://api.ref.tools/mcp?scope=(user|{team_id}) - scope=user -> user scope - scope={team_id} -> team scope ``` Team ids have the format `t-`. You can find the team OAuth url at [ref.tools/install](https://ref.tools/install) *** ## Installation Guides Choose your coding environment below to get started: Connect Cursor to up-to-date and token-efficient documentation. Connect Claude Code to up-to-date and token-efficient documentation. Connect Claude Desktop and Web to up-to-date and token-efficient documentation. Connect VS Code to up-to-date and token-efficient documentation. Connect Antigravity to up-to-date and token-efficient documentation. Connect Windsurf to up-to-date and token-efficient documentation. Connect Cline to up-to-date and token-efficient documentation. Connect Kiro to up-to-date and token-efficient documentation. Connect Roo Code to up-to-date and token-efficient documentation. Connect Goose to up-to-date and token-efficient documentation. Connect Amp to up-to-date and token-efficient documentation. Connect Augment to up-to-date and token-efficient documentation. Connect ChatGPT to up-to-date and token-efficient documentation. Connect Devin to up-to-date and token-efficient documentation. Connect OpenCode to up-to-date and token-efficient documentation. Connect Codex CLI to up-to-date and token-efficient documentation. Connect Factory Droid CLI to up-to-date and token-efficient documentation. Connect Gemini CLI to up-to-date and token-efficient documentation. # Kiro Source: https://docs.ref.tools/context/install/kiro Connect Kiro to up-to-date and token-efficient documentation. [Kiro MCP configuration docs](https://kiro.dev/docs/mcp/configuration/) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps Option 1: Click this link. Add Ref to Kiro Make sure you update `disabled: false` and fill in your API key. Option 2: Manual install. 1. Open the Kiro left side panel via the Kiro ghost icon. 2. At the bottom, see the `MCP SERVERS` sections and mouse over it to see the `Open MCP Config` button. This will open `mcp.json` 3. Update `mcp.json` as follows: ```json theme={null} { "mcpServers": { "Ref": { "url": "https://api.ref.tools/mcp", "headers": { "x-ref-api-key": "" }, "disabled": false, "autoApprove": ["ref_search_documentation", "ref_read_url"] } } } ``` ## Verify 1. Open the MCP Server view in the Kiro feature panel 2. You should see `Ref` listed with a green status indicator 3. Start a new chat and issue the following prompt: ``` what is ref tools mcp, search the docs with ref ``` This should result in a `ref_search_documentation` tool call being executed. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # OpenCode Source: https://docs.ref.tools/context/install/opencode Connect OpenCode to up-to-date and token-efficient documentation. [Opencode MCP docs](https://opencode.ai/docs/mcp-servers/) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Create an `opencode.jsonc` file in your project that matches the following: ``` { "$schema": "https://opencode.ai/config.json", "mcp": { "Ref": { "type": "remote", "url": "https://api.ref.tools/mcp", "enabled": true, "headers": { "x-ref-api-key": "YOUR_API_KEY" } } } } ``` ## Verify Open a new chat and issue the prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Roo Code Source: https://docs.ref.tools/context/install/roo-code Connect Roo Code to up-to-date and token-efficient documentation. [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Click the `...` icon in the top right to expand additional menu items and selecte `MCP Servers` 2. Click either `Edit Global MCP` or `Edit Project MCP`. 3. Update the json file that is opened to match the following. ``` { "mcpServers": { "Ref": { "type": "streamable-http", "url": "https://api.ref.tools/mcp", "headers": { "X-ref-API-Key": "" } } } } ``` ## Verify Open a new chat and issue the prompt. ``` what is ref tools mcp, search the docs with ref ``` This should results in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # VS Code Source: https://docs.ref.tools/context/install/vscode Connect VS Code to up-to-date and token-efficient documentation. [VSCode MCP docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open the VSCode command palette `Shift + Command + P (Mac)` or `Ctrl + Shift + P (Windows/Linux)` 2. Type `mcp` and select the `MCP: Add server...` action. 3. Select the `HTTP` option. 4. Enter Server URL `https://api.ref.tools/mcp?apiKey=` 5. Enter Server ID `Ref` At this point the server should be installed. ## Verify 1. Open the Chat UI. 2. In the chat input box, you should see a tools icon next to the send message icon. Click it. 3. This should open the `Configure Tools` menu. At the bottom of the list, you should see `MCP Server: Ref` with two tools enabled. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Windsurf Source: https://docs.ref.tools/context/install/windsurf Connect Windsurf to up-to-date and token-efficient documentation. [Windsurf Cascade MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open the `mcp_config.json` file. This can be found at a path like `~/.codium/windsurf/mcp_config.json` or by opening Cascade Chat and clicking the `Customizations` icon (looks like a packing box) in the top right then clicking the settings button. 2. Update `mcp_config.json` as follows: ``` { "mcpServers": { "Ref": { "command": "npx", "args": ["ref-tools-mcp@latest"], "env": { "REF_API_KEY": "" } } } } ``` ## Verify Click the Cascade Chat Customizations button and see that Ref is active with 2 tools. If it is not, you can click on `Ref` and click the `Refresh` button on the Manage MCPs page to refresh MCPs. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Zed Source: https://docs.ref.tools/context/install/zed Connect Zed to up-to-date and token-efficient documentation. [Zed MCP docs](https://zed.dev/docs/ai/mcp) You can find your API key at [ref.tools/keys](https://ref.tools/keys) ## Install Steps 1. Open the agent thread UI in right dock with `cmd + R`. 2. In the top right, click the `...` icon and under MCP Servers, select `Add Custom Server...`. This should open the `Add MCP Server` modal. 3. In the bottom left of the modal click `Configure Remote` server. 4. Replace the entire content of the input JSON with the following and click `Add Server`. ```json theme={null} { "Ref": { "url": "https://api.ref.tools/mcp?apiKey=" } } ``` ## Verify 1. Open a new thread in the agent thread panel and select the `...` settings icon then click `Settings`. 2. You should see Ref enabled in the Model Context Protocol (MCP) Servers section. ## Using Ref in Zed You can use the built in auto-complete prompt `/search_docs` to search documentation with Ref. Example prompt: ``` /search_docs what is ref tools mcp server ``` This should result in a `ref_search_documentation` tool call. ## Get help If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started! # Prompts Source: https://docs.ref.tools/context/mcp/prompts Pre-configured prompts available through the Ref MCP Server. The Ref MCP Server includes pre-configured prompts to help you work more effectively with your documentation. These prompts follow the [MCP Prompts specification](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts) and provide structured ways to search and access your documentation. ## Available Prompts ### `search_docs` Guides your coding agent to search public documentation for libraries, frameworks, and APIs. **Example usage:** ``` /Ref:search_docs langchain streaming callback handler implementation python ``` ### `my_docs` Directs your coding agent to search your [private resources](/resources), including indexed GitHub repositories and uploaded documentation. **Example usage:** ``` /Ref:my_docs how we implement authentication in our backend ``` ## Using Prompts Prompts are designed to be **user-controlled** and are typically invoked through slash commands in your coding assistant. **To use a Ref prompt:** 1. Type `/Ref` in your coding assistant 2. Your IDE or CLI will autocomplete the available prompts 3. Select either `search_docs` or `my_docs` 4. Add your search query ## Best Practices For more information on how to effectively prompt coding agents to use Ref, see our [Best Practices guide](/context/getting-started/best-practices). # MCP Registry Source: https://docs.ref.tools/context/mcp/registry Include Ref in your MCP registry or subregistry ## What is the MCP Registry? The **MCP Registry** ([registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io)) is the official directory of MCP servers - like an app store for AI coding agents. It's community-owned and serves as the canonical source for publicly-available MCP servers. ## Building Subregistries Many organizations build **subregistries** that add value through curation, enhanced metadata, or focus on specific use cases. These subregistries typically: * Pull servers from the official registry via API * Add custom metadata, ratings, or curation * Serve specific communities or enterprise needs ## Including Ref in Your Registry **Ref** is available in the official MCP registry and provides essential documentation search capabilities for AI coding agents. ```title: Ref MCP registry name theme={null} tools.ref/ref-tools-mcp ``` ### Get Ref's Registry Data ```bash theme={null} curl "https://registry.modelcontextprotocol.io/v0/servers?search=tools.ref/ref-tools-mcp" ``` This returns Ref's complete server metadata that you can import into your own registry. ## Resources * **Official Registry**: [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io) * **Registry API**: [REST API Documentation](https://github.com/modelcontextprotocol/registry/blob/main/docs/guides/consuming/use-rest-api.md) * **Build Your Own**: [Registry Implementation Guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/README.md) Explore all available MCP servers. View Ref's source code and documentation. # Tools Source: https://docs.ref.tools/context/mcp/tools Available tools in the Ref MCP Server. The Ref MCP Server provides powerful tools for searching and retrieving documentation. ## Available Tools ### `ref_search_documentation` Search across your indexed documentation resources. **Parameters:** * `query` (string): Your search query. Include programming language, framework, or library names for best results. ### `ref_read_url` Read the full content of a documentation URL. Can read URLs from search results or any URL from the web. **Parameters:** * `url` (string): The exact URL from a search result. ## Best Practices For more information on how to effectively prompt coding agents to use Ref, see our [Best Practices guide](/context/getting-started/best-practices). # GitHub Source: https://docs.ref.tools/context/resources/github Connect repos and control sync. Manage your synced repos at [ref.tools/resources?tab=github](https://ref.tools/resources?tab=github) ## Which repos can I index? * You may only index repos that you are a member of. * If you would like a public repo indexed that is not already, [fill out the form here](https://tally.so/r/nrvBY2). ## What files are indexed? * Small repos below 2,000 files index every file, including code files. * Repos above 2,000 files index documentation files only. ## Synchronization * Repos are synced on a 5 minute cron. * Indexing is incremental so Ref will compare the current commit to the most recently indexed commit. This means if you modify the git history for your repo, indexing could fail and you will need to remove and re-add the repo from Ref. ## Authentication * Ref uses personal access tokens to find and access your private repos. * Adding a GitHub App for organizations is on the roadmap but not yet supported. # Resources Overview Source: https://docs.ref.tools/context/resources/overview Connect your private documentation sources to Ref. Ref allows you or your team to build a private index of context for your coding agent. We refer to each of these sources of context as `Resources`. View your individual or team resources at [ref.tools/resources](https://ref.tools/resources) ## Available Resource Types ### GitHub Repositories Connect your GitHub repositories to automatically index and sync documentation and code. [Learn more about GitHub indexing →](/resources/github) ### PDF & Markdown Files Upload documentation files directly to Ref. [Learn more about PDF & Markdown uploads →](/resources/pdf-markdown) # PDF & Markdown Source: https://docs.ref.tools/context/resources/pdf-markdown Upload docs outside GitHub. Manage your PDF & Markdown files at [ref.tools/resources?tab=pdf](https://ref.tools/resources?tab=pdf) ## What can you upload? * Upload any `*.pdf` or `*.md` files. They will be automcatically chunked and indexed. * The hard files size limit is 100MB per file. * If upload is failing with less than 100MB files, try breaking down the files into smaller peices. We've seen this be necessary for some users will medium size files and poor to mediocre internet connects. ## Roadmap * Long-term we would like this experience to feel like Google Drive where you can easily manage files. # Dashboard Source: https://docs.ref.tools/getting-started/dashboard Key widgets to watch. ## First Login * Complete email verification if prompted. * Review the onboarding steps for install and sample prompt. ## Action Cards * `Quick Install` opens direct MCP client links. * `Search Documentation` runs live searches across indexed sources. * `Add Resources` launches GitHub and PDF indexing flows. * `Usage & Credits` shows daily spend and endpoint counts. ## Usage Drilldown * The usage table lists every credit transaction. * Filters separate search, read, chat, and web calls. * Export data for audits by copying the table into CSV. ## Team Alerts * Pending invites surface inline with accept and decline. * Teams with low credits trigger upgrade prompts. * The `Add members` card routes to role management. ## Quick Recovery * The snackbar toast log keeps recent system messages. * Use it to confirm new API keys or bulk imports. # Welcome! Source: https://docs.ref.tools/index Everything you need to know about Ref — documentation search and plan orchestration for coding agents. ## Ref Plans The shared source of truth for AI-generated software: create the plan, align the team, and orchestrate agents from one place. Overview of what Ref Plans is and how it works. Create your first plan and send it to an agent. ## Ref Context Search public and private documentation from any MCP-compatible coding agent. Overview of what Ref Context is and why you might use it. Install the Ref MCP server and try it yourself. # Ref Plans Source: https://docs.ref.tools/plans/beta Overview of Ref Plans and information for beta users Thank you for your interest in [https://plan.ref.tools](https://plan.ref.tools)! # TLDR; What is this? Ref Plans is a tool for iterating and collaborating on plans for coding agents. It's a place for context engineering and orchestration. You can research, revise and share plans with other humans for feedback. When a plan is ready, send it to your coding agent of choice (Claude Code, Cursor, Codex, Conductor etc) to implement and that agent will report progress back to Ref. It works great for large or complex plans that go beyond a single commit. # How to get started 1. Signup for Ref [https://ref.tools/signup](https://ref.tools/signup) 2. *(Optional but recommended)* Connect your GitHub and repos to the index [https://ref.tools/resources?tab=github](https://ref.tools/resources?tab=github) 3. Visit [https://plan.ref.tools](https://plan.ref.tools) to create your first plan. 4. Iterate on the Plan yourself and with Ref's agent cloud Claude Code then send it to a coding agent to implement. # I am a \_\_\_\_. How do I use Plans? Ref Plans is flexible and meant for teams. How you use it depends on your role. ## Early-career — Research and learn Your main job is learning and developing your taste as an engineer. You practice these skills in Ref by researching and writing implementation plans then asking teammates for feedback. You work with AI to create a plan and spend your time considering the design choices and checking assumptions. This is how you learn and advance in your career. ## Senior / Staff — Orchestrate complex projects You're juggling as many agents as possible while also supporting junior engineers. You use Ref to manage complex projects spanning multiple days in parallel without going insane. You provide feedback on other engineers' Plans to help them learn and to avoid slop code review. ## Tech Lead / Manager — Guide the organization You need to help a team of engineers operate with high through-put with AI while maintaining coherence towards company objectives. You use Ref Plans as basis for organizational process around Plan review and to have a single view into all of the team's work. ## Vibecoder — Scale context beyond single sessions You have tons of ideas and your project’s complexity is growing. You use Ref to maintain a single cohesive source of context across large projects. You research and refine your ideas in Ref and then dispatch multiple parallel agents to bring them into reality. # Quick Demo: My workflow with Plans Ref Plans is a tool for researching and writing Plans and orchestrating agents to implement them. It take `/plan` mode beyond single changes to multi-day, multi-PR arches of work. Here's a quick demo of my coding workflow with Ref Plans. I'm a solo developer so see below for more collaborative workflows.