Help us improve
Share bugs, ideas, or general feedback.
From mcp-tooling
Use this skill when working with philschmid/mcp-cli — a lightweight Bun-based CLI for interacting with MCP servers from the shell. Use when the user asks about discovering MCP tools, calling MCP tools from the command line, reducing token consumption with dynamic tool discovery, or integrating MCP servers into shell scripts and AI agent workflows. Also use when encountering questions about mcp_servers.json configuration for CLI-based MCP access.
npx claudepluginhub nsheaps/ai-mktpl --plugin mcp-toolingHow this skill is triggered — by the user, by Claude, or both
Slash command
/mcp-tooling:mcp-cli-philschmidThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Repository**: https://github.com/philschmid/mcp-cli
Discovers and invokes MCP server capabilities on-demand using the mcp CLI tool. Useful for one-off calls, testing, and avoiding permanent integration.
Manages MCP servers by discovering, analyzing, and executing tools/prompts/resources via CLI scripts. Use for integrations, capability discovery, tool filtering, and context bloat resolution.
List tools and invoke calls on MCP servers using fastmcp CLI. Handles HTTP/Python files/configs/stdio targets, schemas, JSON output, auth, and discovery for workflows.
Share bugs, ideas, or general feedback.
Repository: https://github.com/philschmid/mcp-cli
A lightweight, Bun-based CLI for interacting with MCP servers from the shell. Designed for AI coding agents (Gemini CLI, Claude Code, etc.) and shell scripting workflows.
Traditional MCP integration loads entire tool schemas into the AI context window, consuming thousands of tokens. mcp-cli enables dynamic, on-demand discovery — the agent only fetches schemas for tools it actually needs.
Key advantages:
jq for chaining# Via install script
curl -fsSL https://raw.githubusercontent.com/philschmid/mcp-cli/main/install.sh | bash
# Via Bun
bun install -g https://github.com/philschmid/mcp-cli
| Command | Purpose |
|---|---|
mcp-cli | List all servers and tools |
mcp-cli -d | List all servers and tools with descriptions |
mcp-cli info <server> | Show all tools available in a server |
mcp-cli info <server> <tool> | Display complete tool JSON schema |
mcp-cli grep "<pattern>" | Search tools by name using glob pattern |
mcp-cli call <server> <tool> <json> | Execute a tool with JSON arguments |
# 1. Discover — list all servers and available tools
mcp-cli
mcp-cli -d # with descriptions
# 2. Explore — view tools for a specific server
mcp-cli info filesystem
# 3. Inspect — examine a specific tool's schema
mcp-cli info filesystem read_file
# 4. Execute — call the tool with arguments
mcp-cli call filesystem read_file '{"path": "./README.md"}'
Create mcp_servers.json in one of these locations (searched in order):
$MCP_CONFIG environment variable-c <path> command-line argument~/.config/mcp/{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
},
"web": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-web"]
}
}
}
Control which tools are exposed per server:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"allowedTools": ["read_file", "list_directory"],
"disabledTools": ["write_file"]
}
}
}
{
"mcpServers": {
"api": {
"command": "node",
"args": ["api-server.js"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
}
Missing variables cause errors unless MCP_STRICT_ENV=false.
# Pipe JSON from stdin
echo '{"path": "./file"}' | mcp-cli call filesystem read_file
# Chain with jq
mcp-cli call filesystem list_directory '{"path": "."}' | jq '.[] | .name'
# Search for tools matching a pattern
mcp-cli grep "read*"
| Code | Meaning |
|---|---|
0 | Success |
1 | Client error |
2 | Server error |
3 | Network issue |
| Scenario | Recommendation |
|---|---|
| AI agent needs a few specific tools | mcp-cli (discover on demand, save tokens) |
| Shell scripts calling MCP tools | mcp-cli (native shell integration) |
| Debugging MCP server issues | mcp-cli (inspect schemas, test calls) |
| Full IDE integration with many tools | Native MCP (persistent connection, all tools available) |
| CI/CD pipelines | mcp-cli (scriptable, JSON output) |