Ref MCP Server

Widget generated by MCP Showcase

Introduction

Ref is a documentation context provider built by ref.tools that connects AI coding agents to accurate, up-to-date technical documentation through the Model Context Protocol (MCP). The company's mission is to reduce hallucinations in AI-generated code by grounding agents in real documentation rather than outdated or invented knowledge.

The MCP server exposes two complementary tools focused on documentation retrieval. ref_search_documentation searches across public and private documentation sources—including web docs, GitHub repos, and PDFs—while ref_read_url reads the full content of any specific URL as clean markdown.

Together, these tools enable a search-then-read workflow: agents first find relevant documentation sections, then dive deep into specific pages for complete context. This helps developers get precise, current answers about frameworks, APIs, libraries, and their own private codebases without context bloat.

Use Cases

1. Finding framework-specific implementation guidance Search public documentation to get accurate syntax and best practices for a specific library or framework.

  • Sample prompt: Search the React documentation for how to use the useEffect hook with cleanup functions and show me the correct pattern.

2. Reading a specific documentation page in depth After locating a relevant doc, read its full content to extract detailed information and code examples.

  • Sample prompt: Read the full content of the Next.js App Router documentation page on server actions and summarize the setup steps for me.

3. Searching private repos and internal docs Query a team's private documentation, GitHub repos, or PDFs to ground agent work in existing conventions.

  • Sample prompt: Search our private docs (ref_src=private) for our internal authentication service setup and how to configure the OAuth PKCE flow.

4. Resolving API integration questions Look up specific API endpoints, parameters, and authentication requirements from official service documentation.

  • Sample prompt: Search the Stripe API documentation for how to create a subscription with a trial period, then read the exact endpoint reference.

5. Debugging with accurate, current documentation Prevent hallucinated fixes by pulling the latest official docs when troubleshooting an error.

  • Sample prompt: I'm getting a "hydration mismatch" error in my Next.js 14 app. Search the docs for the cause and read the recommended solution.

6. Comparing configuration options across versions Search for version-specific documentation to ensure code matches the exact library version in use.

  • Sample prompt: Search the Tailwind CSS v4 documentation for the new configuration format and show me how it differs from v3.

7. Following documentation links for deeper context Chain a search result into a full-page read to access content not surfaced in the initial search snippet.

  • Sample prompt: Search the PostgreSQL docs for JSONB indexing, then read the full page on GIN indexes to explain performance tradeoffs.

8. Onboarding to an unfamiliar codebase or tool Search private repos and PDFs to quickly understand an internal library's usage patterns.

  • Sample prompt: Search our private GitHub repo docs for how to use our internal logging SDK and read the getting-started guide.

Details

MCP Server URL:
https://api.ref.tools/mcp?apiKey=YOUR_API_KEY
Type:
HTTP Stream
Authentication:
API key in URL parameter

Tools

ref_search_documentation
Search for documentation on the web or github as well from private resources like repos and pdfs. Use Ref 'ref_read_url' to read the content of a url.
ref_read_url
Read the content of a url as markdown. The EXACT url from a 'ref_search_documentation' result (including the #hash) should be passed to this tool.

Want to create a similar playground for your MCP?