mcp-cli
Use when needing to interact with MCP servers on-demand via CLI without permanently loading integrations, discover available tools/resources on an MCP server, or call MCP tools from the command line. Triggers on: 'mcp cli', 'mcp tool call', 'call mcp server', 'discover mcp tools', 'mcp on-demand', 'mcp command line', 'mcp binary', 'list mcp tools', 'invoke mcp', 'mcp without integration'.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 13
- Forks
- 2
01 前言 Front Matter
- name
- mcp-cli
- tier
- TIER 3 — PRODUCTIVITY
- source
- obra/superpowers-lab (MIT) — superpowers-lab/skills/mcp-cli
- description
- Use when needing to interact with MCP servers on-demand via CLI without permanently loading integrations, discover available tools/resources on an MCP server, or call MCP tools from the command line. Triggers on: 'mcp cli', 'mcp tool call', 'call mcp server', 'discover mcp tools', 'mcp on-demand', 'mcp command line', 'mcp binary', 'list mcp tools', 'invoke mcp', 'mcp without integration'.
03 SKILL.md 正文
MCP CLI — On-Demand MCP Server Interaction
Source: obra/superpowers-lab (MIT) — github.com/obra/superpowers-lab
Dùng mcp CLI binary để gọi MCP servers on-demand mà không cần load vĩnh viễn vào config.
Context sạch, không bloat, không cần restart Claude Code.
Khác terminal--mcp-client (SDK-based programmatic): cái này là CLI tool cho human/agent dùng trực tiếp.
Khi nào dùng
- Muốn thử một MCP server mới mà không commit vào config
- Debug tool call từ MCP server
- Automation script cần gọi MCP tool
- Xem schema của tool trước khi integrate
Setup
# Cài mcp CLI binary
npm install -g @modelcontextprotocol/cli 2>/dev/null \
|| pip install mcp-cli 2>/dev/null
# Verify
mcp --version
# Đảm bảo có trong PATH
export PATH="$HOME/.local/bin:$PATH"
Workflow chuẩn: Discover → Schema → Call → Cleanup
# 1. Discover tools trên server
mcp tools npx -y @modelcontextprotocol/server-filesystem /tmp
# 2. Xem schema chi tiết
mcp tools --format json npx -y @modelcontextprotocol/server-filesystem /tmp \
| python3 -m json.tool | head -60
# 3. Call tool
mcp call read_file \
--params '{"path": "/tmp/test.txt"}' \
npx -y @modelcontextprotocol/server-filesystem /tmp
# 4. Alias cho session (tránh type lại)
mcp alias fs "npx -y @modelcontextprotocol/server-filesystem /tmp"
mcp tools fs
mcp call read_file --params '{"path":"/tmp/test.txt"}' fs
# 5. Remove alias sau khi xong
mcp alias rm fs
Các loại operations
# List tools
mcp tools <server-cmd>
# List resources
mcp resources <server-cmd>
# List prompt templates
mcp prompts <server-cmd>
# Read resource
mcp read "file:///tmp/test.txt" <server-cmd>
# Get prompt template
mcp prompt my-prompt-name --args '{"key":"value"}' <server-cmd>
Authentication
# HTTP Basic Auth
mcp tools --auth user:password http://mcp.server:3000
# Bearer Token
mcp tools --header "Authorization: Bearer $TOKEN" http://mcp.server:3000
# Từ env var
MCP_AUTH_TOKEN=sk-xxx mcp call tool_name --params '{}' http://mcp.server:3000
Common Servers
# Filesystem (local files)
mcp tools npx -y @modelcontextprotocol/server-filesystem /workspace
# Memory / Knowledge Graph
mcp tools npx -y @modelcontextprotocol/server-memory
# GitHub (cần GITHUB_TOKEN)
GITHUB_TOKEN=ghp_xxx mcp tools npx -y @modelcontextprotocol/server-github
# Brave Search (cần BRAVE_API_KEY)
BRAVE_API_KEY=xxx mcp tools npx -y @modelcontextprotocol/server-brave-search
# Puppeteer (browser automation)
mcp tools npx -y @modelcontextprotocol/server-puppeteer
# Sequential Thinking
mcp tools npx -y @modelcontextprotocol/server-sequential-thinking
Transport types (auto-detected)
# stdio (default — local npx/cmd)
mcp tools npx -y @my/server
# HTTP
mcp tools http://localhost:3000
# SSE
mcp tools --transport sse http://localhost:3000/sse
Anti-Fake-Pass Checks
❌ FAIL nếu dùng mcp-cli cho servers cần permanent config (dùng .mcp.json thay thế)
❌ FAIL nếu pass secrets trong --params JSON (dùng env var)
✅ PASS khi: mcp tools trả về list hợp lệ + call trả về expected result
See also
terminal--mcp-client— SDK-based programmatic MCP integrationagent-reach— reach external platforms (Twitter, GitHub, Reddit) qua HTTP
04 同仓库更多 Skills
openai--sentry--sentry
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
ito-basket-compare
Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.
implementing-network-traffic-baselining
Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling
detecting-evasion-techniques-in-endpoint-logs
Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.
implementing-microsegmentation-with-guardicore
Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.
ramdisk-tmpfs-patterns
暂无简介