plugins/mcp-tooling/skills/mcp-cli-philschmid/SKILL.md
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 skillsauth add nsheaps/ai-mktpl mcp-cli-philschmidInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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) |
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su