Get from zero to running MCP commands in under a minute.
- Rust toolchain (for building from source) or a pre-built binary
- An MCP server to connect to (or use the built-in demo mode)
Three ways to get mcp2cli on your PATH — pick whichever fits
your flow.
Works on any POSIX shell. The script detects cargo, warns if
~/.cargo/bin isn't on your PATH, and installs from the main
branch.
curl -fsSL https://mcp2cli.dev/install.sh | shOr with wget:
wget -qO- https://mcp2cli.dev/install.sh | shPaste this prompt into Claude, Cursor, or any coding agent — it will fetch the SKILL.md instructions and set up a config for your MCP server:
Read https://mcp2cli.dev/SKILL.md and set up a cli for my mcp server
If you already have a Rust toolchain:
cargo install --git https://github.com/mcp2cli/source-code --lockedmcp2cli --versionSee the full install guide for requirements, man-page setup, PATH configuration, updating, and uninstall steps.
The built-in demo mode uses a file-backed backend — perfect for learning without setting up a real server.
# Create a demo config
mcp2cli config init --name demo --app bridge \
--transport streamable_http --endpoint https://demo.invalid/mcp
# Set it as active
mcp2cli use demo
# Discover capabilities
mcp2cli lsSpawn a local MCP server as a subprocess:
# Create config pointing to a local server
mcp2cli config init --name local --app bridge --transport stdio \
--stdio-command npx \
--stdio-arg '@modelcontextprotocol/server-everything'
mcp2cli use local
mcp2cli lsConnect to a running HTTP MCP server — here, a hosted email server:
mcp2cli config init --name email --app bridge \
--transport streamable_http \
--endpoint https://mcp.example.com/email
mcp2cli use email
mcp2cli lsSkip configuration entirely with --url or --stdio:
# HTTP server — just point and go
mcp2cli --url http://127.0.0.1:3001/mcp ls
# Stdio server — just run
mcp2cli --stdio "npx @modelcontextprotocol/server-everything" ls# List everything
mcp2cli ls
# Filter by type
mcp2cli ls --tools # Tools only
mcp2cli ls --resources # Resources only
mcp2cli ls --prompts # Prompts only
# Search
mcp2cli ls --filter draftServer tools become typed CLI commands. Flags come directly from JSON Schema:
# Simple tool call
mcp2cli send --to user@example.com --subject "Hi" --body "hello world"
# Tool with multiple arguments
mcp2cli reply --thread-id 123 --body "Thanks!"
# Tool with complex arguments
mcp2cli draft create --subject "New" --labels '["alpha","beta"]'# By URI
mcp2cli get mail://inbox
# Resource template (parameterized)
mcp2cli get mail://thread/123mcp2cli simple-prompt
mcp2cli complex-prompt --temperature 0.7 --style conciseMake your server feel like a standalone application:
mcp2cli link create --name email
# Now use it directly
email ls
email send --to user@example.com --subject "Hi" --body "hello from alias"
email doctorEvery command supports structured JSON output:
# JSON envelope
email --json ls
# Pipe to jq
email --json search --query "from:boss" | jq '.data'
# NDJSON for streaming
email --output ndjson ls| Goal | Read |
|---|---|
| Configure timeout, logging, events | Configuration Reference |
| Customize command names and grouping | Profile Overlays |
| Run background jobs | Background Jobs |
| Set up CI/CD pipelines | Shell Scripting with MCP |
| Connect AI agents | AI Agents + MCP via CLI |
| Manage multiple servers | Named Configs & Aliases |
| Keep connections warm | Daemon Mode |