# Ref (MCP Server)

> Token-efficient documentation search for coding agents

- Type: MCP server
- Publisher: Ref (official)
- Categories: Development
- Website: https://docs.ref.tools/install
- Docs: https://docs.ref.tools/install
- Source: https://github.com/ref-tools/ref-tools-mcp
- Transport: streamable-http
- Server URL: https://api.ref.tools/mcp
- Launch command: npx ref-tools-mcp@latest
- Sign-in: api-key
- Environment variables: REF_API_KEY
- GitHub stars: 1175
- Listed: 2025-04-22

## About

Ref provides documentation search across public technical docs, GitHub and private sources such as repos and PDFs, returning concise results to save context. It is a hosted streamable HTTP server authenticated by API key or OAuth, with an optional local npx version.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://api.ref.tools/mcp as the MCP server URL. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add ref --url https://api.ref.tools/mcp --bearer-token-env-var REF_API_KEY
   ```

   config.toml:

   ```toml
   [mcp_servers.ref]
   url = "https://api.ref.tools/mcp"
   bearer_token_env_var = "REF_API_KEY"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "ref",
           "server_url": "https://api.ref.tools/mcp",
           "authorization": os.environ["REF_API_KEY"],
           "require_approval": "never",
       }],
       input="Look up the Stripe API for creating a subscription with a trial",
   )
   print(response.output_text)
   ```

## Tools

- `ref_search_documentation`
- `ref_read_url`

## Example prompts

- "Look up the Stripe API for creating a subscription with a trial"
- "Find the Next.js docs on server actions"
- "Read this documentation URL and summarize the config options"

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent

---
Source: https://chatgptplugins.directory/mcp/ref · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
