一键导入
mcp-debug
Use when testing MCP servers, debugging MCP tool responses, exploring MCP capabilities, or diagnosing why an MCP tool returns unexpected data
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when testing MCP servers, debugging MCP tool responses, exploring MCP capabilities, or diagnosing why an MCP tool returns unexpected data
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when facing hard architectural decisions, multiple valid approaches exist, need diverse perspectives before committing, or want M-of-N synthesis on complex problems
Use when rough ideas need design before code, requirements are fuzzy, multiple approaches exist, or you need to explore options before implementation
Use when debugging bugs, test failures, unexpected behavior, or needing to find root cause before fixing
Use when managing project learnings - view, add, search, prune, or export operational knowledge that persists across sessions
Use when shipping code - complete workflow: merge main, run tests, multi-review with auto-fix, commit, push, create PR. Replaces manual commit-push-pr flows.
Use when finding new AI agent skills, discovering capabilities, installing skills from GitHub, searching skill marketplaces, or expanding what Claude can do - like Neo downloading martial arts in The Matrix
| name | mcp-debug |
| description | Use when testing MCP servers, debugging MCP tool responses, exploring MCP capabilities, or diagnosing why an MCP tool returns unexpected data |
| version | 1.1.0 |
| category | debugging |
| stability | experimental |
| triggers | ["mcp","test mcp","debug mcp","mcp tool","mcp server","mcptools"] |
Before using MCP debug commands, ensure mcptools is installed:
# Check if installed
which mcp || which mcpt
# Install via Homebrew (macOS)
brew tap f/mcptools && brew install mcp
# Or via Go
go install github.com/f/mcptools/cmd/mcptools@latest
If mcptools is not found, install it first before proceeding.
MCP server configs can come from multiple sources:~/.config/claude/claude_desktop_config.jsonhttp://localhost:9900 with optional authmcp alias addTo find available servers:
# Scan all known config locations
mcp configs scan
# List saved aliases
mcp alias list
See what tools/operations an MCP server provides:
# HTTP server with bearer auth
mcp tools http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Using an alias
mcp tools server-alias
# Pretty JSON output
mcp tools --format pretty http://localhost:9900
Execute an MCP tool directly with parameters:
# Call with JSON params
mcp call describe --params '{"action":"describe"}' http://localhost:9900 \
--headers "Authorization=Bearer $AUTH_TOKEN"
# Gateway-style (single tool with action param)
mcp call server-tool --params '{"action":"messages_recent","params":{"limit":5}}' \
http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Format output as pretty JSON
mcp call tool_name --params '{}' --format pretty http://localhost:9900
Open persistent connection for multiple commands:
mcp shell http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Then in shell:
# mcp> tools
# mcp> call describe --params '{"action":"describe"}'
Visual debugging in browser:
mcp web http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Opens http://localhost:41999
Many MCP servers use a gateway pattern - a single tool with an action parameter for
progressive disclosure:
# List all operations
mcp call server-tool --params '{"action":"describe"}' http://localhost:9900 \
--headers "Authorization=Bearer $AUTH_TOKEN"
# Call specific operation
mcp call server-tool --params '{"action":"resource_list","params":{"limit":5}}' \
http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Check if server is responding
curl -s http://localhost:9900/health
# List all tools via mcptools
mcp tools http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Get operation descriptions
mcp call server-tool --params '{"action":"describe"}' --format pretty \
http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
# Test a specific operation
mcp call server-tool --params '{"action":"resource_list","params":{"limit":3}}' \
--format pretty http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
Connection refused
curl http://localhost:9900/healthps aux | grep mcp-server)tail -20 /path/to/server/logs/error.log401 Unauthorized
echo $AUTH_TOKENAuthorization=Bearer (mcptools uses =, HTTP uses
:)Tool not found
action paramEmpty/error results
mcptools not found
brew tap f/mcptools && brew install mcpgo install github.com/f/mcptools/cmd/mcptools@latestVerify connectivity
curl -s http://localhost:9900/health
List available tools
mcp tools http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
Get operation descriptions
mcp call server-tool --params '{"action":"describe"}' --format pretty \
http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
Test specific operation
mcp call server-tool --params '{"action":"resource_list","params":{"limit":3}}' \
--format pretty http://localhost:9900 --headers "Authorization=Bearer $AUTH_TOKEN"
If issues, check logs
tail -50 /path/to/server/logs/error.log
MCP tools return JSON with this structure:
{
"content": [
{
"type": "text",
"text": "{ ... actual result as JSON string ... }"
}
]
}
The inner text field contains the actual result, often as a JSON string that needs
parsing. Use jq to extract:
mcp call server-tool --params '...' --format json http://localhost:9900 \
--headers "Authorization=Bearer $AUTH_TOKEN" \
| jq -r '.content[0].text' | jq .