/ Diretório / Playground / ref-tools-mcp
● Comunidade ref-tools ⚡ Instantâneo

ref-tools-mcp

por 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.

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

ref-tools.replay ▶ pronto
0/0

Instalar

Escolha seu cliente

~/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
    }
  }
}

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

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

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

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

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

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

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

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

O Continue usa um array de objetos de servidor em vez de um map.

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

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

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

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: ref-tools-mcp

How to stop the agent from hallucinating library APIs

👤 Coding agent users ⏱ ~10 min beginner

Quando usar: Agent confidently writes code that doesn't match the current library version.

Pré-requisitos
  • Ref account + REF_API_KEY — Sign up at ref.tools (or whatever current Ref signup URL is)
Fluxo
  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.✓ Copiado
    → Search hits with URLs; code cites them
  2. Verify
    ref_read_url on the top hit to confirm the API shape.✓ Copiado
    → Clean markdown of the doc page

Resultado: Code that compiles against the actual library version.

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

How to search internal engineering docs / PDFs with an agent

👤 Platform teams with internal runbooks ⏱ ~15 min intermediate

Quando usar: Agent needs to follow company-specific patterns, not whatever StackOverflow says.

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

Resultado: Internal-standards-compliant output.

Armadilhas
  • 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

Quando usar: You want the article text without nav/ads/JS junk.

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

Resultado: Clean content, fast.

Combine com: markdownify

Combinações

Combine com outros MCPs para 10× de alavancagem

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.✓ Copiado
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.✓ Copiado

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
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

Custo e limites

O que custa rodar

Cota de API
Per Ref plan tier
Tokens por chamada
Search hits: 500-2000 tokens. URL reads: can be 5k-20k
Monetário
Ref is a paid service (free tier available); check current pricing
Dica
Search first, then read only the top hit — chained reads are expensive.

Segurança

Permissões, segredos, alcance

Escopos mínimos: REF_API_KEY stored in env
Armazenamento de credenciais: REF_API_KEY env var
Saída de dados: Queries go to Ref's service; it in turn hits public web and your indexed private sources
Nunca conceda: Don't share your workspace key broadly; use per-user keys if Ref supports them

Solução de problemas

Erros comuns e correções

401 Unauthorized

Missing or invalid REF_API_KEY.

Verificar: 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.

Alternativas

ref-tools-mcp vs. outros

AlternativaQuando usarTroca
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

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills