Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

mcp-cliMCP CLI 搜索

Agent Skill

mcp-cli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,281

周安装

182

GitHub Stars

317

下载量

1,861
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mcp-cli(MCP CLI 搜索)
来源仓库:https://github.com/obra/superpowers-lab
仓库路径:skills/mcp-cli
安装命令:
npx skills add https://github.com/obra/superpowers-lab --skill mcp-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/obra/superpowers-lab --skill mcp-cli

简介

MCP CLI 搜索用于查找、检索和筛选相关信息。

  • 适用于需要根据关键词或任务场景进行信息检索的场景,如命令行工具、API 调用等。
  • 通过 GitHub 仓库安装,使用 npx skills add 命令添加技能,需确认权限和维护状态。
  • 使用前应检查是否会触发联网、命令执行或文件读写,确保符合项目安全策略。
  • mcp-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

MCP CLI: On-Demand MCP Server Usage

Use the mcp CLI tool to dynamically discover and invoke MCP server capabilities without pre-configuring them as permanent integrations.

When to Use This Skill

Use this skill when you need to:

  • Explore an MCP server's capabilities before deciding to use it
  • Make one-off calls to an MCP server without permanent integration
  • Access MCP functionality without polluting the context window
  • Test or debug MCP servers
  • Use MCP servers that aren't pre-configured

Prerequisites

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"

Discovery Workflow

Step 1: Discover Available Tools

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

Step 2: Discover Resources (if supported)

mcp resources <server-command>

Resources are data sources the server exposes (files, database entries, etc.).

Step 3: Discover Prompts (if supported)

mcp prompts <server-command>

Prompts are pre-defined prompt templates the server provides.

Step 4: Get Detailed Info (JSON format)

# For full schema details including parameter types
mcp tools --format json <server-command>
mcp tools --format pretty <server-command>

Making Tool Calls

Basic Syntax

mcp call <tool_name> --params '<json>' <server-command>

Examples

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

Complex Parameters

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

Output Formats

# 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>

Reading Resources

# 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>

Using Prompts

# 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>

Server Aliases (for repeated use)

If using a server frequently during a session:

# Create alias
mcp alias add fs npx -y @modelcontextprotocol/server-filesystem /home/user

# Use alias
mcp tools fs
mcp call read_file --params '{"path": "README.md"}' fs

# List aliases
mcp alias list

# Remove when done
mcp alias remove fs

Aliases are stored in ~/.mcpt/aliases.json.

Authentication

HTTP Basic Auth

mcp tools --auth-user "username:password" https://api.example.com/mcp

Bearer Token

mcp tools --auth-header "Bearer your-token-here" https://api.example.com/mcp

Environment Variables (for Docker-based servers)

mcp tools docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_TOKEN" \
  ghcr.io/github/github-mcp-server

Transport Types

Stdio (default for npx/node commands)

mcp tools npx -y @modelcontextprotocol/server-filesystem /tmp

HTTP (auto-detected for http/https URLs)

mcp tools https://example.com/mcp

SSE (Server-Sent Events)

mcp tools http://localhost:3001/sse
# Or explicitly:
mcp tools --transport sse http://localhost:3001

Common MCP Servers

Filesystem

# Allow access to specific directory
mcp tools npx -y @modelcontextprotocol/server-filesystem /path/to/allow

Memory (Knowledge Graph)

mcp tools npx -y @modelcontextprotocol/server-memory

GitHub

export GITHUB_PERSONAL_ACCESS_TOKEN="your-token"
mcp tools docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server

Brave Search

export BRAVE_API_KEY="your-key"
mcp tools npx -y @anthropic/mcp-server-brave-search

Puppeteer (Browser Automation)

mcp tools npx -y @anthropic/mcp-server-puppeteer

Best Practices

1. Always Discover First

Before calling tools, run mcp tools to understand what's available and the exact parameter schema.

2. Use JSON Format for Parsing

When you need to process results programmatically:

mcp call <tool> --params '{}' -f json <server> | jq '.field'

3. Validate Parameters

The table output shows parameter signatures. Match them exactly:

  • param:str = string
  • param:num = number
  • param:bool = boolean
  • param:str[] = array of strings
  • [param:str] = optional parameter

4. Handle Errors Gracefully

Tool calls may fail. Check exit codes and stderr:

if ! result=$(mcp call tool --params '{}' server 2>&1); then
  echo "Error: $result"
fi

5. Use Aliases for Multi-Step Operations

If making several calls to the same server:

mcp alias add tmp-server npx -y @modelcontextprotocol/server-filesystem /tmp
mcp call list_directory --params '{"path": "/tmp"}' tmp-server
mcp call read_file --params '{"path": "/tmp/file.txt"}' tmp-server
mcp alias remove tmp-server

6. Restrict Capabilities with Guard

For safety, limit what tools are accessible:

# Only allow read operations
mcp guard --allow 'tools:read_*,list_*' --deny 'tools:write_*,delete_*' \
  npx -y @modelcontextprotocol/server-filesystem /home

Debugging

View Server Logs

mcp tools --server-logs <server-command>

Check Alias Configuration

cat ~/.mcpt/aliases.json

Verbose Output

Use --format pretty for detailed JSON output to debug parameter issues.

Quick Reference

ActionCommand
List toolsmcp tools <server>
List resourcesmcp resources <server>
List promptsmcp prompts <server>
Call toolmcp call <tool> --params '<json>' <server>
Read resourcemcp read-resource <uri> <server>
Get promptmcp get-prompt <name> <server>
Add aliasmcp alias add <name> <server-command>
Remove aliasmcp alias remove <name>
JSON outputAdd -f json or -f pretty

Example: Complete Workflow

# 1. Discover what's available
mcp tools npx -y @modelcontextprotocol/server-filesystem /home/user/project

# 2. Check for resources
mcp resources npx -y @modelcontextprotocol/server-filesystem /home/user/project

# 3. Create alias for convenience
mcp alias add proj npx -y @modelcontextprotocol/server-filesystem /home/user/project

# 4. Explore directory structure
mcp call directory_tree --params '{"path": "/home/user/project"}' proj

# 5. Read specific files
mcp call read_file --params '{"path": "/home/user/project/README.md"}' proj

# 6. Search for patterns
mcp call search_files --params '{"path": "/home/user/project", "pattern": "**/*.ts"}' proj

# 7. Clean up alias
mcp alias remove proj

Troubleshooting

"command not found: mcp"

Ensure PATH is set: export PATH="$HOME/.local/bin:$PATH"

JSON parse errors

  • Escape special characters properly
  • Avoid shell expansion issues by using single quotes around JSON
  • For complex JSON, write to a temp file and use --params "$(cat params.json)"

Server timeout

Some servers take time to start. The mcp CLI waits for initialization automatically.

Permission denied

For filesystem server, ensure the allowed directory path is correct and accessible.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.95%
按下载量换算520

OpenCode

21.5%
按下载量换算400

Gemini CLI

19.1%
按下载量换算355

Antigravity

13.38%
按下载量换算249

github-copilot

7.77%
按下载量换算145

Cursor

3.24%
按下载量换算60

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills