/ Каталог / Песочница / mcptools
● Сообщество f ⚡ Сразу

mcptools

автор f · f/mcptools

The Swiss Army knife for MCP developers — CLI to inspect, call, mock, proxy, and guard any MCP server.

mcptools (f/mcptools) is a Go CLI for interacting with MCP servers over stdio, HTTP, or SSE. Use it to list tools on a server, call them ad hoc, spin up mocks for testing, wrap shell scripts as MCP tools, or enforce access policies via guard. Think curl + jq + mitmproxy for the MCP ecosystem.

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

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

Живое демо

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

mcptools.replay ▶ готово
0/0

Установка

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

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcptools": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/f/mcptools"
      ],
      "_inferred": true
    }
  }
}

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

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcptools": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/f/mcptools"
      ],
      "_inferred": true
    }
  }
}

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

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcptools": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/f/mcptools"
      ],
      "_inferred": true
    }
  }
}

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

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcptools": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/f/mcptools"
      ],
      "_inferred": true
    }
  }
}

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

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcptools",
      "command": "TODO",
      "args": [
        "See README: https://github.com/f/mcptools"
      ]
    }
  ]
}

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

~/.config/zed/settings.json
{
  "context_servers": {
    "mcptools": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/f/mcptools"
        ]
      }
    }
  }
}

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

claude mcp add mcptools -- TODO 'See README: https://github.com/f/mcptools'

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

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

Реальные сценарии: mcptools

How to debug an MCP server with mcptools

👤 MCP server authors ⏱ ~15 min intermediate

Когда использовать: Your MCP works in Claude Desktop sometimes but fails silently — you need to see the raw wire traffic.

Предварительные требования
  • mcptools installed — brew install f/mcptools/mcp or go install github.com/f/mcptools/cmd/mcp@latest
Поток
  1. List tools on your server
    Run mcp tools --transport stdio -- node ./my-server.js. Check tool names and schemas.✓ Скопировано
    → Clean list; if empty, the server didn't advertise tools correctly
  2. Call a specific tool with raw args
    Run mcp call my_tool --params '{"x":1}' -- node ./my-server.js and inspect the JSON response.✓ Скопировано
    → Tool output matches expected schema
  3. Start an interactive shell
    Run mcp shell -- node ./my-server.js and call tools manually.✓ Скопировано
    → REPL with tab-complete over your tools

Итог: You see exactly what Claude sees — bugs that only reproduce in Claude become visible here.

Подводные камни
  • Server logs to stdout, corrupting the JSON-RPC stream — Route all logs to stderr. mcptools surfaces this — the hint is garbled JSON parse errors
  • Tool schema uses unsupported JSON Schema keywords — Stick to core draft-07; some clients reject $ref, allOf, etc.

Mock an MCP server to test an MCP client

👤 Client authors ⏱ ~20 min intermediate

Когда использовать: Your CI shouldn't depend on a real Sentry/GitHub server — you need a deterministic mock.

Поток
  1. Write a mock spec
    Create ./mock.yaml listing the tools you want to fake with canned responses.✓ Скопировано
    → YAML describing tool names + output templates
  2. Run mcp mock
    Run mcp mock --config ./mock.yaml --transport stdio and point your client at it.✓ Скопировано
    → Client sees a fully populated tool list; calls return canned data

Итог: Hermetic tests that pass on airgapped CI.

Expose a shell command as an MCP tool without writing a server

👤 Ops, DIY hackers ⏱ ~10 min beginner

Когда использовать: You have a handy shell script and want Claude to call it — but writing a full MCP server feels overkill.

Поток
  1. Wrap the script
    Run mcp proxy register disk_usage --command 'df -h' and confirm it's advertised.✓ Скопировано
    → Tool disk_usage registered
  2. Point Claude at mcp proxy
    Configure Claude's mcpServers with mcp proxy serve.✓ Скопировано
    → Claude can call disk_usage and gets the df output

Итог: Zero-code MCP tools for quick automations.

Подводные камни
  • Exposing unrestricted shell is a foot-gun — Use mcp guard to whitelist specific commands; never expose bash -c

Enforce allow/deny policies on an upstream MCP with mcptools guard

👤 Security-minded teams using third-party MCPs ⏱ ~20 min advanced

Когда использовать: You trust GitHub MCP for reads but don't want agents to create issues or delete branches.

Поток
  1. Write a policy
    Create a guard policy that allows list_* and get_* tools but denies everything else on the github server.✓ Скопировано
    → Policy file with explicit rules
  2. Run guard
    Run mcp guard --policy ./policy.yaml -- npx -y @modelcontextprotocol/server-github and point Claude at guard instead of the server directly.✓ Скопировано
    → Denied calls return a clear error, allowed calls proxy through

Итог: A read-only façade in front of a powerful server — safer defaults.

Комбинации

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

mcptools + hyper

Debug hyper-mcp plugin loading with mcp shell before wiring it into Claude

Use mcp shell to list plugins on my hyper-mcp host and test-call each tool.✓ Скопировано
mcptools + claude-code

Validate every MCP server in your Claude Code config with mcp tools

For each server in ~/.claude.json, run mcp tools to verify it starts and advertises a non-empty tool list.✓ Скопировано

Инструменты

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

ИнструментВходные данныеКогда вызыватьСтоимость
mcp tools --transport <stdio|http|sse>, -- <server-cmd> Inspect a server's surface 0
mcp call <tool-name> --params '<json>' -- <server-cmd> Ad-hoc call without a client 1 tool call
mcp shell -- <server-cmd> Exploratory debugging 0
mcp mock --config <yaml> CI / client testing 0
mcp proxy register <name> --command '<shell>'; serve Wrap shell into MCP without code 0
mcp guard --policy <yaml> -- <server-cmd> Apply allow/deny to an upstream 0

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

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

Квота API
None — local CLI
Токенов на вызов
N/A (not an MCP itself)
Деньги
Free, MIT
Совет
Use --format json | jq to automate checks in CI

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

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

Хранение учётных данных: Passes through to the proxied server; mcptools itself stores nothing
Исходящий трафик: Only where the proxied/guarded server goes

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

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

`mcp tools` hangs forever

Server is writing logs to stdout, corrupting the handshake. Redirect server logs to stderr

Проверить: mcp tools --timeout 5s -- <cmd>
Binary not found after `go install`

Ensure $GOPATH/bin is on your PATH

Проверить: which mcp
Guard policy matches nothing

Policy names must match tool names exactly (case-sensitive). Use mcp tools first to confirm names

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

mcptools в сравнении

АльтернативаКогда использоватьКомпромисс
MCP InspectorYou prefer a GUI and are okay running a local web appHeavier; less scriptable than a CLI
Raw jsonrpc via stdioYou're deep-debugging a protocol issueVerbose; mcptools handles handshake for you

Ещё

Ресурсы

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

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

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