Getting Started
Get from zero to running MCP commands in under a minute.
Prerequisites
- Rust toolchain (for building from source) or a pre-built binary
- An MCP server to connect to (or use the built-in demo mode)
Install
Three ways to get mcp2cli on your PATH — pick whichever fits
your flow.
1. One-command install (recommended)
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 | sh2. With an AI agent
Paste 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 server3. With cargo
If you already have a Rust toolchain:
cargo install --git https://github.com/mcp2cli/source-code --lockedVerify
mcp2cli --versionSee the full install guide for requirements, man-page setup, PATH configuration, updating, and uninstall steps.
Your First Server Connection
Option A: Demo Mode (no server needed)
The built-in demo mode uses a file-backed backend — perfect for learning without setting up a real server.
# Create a demo configmcp2cli config init --name demo --app bridge \ --transport streamable_http --endpoint https://demo.invalid/mcp
# Set it as activemcp2cli use demo
# Discover capabilitiesmcp2cli lsOption B: Local Stdio Server
Spawn a local MCP server as a subprocess:
# Create config pointing to a local servermcp2cli config init --name local --app bridge --transport stdio \ --stdio-command npx \ --stdio-args '@modelcontextprotocol/server-everything'
mcp2cli use localmcp2cli lsOption C: Remote HTTP Server
Connect to a running HTTP MCP server:
mcp2cli config init --name remote --app bridge \ --transport streamable_http \ --endpoint http://127.0.0.1:3001/mcp
mcp2cli use remotemcp2cli lsOption D: Ad-Hoc (no config file)
Skip configuration entirely with --url or --stdio:
# HTTP server — just point and gomcp2cli --url http://127.0.0.1:3001/mcp ls
# Stdio server — just runmcp2cli --stdio "npx @modelcontextprotocol/server-everything" lsExplore What the Server Offers
# List everythingmcp2cli ls
# Filter by typemcp2cli ls --tools # Tools onlymcp2cli ls --resources # Resources onlymcp2cli ls --prompts # Prompts only
# Searchmcp2cli ls --filter echoCall a Tool
Server tools become typed CLI commands. Flags come directly from JSON Schema:
# Simple tool callmcp2cli echo --message "hello world"
# Tool with multiple argumentsmcp2cli add --a 5 --b 3
# Tool with complex argumentsmcp2cli deploy --tags '["alpha","beta"]' --config '{"replicas":3}'Read a Resource
# By URImcp2cli get demo://resource/readme.md
# Resource template (parameterized)mcp2cli user-profile --user-id 42Run a Prompt
mcp2cli simple-promptmcp2cli complex-prompt --temperature 0.7 --style conciseCreate a Symlink Alias
Make your server feel like a standalone application:
mcp2cli link create --name work
# Now use it directlywork lswork echo --message "hello from alias"work doctorJSON Output for Scripts
Every command supports structured JSON output:
# JSON envelopework --json ls
# Pipe to jqwork --json echo --message hello | jq '.data'
# NDJSON for streamingwork --output ndjson lsWhat’s Next?
| 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 |