mcpheroctl CLI Reference

Command-line interface for creating, managing, and deploying MCP servers with MCPHero

Overview

mcpheroctl is the official CLI for MCPHero. Source code on GitHub. It lets you authenticate, create and manage MCP servers, run the AI-guided wizard pipeline, and retrieve API keys — all from your terminal.


Installation

Homebrew (macOS / Linux)

brew install arterialist/mcpheroctl/mcpheroctl

uv (cross-platform)

uv tool install mcpheroctl

Authentication

Config is stored at ~/.config/mcpheroctl/config.json.

CommandDescription
mcpheroctl auth login --token <TOKEN>Save an API token and authenticate
mcpheroctl auth statusShow the currently authenticated account
mcpheroctl auth logoutRemove saved credentials
mcpheroctl auth login --token <TOKEN>
mcpheroctl auth status

Server Management

CommandDescription
mcpheroctl server listList all deployed MCP servers
mcpheroctl server get <SERVER_ID>Show details for a specific server
mcpheroctl server delete <SERVER_ID>Delete a server
mcpheroctl server api-key <SERVER_ID>Retrieve the bearer token for a server
mcpheroctl server logs <SERVER_ID>Stream runtime logs

Wizard Pipeline

The wizard pipeline takes a server from an initial idea through to a running deployment. Steps must be executed in order.

1. Create a session

mcpheroctl wizard create-session

Outputs a SERVER_ID — use this in all subsequent steps.

2. Gather requirements via conversation

mcpheroctl wizard conversation <SERVER_ID> -m "I need a weather API server"

Repeat this step (adding more messages with -m) until the wizard reports is_ready: true. This step is required before starting.

3. Start the wizard

mcpheroctl wizard start <SERVER_ID>

Transitions the session to tool suggestion.

4. Define tools

mcpheroctl wizard list-tools <SERVER_ID>
mcpheroctl wizard refine-tools <SERVER_ID> -m "Remove the forecast tool"
mcpheroctl wizard submit-tools <SERVER_ID>

5. Define environment variables

mcpheroctl wizard suggest-env-vars <SERVER_ID>
mcpheroctl wizard list-env-vars <SERVER_ID>
mcpheroctl wizard refine-env-vars <SERVER_ID> -m "Add a UNITS variable"
mcpheroctl wizard submit-env-vars <SERVER_ID>

6. Set authentication

mcpheroctl wizard set-auth <SERVER_ID>

Generates a bearer token for the server.

7. Generate code

mcpheroctl wizard generate-code <SERVER_ID>

Triggers async code generation. Poll server get until status changes.

8. Deploy

mcpheroctl wizard deploy <SERVER_ID>

Deploys the generated code to the MCPHero runtime.


All Wizard Commands

CommandDescription
wizard create-sessionStart a new wizard session; returns SERVER_ID
wizard conversation <SERVER_ID> -m "..."Send a message; iterate until is_ready: true
wizard start <SERVER_ID>Transition to tool suggestion
wizard list-tools <SERVER_ID>Show suggested tools
wizard refine-tools <SERVER_ID> -m "..."Refine tool suggestions
wizard submit-tools <SERVER_ID>Confirm tool list
wizard suggest-env-vars <SERVER_ID>Generate env var suggestions
wizard list-env-vars <SERVER_ID>Show suggested env vars
wizard refine-env-vars <SERVER_ID> -m "..."Refine env var suggestions
wizard submit-env-vars <SERVER_ID>Confirm env vars
wizard set-auth <SERVER_ID>Generate bearer token
wizard generate-code <SERVER_ID>Trigger code generation
wizard deploy <SERVER_ID>Deploy to runtime
wizard status <SERVER_ID>Show current wizard state

Global Options

FlagDescription
--jsonOutput result as JSON (works on every command)
--versionPrint mcpheroctl version

Exit Codes

CodeMeaning
0Success
1General error
2Authentication error (not logged in or invalid token)
3Resource not found
4Validation error (bad arguments)
5Server / API error
6Wizard state error (step called out of order)

Example: End-to-End Workflow

# 1. Authenticate
mcpheroctl auth login --token <TOKEN>

# 2. Start a wizard session
SERVER_ID=$(mcpheroctl wizard create-session --json | jq -r '.server_id')

# 3. Describe requirements
mcpheroctl wizard conversation $SERVER_ID -m "I need a weather API server with current conditions and forecasts"
# Repeat until is_ready: true

# 4. Start tool suggestion
mcpheroctl wizard start $SERVER_ID

# 5. Review and submit tools
mcpheroctl wizard list-tools $SERVER_ID
mcpheroctl wizard submit-tools $SERVER_ID

# 6. Review and submit env vars
mcpheroctl wizard suggest-env-vars $SERVER_ID
mcpheroctl wizard submit-env-vars $SERVER_ID

# 7. Generate and deploy
mcpheroctl wizard generate-code $SERVER_ID
mcpheroctl wizard deploy $SERVER_ID

# 8. Get the server URL and API key
mcpheroctl server get $SERVER_ID
mcpheroctl server api-key $SERVER_ID

Further Reading

On this page