MCP in Shell --> MCPsh --> cpsh --> capeesh
Capeesh is a CLI client for the Model Context Protocol (MCP). It lets you configure, authenticate, and interact with MCP servers directly from your terminal.
- Multi-transport: Connect to MCP servers over stdio (local subprocess) or Streamable HTTP (remote servers)
- Tool interaction: List, inspect, and call tools with schema-driven argument handling
- Resource & prompt access: List resources and read their contents by URI
- Interactive setup:
capeesh servers addwalks you through configuration with a TUI - OAuth 2.0 / DCR: Dynamic Client Registration with browser consent flow for authenticated HTTP servers, tokens persisted to the OS keyring
- Tab completion: Dynamic shell completion for server names, tool names, and argument fields
make buildThis compiles the binary to bin/capeesh and copies it to ~/.local/bin/capeesh.
Or run directly without building:
make run args="servers list"capeesh servers addThis launches an interactive form where you configure the server name, transport type (stdio or http), and connection details.
stdio example (local MCP server via npx):
{
"my-server": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"env": { "API_KEY": "$MY_API_KEY" }
}
}http example (remote server with auth):
{
"my-server": {
"transport": "http",
"url": "https://api.example.com/mcp",
"auth": { "type": "dcr" }
}
}capeesh servers list# List all available tools
capeesh server my-server inspect tools
# Show the JSON Schema for a specific tool
capeesh server my-server inspect tools read_file# Simple tool with no arguments
capeesh server my-server tools list_files
# Tool with parameters (use -f for flags, repeatable)
capeesh server my-server tools read_file -f path=/etc/hosts
# Tool with multiple parameters (dot notation for nested fields)
capeesh server my-server tools deploy -f config.region=us-east-1 -f app.name=myappFlags support automatic type coercion based on the tool's JSON Schema:
string— default, passed as-isinteger/number— parsed from the string valueboolean— parsed viastrconv.ParseBoolarray— parsed as JSON, or comma-separated if not valid JSONobject— parsed as JSON
# List available resources
capeesh server my-server inspect resources
# Read a resource by URI
capeesh server my-server resources file:///etc/hostnameServer configurations are stored in ~/.capeesh/config.json. The config file supports environment variable expansion:
{
"servers": {
"my-server": {
"transport": "http",
"url": "https://api.example.com/mcp",
"token": "$MY_API_TOKEN"
}
}
}Variables referenced with $VAR or ${VAR} are expanded from the environment at connection time.
For HTTP-based MCP servers, Capeesh supports Dynamic Client Registration (DCR) via the MCP spec's OAuth 2.0 flow:
- Capeesh discovers the server's DCR endpoint
- Registers as a client → receives
client_idandclient_secret - Opens your browser for user consent (with PKCE)
- Exchanges the authorization code for an access token
- Persists the token to the OS keyring for future use
# View auth status for all servers
capeesh servers auth listCapeesh supports dynamic tab completion. After generating a completion script:
# Generate for your shell
source <(capeesh completion bash) # or zsh, fish, powershellThe completion system connects to each server to fetch live data:
capeesh server <TAB>→ configured server namescapeesh server my-srv <TAB>→inspect,tools,resourcescapeesh server my-srv tools <TAB>→ available tool names with descriptionscapeesh server my-srv tools my-tool -f <TAB>→ argument field names from the tool's JSON Schema
MIT