
Mcp Cli
Operate MCP servers from the CLI—list tools, call resources, debug agent integrations.
Install
npx skills add https://github.com/obra/superpowers-lab --skill mcp-cliWhat is this skill?
- CLI patterns for MCP tool listing and calls.
- Debug agent ↔ MCP connectivity issues.
- Superpowers lab MCP workflow reference.
Adoption & trust: 283 installs on skills.sh; 364 GitHub stars; 0/3 security scanners passed (skills.sh audits).
Recommended Skills
Microsoft Foundrymicrosoft/azure-skills
Azure Aimicrosoft/azure-skills
Azure Hosted Copilot Sdkmicrosoft/azure-skills
Lark Eventlarksuite/cli
Running Claude Code Via Litellm Copilotxixu-me/skills
Setup Matt Pocock Skillsmattpocock/skills
Journey fit
Common Questions / FAQ
Is Mcp Cli safe to install?
skills.sh reports 0 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Mcp Cli
# 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: ```bash # 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: ```bash export PATH="$HOME/.local/bin:$PATH" ``` ## Discovery Workflow ### Step 1: Discover Available Tools ```bash mcp tools <server-command> ``` **Examples:** ```bash # 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) ```bash mcp resources <server-command> ``` Resources are data sources the server exposes (files, database entries, etc.). ### Step 3: Discover Prompts (if supported) ```bash mcp prompts <server-command> ``` Prompts are pre-defined prompt templates the server provides. ### Step 4: Get Detailed Info (JSON format) ```bash # For full schema details including parameter types mcp tools --format json <server-command> mcp tools --format pretty <server-command> ``` ## Making Tool Calls ### Basic Syntax ```bash mcp call <tool_name> --params '<json>' <server-command> ``` ### Examples **Read a file:** ```bash mcp call read_file --params '{"path": "/tmp/example.txt"}' \ npx -y @modelcontextprotocol/server-filesystem /tmp ``` **Write a file:** ```bash mcp call write_file --params '{"path": "/tmp/test.txt", "content": "Hello world"}' \ npx -y @modelcontextprotocol/server-filesystem /tmp ``` **List directory:** ```bash mcp call list_directory --params '{"path": "/tmp"}' \ npx -y @modelcontextprotocol/server-filesystem /tmp ``` **Create entities (memory server):** ```bash mcp call create_entities --params '{"entities": [{"name": "Project", "entityType": "Software", "observations": ["Uses TypeScript"]}]}' \ npx -y @modelcontextprotocol/server-memory ``` **Search (memory server):** ```bash mcp call search_nodes --params '{"query": "TypeScript"}' \ npx -y @modelcontextprotocol/server-memory ``` ### Complex Parameters For nested objects and arrays, ensure valid JSON: ```bash 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 ```bash # 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 ```bash # 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 ```bash # 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