/ Каталог / Песочница / ref-tools-mcp
● Сообщество ref-tools ⚡ Сразу

ref-tools-mcp

автор 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.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

ref-tools.replay ▶ готово
0/0

Установка

Выберите клиент

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

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

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

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

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

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

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

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

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

Continue использует массив объектов серверов, а не map.

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

Добавьте в context_servers. Zed перезагружается автоматически.

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

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: ref-tools-mcp

How to stop the agent from hallucinating library APIs

👤 Coding agent users ⏱ ~10 min beginner

Когда использовать: Agent confidently writes code that doesn't match the current library version.

Предварительные требования
  • Ref account + REF_API_KEY — Sign up at ref.tools (or whatever current Ref signup URL is)
Поток
  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.✓ Скопировано
    → Search hits with URLs; code cites them
  2. Verify
    ref_read_url on the top hit to confirm the API shape.✓ Скопировано
    → Clean markdown of the doc page

Итог: Code that compiles against the actual library version.

Подводные камни
  • Search returns outdated docs for deprecated v-X — Include the version in the query: 'Prisma v5 raw SQL'
Сочетать с: github

How to search internal engineering docs / PDFs with an agent

👤 Platform teams with internal runbooks ⏱ ~15 min intermediate

Когда использовать: Agent needs to follow company-specific patterns, not whatever StackOverflow says.

Предварительные требования
  • Ref private sources indexed — Upload repos/PDFs to your Ref workspace (see Ref docs)
Поток
  1. Scope search to private
    ref_search_documentation 'internal auth pattern' with private sources only.✓ Скопировано
    → Internal results only
  2. Read the runbook
    ref_read_url on the top internal result.✓ Скопировано
    → Clean text of the runbook

Итог: Internal-standards-compliant output.

Подводные камни
  • 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

Когда использовать: You want the article text without nav/ads/JS junk.

Поток
  1. Read the URL
    ref_read_url https://some-blog.com/post — give me clean markdown.✓ Скопировано
    → Body text as markdown
  2. Summarize
    Now give me a 5-bullet summary.✓ Скопировано
    → Summary

Итог: Clean content, fast.

Сочетать с: markdownify

Комбинации

Сочетайте с другими MCP — эффект x10

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.✓ Скопировано
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.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
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

Стоимость и лимиты

Во что обходится

Квота API
Per Ref plan tier
Токенов на вызов
Search hits: 500-2000 tokens. URL reads: can be 5k-20k
Деньги
Ref is a paid service (free tier available); check current pricing
Совет
Search first, then read only the top hit — chained reads are expensive.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: REF_API_KEY stored in env
Хранение учётных данных: REF_API_KEY env var
Исходящий трафик: Queries go to Ref's service; it in turn hits public web and your indexed private sources
Никогда не давайте: Don't share your workspace key broadly; use per-user keys if Ref supports them

Устранение неполадок

Частые ошибки и исправления

401 Unauthorized

Missing or invalid REF_API_KEY.

Проверить: 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.

Альтернативы

ref-tools-mcp в сравнении

АльтернативаКогда использоватьКомпромисс
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

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills