Local Dev Prototyping
Use mcp2cli as your interactive development companion when building MCP servers — instant feedback, live exploration, and fast iteration without writing client code.
The Development Loop
Building an MCP server means constantly testing whether your tools, resources, and prompts work correctly. Without mcp2cli, you’d need a custom test client, a GUI inspector, or an AI chat interface. Each adds friction.
With mcp2cli, the loop is:
Edit server → mcp2cli calls it → see result → repeatgraph LR
EDIT["Edit server code"] --> BUILD["Build / restart"]
BUILD --> TEST["mcp2cli call"]
TEST --> SEE["See output"]
SEE --> EDIT
style TEST fill:#bbf,stroke:#333
Getting Started: Zero Config
Point mcp2cli at your server with zero setup:
# Your server running locally (HTTP)mcp2cli --url http://localhost:3001/mcp ls
# Your server as a binary (stdio)mcp2cli --stdio "./target/debug/my-server" ls
# Python servermcp2cli --stdio "python server.py" ls
# Node.js servermcp2cli --stdio "node server.js" lsNo config files. No setup ritual. Just point and go.
Workflow 1: Exploring a New Server
You’ve just cloned someone else’s MCP server. What does it do?
# What does this server offer?mcp2cli --stdio "./server" ls
# Deep dive — see full capabilities, schemas, everythingmcp2cli --stdio "./server" --json inspect | jq '.'
# What tools are there?mcp2cli --stdio "./server" ls --tools
# What does the "search" tool expect?mcp2cli --stdio "./server" --json inspect | jq ' .data.capabilities.tools[] | select(.name == "search") | .inputSchema'
# Try itmcp2cli --stdio "./server" search --query "hello"Five commands and you understand the entire server API.
Workflow 2: Test-Driven Server Development
Build your server’s tools one by one, testing each as you go:
# Terminal 1: Watch and rebuildcargo watch -x build
# Terminal 2: Test each tool as you implement itmcp2cli --stdio "./target/debug/my-server" ls --tools# → (empty — no tools yet)
# ... implement "greet" tool ...
mcp2cli --stdio "./target/debug/my-server" ls --tools# → greet tool Greets someone by name
mcp2cli --stdio "./target/debug/my-server" greet --name "World"# → Hello, World!
# JSON to see the full response structuremcp2cli --stdio "./target/debug/my-server" --json greet --name "World" | jq '.'Workflow 3: Schema Validation
mcp2cli enforces your JSON Schema at the CLI level — it’s a free validation layer:
# Missing required argumentmcp2cli --stdio "./server" create-user# → error: the following required arguments were not provided: --name
# Wrong typemcp2cli --stdio "./server" add --a hello --b 3# → error: invalid value 'hello' for '--a': expected integer
# Invalid enum valuemcp2cli --stdio "./server" set-level --level superverbose# → possible values: trace, debug, info, warn, errorIf mcp2cli accepts the input and the server gets called, you know the arguments match the schema. If mcp2cli rejects it, your schema is working correctly.
Workflow 4: Resource Development
Test resources and resource templates as you build them:
# List available resourcesmcp2cli --stdio "./server" ls --resources
# Read a concrete resourcemcp2cli --stdio "./server" get "config://app/settings"
# Test resource templatesmcp2cli --stdio "./server" user-profile --id 42
# Verify MIME types and contentmcp2cli --stdio "./server" --json get "config://app/settings" | jq '.data.content[0]'# → { "type": "text", "mimeType": "application/json", "text": "{...}" }Workflow 5: Prompt Development
Test prompts with different argument combinations:
# Simple prompt — no argsmcp2cli --stdio "./server" summarize
# Prompt with argumentsmcp2cli --stdio "./server" code-review --language rust --style concise
# See the full message structuremcp2cli --stdio "./server" --json code-review --language rust | jq '.data.messages'Workflow 6: Compare Server Versions
Running two versions of your server? Compare their outputs:
# Old versionOLD=$(mcp2cli --stdio "./target/debug/server-v1" --json ls --tools | jq -S '.data.items[].id')
# New versionNEW=$(mcp2cli --stdio "./target/debug/server-v2" --json ls --tools | jq -S '.data.items[].id')
# What changed?diff <(echo "$OLD") <(echo "$NEW")Workflow 7: Environment Variable Injection
Test how your server behaves with different configurations:
# Production modemcp2cli --stdio "python server.py" --env MODE=production --env LOG_LEVEL=error ls
# Test mode with mocksmcp2cli --stdio "python server.py" --env MODE=test --env MOCK_DB=true search --query test
# Different API keysmcp2cli --stdio "./server" --env API_KEY=test-key-1 lsmcp2cli --stdio "./server" --env API_KEY=test-key-2 lsWorkflow 8: Rapid Prototyping with Demo Mode
Prototype your CLI experience before the server even exists:
# Use demo mode as a stand-inmcp2cli --url https://demo.invalid/mcp ls
# Test your profile overlay against demo servercat > /tmp/prototype-config.yaml << 'EOF'schema_version: 1server: transport: streamable_http endpoint: https://demo.invalid/mcpprofile: display_name: "My Future CLI" aliases: echo: ping groups: system: - echo - addEOF
mcp2cli --config /tmp/prototype-config.yaml ls# See how your CLI surface will look before writing server codeSpeed Tips
Use a Named Config for Your Dev Server
Once you’re past the exploration phase, save a config:
mcp2cli config init --name dev --transport stdio \ --stdio-command ./target/debug/my-servermcp2cli use dev
# Now just:mcp2cli lsmcp2cli greet --name testUse the Daemon for Stdio Servers
Avoid the subprocess startup overhead on every call:
mcp2cli daemon start dev
# Every call is instant nowmcp2cli greet --name test1 # ~50msmcp2cli greet --name test2 # ~50msmcp2cli greet --name test3 # ~50ms
mcp2cli daemon stop devAlias for One-Handed Usage
mcp2cli link create --name d # Short alias
d lsd greet --name testd --json inspect | jq '.'See Also
- Getting Started — initial setup guide
- Transports — stdio and HTTP transport details
- Ad-Hoc Connections —
--url/--stdioexplained - E2E & Conformance Testing — structured test suites
- Daemon Mode — fast iteration with warm connections