Skip to main content

MCP Server CLI Commands

PraisonAI provides comprehensive CLI commands for running and managing MCP servers.
The MCP server host ships as the standalone praisonai-mcp package. Every praisonai mcp serve … example below also runs as praisonai-mcp serve … — both forms are equivalent for host commands. See The Three MCP Layers for how the host fits.

Primary Command

Subcommands

list-tools, list-resources, list-prompts, serve, and doctor all share the same register_all() registration — anything serve exposes at runtime shows up in the corresponding list-* command (see sibling parity fix #2146).

serve

Start the MCP server.
Options:
Use --keys-file for per-team, least-privilege scoped keys. See Scoped API keys for the JSON format, the operation→scope map, and the insufficient_scope response.

list-tools

List all available MCP tools.
Example Output:

list-resources

List all available MCP resources.
Example Output:
The list-resources / list-prompts commands correctly print the registered entries as of PraisonAI v4.6.154. On earlier releases the two commands returned "No resources registered" / "No prompts registered" even when doctor reported 7 of each — see upstream PR #3220. Upgrade with pip install -U "praisonai-mcp[all]" (or pip install -U "praisonai[mcp]") if you see the old empty output.

list-prompts

List all available MCP prompts.
Example Output:
Same version cutover as list-resources: list-prompts prints the 7 registered prompts as of PraisonAI v4.6.154. Earlier releases printed "No prompts registered" even when doctor reported 7 — see upstream PR #3220.

config-generate

Generate client configuration for MCP clients.
Options: Output: Since v4.6.154, the generator auto-detects praisonai-mcp on your PATH and emits the matching STDIO command.

doctor

Health check for the MCP server. Human-readable by default, or machine-readable with --json.
Example Output (text):
Example Output (--json):
JSON-mode failures still emit valid JSON, so CI parsers never choke on Rich-formatted text:
On Windows consoles using a legacy code page (e.g. cp1252), doctor falls back to ASCII markers ([OK], [--], [X]) instead of the Unicode ✓ ○ ✗ — so it never crashes with UnicodeEncodeError. Add --json for automation on any platform; it never emits Unicode symbols. This mirrors the umbrella praisonai doctor status-symbol handling.

Deprecated Commands

The following commands are deprecated and will be removed in a future version:
These commands will show a deprecation warning and redirect to 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

Exit Codes

In doctor --json mode, missing API keys alone (with all dependencies present) still exit 0 — only a missing dependency or an exception exits 1.

Common Issues

See Also