mcp-cli
Skill141 starsChanged 7 months agoApache-2.0View on GitHub
Use MCP servers on-demand via the mcp CLI tool - discover tools, resources, and prompts without polluting context with pre-loaded MCP integrations
- Reads credentials
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use the mcp CLI tool to dynamically discover and invoke MCP server capabilities without pre-configuring them as permanent integrations.
- Distinctive: line 12
Use this skill when you need to:
- Distinctive: line 16
Test or debug MCP servers
- Distinctive: line 17
Use MCP servers that aren't pre-configured
- Distinctive: line 29
Always ensure PATH includes the binary:
- Distinctive: line 176
If using a server frequently during a session:
- Very specific: line 266
Before calling tools, run mcp tools to understand what's available and the exact parameter schema.
- Distinctive: line 269
When you need to process results programmatically:
- Distinctive: line 291
If making several calls to the same server:
- Very specific: line 320
Use --format pretty for detailed JSON output to debug parameter issues.
- Very specific: line 364
Ensure PATH is set: export PATH="$HOME/.local/bin:$PATH"
- Distinctive: line 368
Avoid shell expansion issues by using single quotes around JSON
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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/mcptoolsAlways 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/mcpStep 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 /tmpWrite a file:
mcp call write_file --params '{"path": "/tmp/test.txt", "content": "Hello world"}' \
npx -y @modelcontextprotocol/server-filesystem /tmpList directory:
mcp call list_directory --params '{"path": "/tmp"}' \
npx -y @modelcontextprotocol/server-filesystem /tmpCreate entities (memory server):
mcp call create_entities --params '{"entities": [{"name": "Project", "entityType": "Software", "observations": ["Uses TypeScript"]}]}' \
npx -y @modelcontextprotocol/server-memorySearch (memory server):
mcp call search_nodes --params '{"query": "TypeScript"}' \
npx -y @modelcontextprotocol/server-memoryComplex 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 /tmpOutput 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 fsAliases are stored in ~/.mcpt/aliases.json.
Authentication
HTTP Basic Auth
mcp tools --auth-user "username:password" https://api.example.com/mcpBearer Token
mcp tools --auth-header "Bearer your-token-here" https://api.example.com/mcpEnvironment Variables (for Docker-based servers)
mcp tools docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_TOKEN" \
ghcr.io/github/github-mcp-serverTransport Types
Stdio (default for npx/node commands)
mcp tools npx -y @modelcontextprotocol/server-filesystem /tmpHTTP (auto-detected for http/https URLs)
mcp tools https://example.com/mcpSSE (Server-Sent Events)
mcp tools http://localhost:3001/sse
# Or explicitly:
mcp tools --transport sse http://localhost:3001Common MCP Servers
Filesystem
# Allow access to specific directory
mcp tools npx -y @modelcontextprotocol/server-filesystem /path/to/allowMemory (Knowledge Graph)
mcp tools npx -y @modelcontextprotocol/server-memoryGitHub
export GITHUB_PERSONAL_ACCESS_TOKEN="your-token"
mcp tools docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-serverBrave Search
export BRAVE_API_KEY="your-key"
mcp tools npx -y @anthropic/mcp-server-brave-searchPuppeteer (Browser Automation)
mcp tools npx -y @anthropic/mcp-server-puppeteerBest 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= stringparam:num= numberparam:bool= booleanparam: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"
fi5. 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-server6. 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 /homeDebugging
View Server Logs
mcp tools --server-logs <server-command>Check Alias Configuration
cat ~/.mcpt/aliases.jsonVerbose Output
Use --format pretty for detailed JSON output to debug parameter issues.
Quick Reference
| Action | Command |
| List tools | mcp tools <server> |
| List resources | mcp resources <server> |
| List prompts | mcp prompts <server> |
| Call tool | mcp call <tool> --params '<json>' <server> |
| Read resource | mcp read-resource <uri> <server> |
| Get prompt | mcp get-prompt <name> <server> |
| Add alias | mcp alias add <name> <server-command> |
| Remove alias | mcp alias remove <name> |
| JSON output | Add -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 projTroubleshooting
"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.
Other versions9 projects use a version of this.
Word for word · 1
- obra/superpowers-lab★ 429100% same
Edited · 0
None found.
Wrote their own version · 8
- github/awesome-copilot★ 41ksame name
- philschmid/mcp-cli★ 1.3ksame name
- asterixix/polish-academic-mcp★ 4same name
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- Adhamxon/claude-code-skills★ 2same name
- paulanunes85/three-horizons-accelerator★ 2same name
- Typeless-Git/skills★ 1same name
- ReaperOAK/ForgeOS★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- workclaw-change-verificationSkill
- workclaw-cleanup-executionSkill
- workclaw-implementation-strategySkill
- workclaw-release-prepSkill
- workclaw-release-publishSkill
- workclaw-release-readinessSkill
- workclaw-repo-hygiene-reviewSkill
- brainstormingSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finding-duplicate-functionsSkill
- finishing-a-development-branchSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- slack-messagingSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- using-tmux-for-interactive-commandsSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

