CLI Reference
Complete reference for mcp-agent command-line interface, including commands for local development, configuration management, and cloud deployment.
Installation
Install mcp-agent CLI:Global Options
Available for all commands:Option | Description |
---|---|
--verbose, -v | Enable verbose output |
--quiet, -q | Minimize output |
--format <type> | Output format (text , json , yaml ) |
--color/--no-color | Enable/disable colored output |
--version | Show version and exit |
--help, -h | Show help |
Project Commands
mcp-agent init
Initialize a new mcp-agent project with templates and boilerplate.Option | Description | Default |
---|---|---|
--name <name> | Project name | Current directory name |
--template <type> | Project template | basic |
--path <dir> | Target directory | Current directory |
--force | Overwrite existing files | false |
mcp-agent quickstart
Create example projects with pre-built patterns.workflow
- All workflow pattern examplesresearcher
- MCP researcher use caseelicitations
- MCP elicitation patternsstate-transfer
- Workflow router exampledata-analysis
- Financial analyzer use casemcp-basic-agent
- Basic MCP agent exampletoken-counter
- Token counting exampleagent-factory
- Agent factory patternbasic-agent-server
- Basic agent server (asyncio)
mcp-agent go
Quick interactive agent for immediate testing.Option | Description | Default |
---|---|---|
--model <name> | Model to use | Default model |
--servers <list> | MCP servers to connect | None |
mcp-agent check
Check configuration and environment.- Configuration file syntax
- API key availability
- MCP server connectivity
- Temporal connection (if configured)
Configuration Commands
mcp-agent config
Manage mcp-agent configuration files.Command | Description | Example |
---|---|---|
show | Display configuration | mcp-agent config show |
check | Validate configuration | mcp-agent config check |
edit | Open in editor | mcp-agent config edit |
path | Show file paths | mcp-agent config path |
mcp-agent keys
Manage API keys and secrets securely.Command | Description | Example |
---|---|---|
show | Display keys (masked) | mcp-agent keys show |
set <provider> | Set API key | mcp-agent keys set openai |
unset <provider> | Remove API key | mcp-agent keys unset openai |
test <provider> | Test connectivity | mcp-agent keys test anthropic |
openai
- OpenAI APIanthropic
- Anthropic Claudegoogle
- Google AIazure
- Azure OpenAIbedrock
- AWS Bedrockcohere
- Coheregroq
- Groq Cloudtogether
- Together AIollama
- Local Ollama
mcp-agent models
List and configure AI models.Command | Description | Example |
---|---|---|
list | List available models | mcp-agent models list |
set-default <model> | Set default model | mcp-agent models set-default gpt-4o |
Cloud Commands
Top-level Aliases
These commands are available at the top level for convenience:mcp-agent deploy
- Deploy to cloud (alias forcloud deploy
)mcp-agent login
- Authenticate (alias forcloud auth login
)mcp-agent logout
- Sign out (alias forcloud auth logout
)mcp-agent whoami
- Show current identity (alias forcloud auth whoami
)
mcp-agent login/logout/whoami
Authenticate with MCP Agent Cloud.mcp-agent deploy
Deploy agent to MCP Agent Cloud.APP_NAME
- Name of the MCP App to deploy (required)
Option | Description | Default |
---|---|---|
--app-description, -d | App description | None |
--config-dir, -c | Config directory | Current directory |
--no-secrets | Skip secrets processing | false |
--non-interactive | Fail if prompting needed | false |
--dry-run | Validate without deploying | false |
--api-url | API base URL | https://deployments.mcp-agent.com |
--api-key | API key | From env or config |
mcp-agent cloud configure
Configure access to a deployed MCP app.Option | Description | Default |
---|---|---|
--id, -i | Server URL to configure | Required |
--secrets-file, -s | Path to secrets file | None |
--secrets-output-file, -o | Output for configured secrets | mcp_agent.configured.secrets.yaml |
--params | Show required params and exit | false |
--dry-run | Validate without storing | false |
mcp-agent cloud servers
Manage deployed servers.Command | Description | Example |
---|---|---|
list | List servers | mcp-agent cloud servers list |
describe <id> | Show details | mcp-agent cloud servers describe srv_123 |
delete <id> | Delete server | mcp-agent cloud servers delete srv_123 |
workflows <id> | List workflows for server | mcp-agent cloud servers workflows srv_123 |
mcp-agent cloud apps
is an alias for mcp-agent cloud servers
.
mcp-agent cloud app
Manage a single MCP App.Command | Description | Example |
---|---|---|
delete <id> | Delete app | mcp-agent cloud app delete app_123 |
status <id> | Get app status | mcp-agent cloud app status app_123 |
workflows <id> | List app workflows | mcp-agent cloud app workflows app_123 |
mcp-agent cloud workflows
Manage workflow executions.Command | Description | Example |
---|---|---|
list | List workflow definitions | mcp-agent cloud workflows list |
runs | List workflow runs | mcp-agent cloud workflows runs |
describe <id> <run> | Get workflow status | mcp-agent cloud workflows describe srv_123 run_456 |
status <id> <run> | Alias for describe | mcp-agent cloud workflows status srv_123 run_456 |
suspend <id> <run> | Pause workflow | mcp-agent cloud workflows suspend srv_123 run_456 |
resume <id> <run> | Resume workflow | mcp-agent cloud workflows resume srv_123 run_456 |
cancel <id> <run> | Cancel workflow | mcp-agent cloud workflows cancel srv_123 run_456 |
mcp-agent cloud logger
View and manage logs.Command | Description | Example |
---|---|---|
tail <id> | View logs | mcp-agent cloud logger tail srv_123 |
configure <id> | Setup logging | mcp-agent cloud logger configure srv_123 |
tail
:
--follow
- Stream logs in real-time--since <duration>
- Time range (e.g.,1h
,30m
)--from <RFC3339>
- Start time--to <RFC3339>
- End time--grep <pattern>
- Filter logs--limit <n>
- Maximum entries--orderby <field>
- Sort by field (time
,severity
,tokens
)--desc/--asc
- Sort order
Environment Variables
Configure CLI behavior:Variable | Description | Default |
---|---|---|
MCP_API_BASE_URL | Cloud API endpoint | https://deployments.mcp-agent.com |
MCP_API_KEY | Authentication key | - |
Configuration Files
mcp-agent uses these configuration files:File | Purpose | Location |
---|---|---|
mcp_agent.config.yaml | Project configuration | Project root |
mcp_agent.secrets.yaml | API keys and secrets | Project root |
credentials.json | Cloud credentials | ~/.config/mcp-agent/ |
File Discovery
The CLI searches for configuration files in this order:- Current directory
- Parent directories (recursively)
.mcp-agent
subdirectory in each~/.mcp-agent/
(home directory fallback)
mcp_agent.config.yaml
and mcp-agent.config.yaml
are accepted filenames (same for secrets).