MCP Server CLI Commands
PraisonAI provides comprehensive CLI commands for running and managing MCP servers.Primary Command
Subcommands
serve
Start the MCP server.| Option | Description | Default |
|---|---|---|
--transport | stdio or http-stream | stdio |
--host | Server host | 127.0.0.1 |
--port | Server port | 8080 |
--endpoint | MCP endpoint path | /mcp |
--api-key | API key for authentication | None |
--name | Server name | praisonai |
--response-mode | batch or stream | batch |
--cors-origins | Comma-separated CORS origins | * |
--allowed-origins | Comma-separated allowed origins | localhost |
--session-ttl | Session TTL in seconds | 3600 |
--no-termination | Disable client session termination | False |
--resumability | Enable SSE resumability | True |
--log-level | debug, info, warning, error | warning |
--json | Output in JSON format | False |
--debug | Enable debug mode | False |
list-tools
List all available MCP tools.list-resources
List all available MCP resources.list-prompts
List all available MCP prompts.config-generate
Generate client configuration for MCP clients.| Option | Description | Default |
|---|---|---|
--client | Client type | claude-desktop |
--output | Output file path | stdout |
--transport | Transport type | stdio |
--host | Server host (for http-stream) | 127.0.0.1 |
--port | Server port (for http-stream) | 8080 |
doctor
Check MCP server health and configuration.Deprecated Commands
The following commands are deprecated and will be removed in a future version:praisonai mcp serve.
Examples
Start STDIO Server for Claude Desktop
Start HTTP Server with Authentication
Start Server with Custom Origins
Generate and Apply Claude Desktop Config
Debug Mode
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key for chat/image tools |
ANTHROPIC_API_KEY | Anthropic API key |
GOOGLE_API_KEY | Google API key |
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error |
See Also
- PraisonAI MCP Server - Full MCP server documentation
- MCP Transports - Transport protocol details
- Custom MCP Server - Building custom MCP servers

