按需通过 mcp CLI 调用 MCP 服务,发现工具与资源而不预加载上下文
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "mcp-cli" 技能: 1. 下载 https://raw.githubusercontent.com/obra/superpowers-lab/main/skills/mcp-cli/SKILL.md 2. 保存为 ~/.claude/skills/mcp-cli/SKILL.md 3. 装好后重载技能,告诉我可以用了
使用 mcp-cli 帮我列出当前可访问的 MCP 服务器中的工具、资源和提示词,并按用途分组说明。
一份按类别整理的可用能力清单,帮助快速了解能调用什么。
我想自动整理项目文档并检索版本信息,请用 mcp-cli 找出最适合的 MCP 工具或资源,并说明推荐理由。
推荐的 MCP 工具或资源列表,以及每项适用场景与选择依据。
请通过 mcp-cli 临时调用所需 MCP 服务完成一次任务查询,并只返回结果摘要,不要加载无关集成信息。
一次轻量、聚焦的调用结果摘要,避免引入多余上下文。
Use the mcp CLI tool to dynamically discover and invoke MCP server capabilities without pre-configuring them as permanent integrations.
Use this skill when you need to:
The mcp CLI must be installed at ~/.local/bin/mcp. If not present:
# Clone and build
cd /tmp && git clone --depth 1 https://github.com/f/mcptools.git
cd mcptools && CGO_ENABLED=0 go build -o ~/.local/bin/mcp ./cmd/mcptools
Always ensure PATH includes the binary:
export PATH="$HOME/.local/bin:$PATH"
mcp tools <server-command>
Examples:
# Filesystem server
mcp tools npx -y @modelcontextprotocol/server-filesystem /path/to/allow
# Memory/knowledge graph server
mcp tools npx -y @modelcontextprotocol/server-memory
# GitHub server (requires token)
mcp tools docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
# HTTP-based server
mcp tools https://example.com/mcp
mcp resources <server-command>
Resources are data sources the server exposes (files, database entries, etc.).
mcp prompts <server-command>
Prompts are pre-defined prompt templates the server provides.
# For full schema details including parameter types
mcp tools --format json <server-command>
mcp tools --format pretty <server-command>
mcp call <tool_name> --params '<json>' <server-command>
Read a file:
mcp call read_file --params '{"path": "/tmp/example.txt"}' \
npx -y @modelcontextprotocol/server-filesystem /tmp
Write a file:
mcp call write_file --params '{"path": "/tmp/test.txt", "content": "Hello world"}' \
npx -y @modelcontextprotocol/server-filesystem /tmp
List directory:
mcp call list_directory --params '{"path": "/tmp"}' \
npx -y @modelcontextprotocol/server-filesystem /tmp
Create entities (memory server):
mcp call create_entities --params '{"entities": [{"name": "Project", "entityType": "Software", "observations": ["Uses TypeScript"]}]}' \
npx -y @modelcontextprotocol/server-memory
Search (memory server):
mcp call search_nodes --params '{"query": "TypeScript"}' \
npx -y @modelcontextprotocol/server-memory
For nested objects and arrays, ensure valid JSON:
mcp call edit_file --params '{
"path": "/tmp/file.txt",
"edits": [
{"oldText": "foo", "newText": "bar"},
{"oldText": "baz", "newText": "qux"}
]
}' npx -y @modelcontextprotocol/server-filesystem /tmp
# Table (default, human-readable)
mcp call <tool> --params '{}' <server>
# JSON (for parsing)
mcp call <tool> --params '{}' -f json <server>
# Pretty JSON (readable JSON)
mcp call <tool> --params '{}' -f pretty <server>
# List available resources
mcp resources <server-command>
# Read a specific resource
mcp read-resource <resource-uri> <server-command>
# Alternative syntax
mcp call resource:<resource-uri> <server-command>
# List available prompts
mcp prompts <server-command>
# Get a prompt (may require arguments)
mcp get-prompt <prompt-name> <server-command>
# With parameters
mcp get-prompt <prompt-name> --params '{"arg": "value"}' <server-command>
If using a server frequently during a session:
# Create alias
…
帮助你审计代码库,找出语义重复但命名或实现不同的函数
帮助你通过 tmux 控制需实时交互的命令行会话,安全运行编辑器、REPL 和交互式 Git 操作。
在创意与实现前梳理用户意图、需求与方案方向,降低返工风险。
为新功能开发创建隔离工作区,避免影响当前代码并便于并行实现。
根据需求先拆解多步骤任务,生成清晰可执行的实施计划
在对话开始时建立技能发现与调用规则,确保先用技能再作答。
演示 MCP 工具、资源与提示词,用于计算、查时、记笔记和代码审查。
将任意命令行工具或 REST API 快速封装为可供 Claude 调用的 MCP 服务。
通过自然语言调用58种在线工具与工作流,完成数据、文本、图像等多类任务
可在运行时动态创建并执行多语言自定义工具,供 MCP 客户端直接调用。
提供个性化问候示例,帮助开发者快速理解 MCP 工具集成方式。
帮助用户在 Claude App 中管理 MCP 服务器并进行包发现与安装