Loading...
Loading...
Use MCP servers on-demand via the mcp CLI tool - discover tools, resources, and prompts without polluting context with pre-loaded MCP integrations
npx skill4agent add obra/superpowers-lab mcp-climcpmcp~/.local/bin/mcp# 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/mcptoolsexport PATH="$HOME/.local/bin:$PATH"mcp tools <server-command># 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/mcpmcp resources <server-command>mcp prompts <server-command># For full schema details including parameter types
mcp tools --format json <server-command>
mcp tools --format pretty <server-command>mcp call <tool_name> --params '<json>' <server-command>mcp call read_file --params '{"path": "/tmp/example.txt"}' \
npx -y @modelcontextprotocol/server-filesystem /tmpmcp call write_file --params '{"path": "/tmp/test.txt", "content": "Hello world"}' \
npx -y @modelcontextprotocol/server-filesystem /tmpmcp call list_directory --params '{"path": "/tmp"}' \
npx -y @modelcontextprotocol/server-filesystem /tmpmcp call create_entities --params '{"entities": [{"name": "Project", "entityType": "Software", "observations": ["Uses TypeScript"]}]}' \
npx -y @modelcontextprotocol/server-memorymcp call search_nodes --params '{"query": "TypeScript"}' \
npx -y @modelcontextprotocol/server-memorymcp call edit_file --params '{
"path": "/tmp/file.txt",
"edits": [
{"oldText": "foo", "newText": "bar"},
{"oldText": "baz", "newText": "qux"}
]
}' npx -y @modelcontextprotocol/server-filesystem /tmp# 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># 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># 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># 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~/.mcpt/aliases.jsonmcp tools --auth-user "username:password" https://api.example.com/mcpmcp tools --auth-header "Bearer your-token-here" https://api.example.com/mcpmcp tools docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_TOKEN" \
ghcr.io/github/github-mcp-servermcp tools npx -y @modelcontextprotocol/server-filesystem /tmpmcp tools https://example.com/mcpmcp tools http://localhost:3001/sse
# Or explicitly:
mcp tools --transport sse http://localhost:3001# Allow access to specific directory
mcp tools npx -y @modelcontextprotocol/server-filesystem /path/to/allowmcp tools npx -y @modelcontextprotocol/server-memoryexport GITHUB_PERSONAL_ACCESS_TOKEN="your-token"
mcp tools docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-serverexport BRAVE_API_KEY="your-key"
mcp tools npx -y @anthropic/mcp-server-brave-searchmcp tools npx -y @anthropic/mcp-server-puppeteermcp toolsmcp call <tool> --params '{}' -f json <server> | jq '.field'param:strparam:numparam:boolparam:str[][param:str]if ! result=$(mcp call tool --params '{}' server 2>&1); then
echo "Error: $result"
fimcp 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# Only allow read operations
mcp guard --allow 'tools:read_*,list_*' --deny 'tools:write_*,delete_*' \
npx -y @modelcontextprotocol/server-filesystem /homemcp tools --server-logs <server-command>cat ~/.mcpt/aliases.json--format pretty| Action | Command |
|---|---|
| List tools | |
| List resources | |
| List prompts | |
| Call tool | |
| Read resource | |
| Get prompt | |
| Add alias | |
| Remove alias | |
| JSON output | Add |
# 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 projexport PATH="$HOME/.local/bin:$PATH"--params "$(cat params.json)"