/ Directory / Playground / ref-tools-mcp
● Community ref-tools ⚡ Instant

ref-tools-mcp

by ref-tools · ref-tools/ref-tools-mcp

Help coding agents find the right docs fast — public libs, private repos, internal PDFs — without burning context on wrong pages.

ref-tools/ref-tools-mcp (by Ref) provides two tools: a focused documentation search across public web, GitHub repos, and your private resources, plus a markdown-returning URL reader. Requires a REF_API_KEY.

Why use it

Key features

Live Demo

What it looks like in practice

ref-tools.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "ref-tools": {
      "command": "npx",
      "args": [
        "-y",
        "ref-tools-mcp"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "ref-tools": {
      "command": "npx",
      "args": [
        "-y",
        "ref-tools-mcp"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "ref-tools": {
      "command": "npx",
      "args": [
        "-y",
        "ref-tools-mcp"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ref-tools": {
      "command": "npx",
      "args": [
        "-y",
        "ref-tools-mcp"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "ref-tools",
      "command": "npx",
      "args": [
        "-y",
        "ref-tools-mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "ref-tools": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "ref-tools-mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add ref-tools -- npx -y ref-tools-mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use ref-tools-mcp

How to stop the agent from hallucinating library APIs

👤 Coding agent users ⏱ ~10 min beginner

When to use: Agent confidently writes code that doesn't match the current library version.

Prerequisites
  • Ref account + REF_API_KEY — Sign up at ref.tools (or whatever current Ref signup URL is)
Flow
  1. Ask a question grounded in docs
    Use ref_search_documentation to find how to use Prisma raw SQL queries in v5, then write an example.✓ Copied
    → Search hits with URLs; code cites them
  2. Verify
    ref_read_url on the top hit to confirm the API shape.✓ Copied
    → Clean markdown of the doc page

Outcome: Code that compiles against the actual library version.

Pitfalls
  • Search returns outdated docs for deprecated v-X — Include the version in the query: 'Prisma v5 raw SQL'
Combine with: github

How to search internal engineering docs / PDFs with an agent

👤 Platform teams with internal runbooks ⏱ ~15 min intermediate

When to use: Agent needs to follow company-specific patterns, not whatever StackOverflow says.

Prerequisites
  • Ref private sources indexed — Upload repos/PDFs to your Ref workspace (see Ref docs)
Flow
  1. Scope search to private
    ref_search_documentation 'internal auth pattern' with private sources only.✓ Copied
    → Internal results only
  2. Read the runbook
    ref_read_url on the top internal result.✓ Copied
    → Clean text of the runbook

Outcome: Internal-standards-compliant output.

Pitfalls
  • Internal docs go stale — agent still cites them — Tell the agent to check 'last updated' metadata and flag old content

How to fetch arbitrary URLs as clean markdown

👤 Anyone doing research + summarization ⏱ ~5 min beginner

When to use: You want the article text without nav/ads/JS junk.

Flow
  1. Read the URL
    ref_read_url https://some-blog.com/post — give me clean markdown.✓ Copied
    → Body text as markdown
  2. Summarize
    Now give me a 5-bullet summary.✓ Copied
    → Summary

Outcome: Clean content, fast.

Combine with: markdownify

Combinations

Pair with other MCPs for X10 leverage

ref-tools + github

Ground a PR review with official docs citations

For the Prisma migration in PR #1234, use ref_search_documentation to verify each API matches v5 docs, then comment on the PR.✓ Copied
ref-tools + markdownify

Combine Ref's doc search with markdownify for local PDFs not in Ref

Search Ref for our internal auth guidance, then markdownify the additional /specs/auth-v3.pdf that isn't indexed yet.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
ref_search_documentation query: str, sources?: str[] Ground a library or internal-doc question 1 Ref API call
ref_read_url url: str Pull a page as clean markdown 1 Ref API call

Cost & Limits

What this costs to run

API quota
Per Ref plan tier
Tokens per call
Search hits: 500-2000 tokens. URL reads: can be 5k-20k
Monetary
Ref is a paid service (free tier available); check current pricing
Tip
Search first, then read only the top hit — chained reads are expensive.

Security

Permissions, secrets, blast radius

Minimum scopes: REF_API_KEY stored in env
Credential storage: REF_API_KEY env var
Data egress: Queries go to Ref's service; it in turn hits public web and your indexed private sources
Never grant: Don't share your workspace key broadly; use per-user keys if Ref supports them

Troubleshooting

Common errors and fixes

401 Unauthorized

Missing or invalid REF_API_KEY.

Verify: echo $REF_API_KEY
Search returns stale results

Private-source re-index may be delayed; force re-index from Ref dashboard.

ref_read_url returns empty

Some sites block scraping. Use webpage-to-markdown via markdownify as a fallback.

Quota exceeded

Upgrade Ref plan or space out search usage.

Alternatives

ref-tools-mcp vs others

AlternativeWhen to use it insteadTradeoff
Context7 MCPYou want free public-library docs retrievalNo private source indexing
Apple Docs MCP / pg-aiguideYou only care about a specific platform's docsScoped; not general-purpose

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills