Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

MCP Server CLI Commands

PraisonAI provides comprehensive CLI commands for running and managing MCP servers.

Primary Command

praisonai mcp <subcommand> [options]

Subcommands

serve

Start the MCP server.
# STDIO transport (default, for Claude Desktop)
praisonai mcp serve

# HTTP Stream transport
praisonai mcp serve --transport http-stream

# With all options
praisonai mcp serve \
  --transport http-stream \
  --host 127.0.0.1 \
  --port 8080 \
  --endpoint /mcp \
  --api-key YOUR_KEY \
  --name praisonai \
  --response-mode batch \
  --session-ttl 3600 \
  --log-level info
Options:
OptionDescriptionDefault
--transportstdio or http-streamstdio
--hostServer host127.0.0.1
--portServer port8080
--endpointMCP endpoint path/mcp
--api-keyAPI key for authenticationNone
--nameServer namepraisonai
--response-modebatch or streambatch
--cors-originsComma-separated CORS origins*
--allowed-originsComma-separated allowed originslocalhost
--session-ttlSession TTL in seconds3600
--no-terminationDisable client session terminationFalse
--resumabilityEnable SSE resumabilityTrue
--log-leveldebug, info, warning, errorwarning
--jsonOutput in JSON formatFalse
--debugEnable debug modeFalse

list-tools

List all available MCP tools.
praisonai mcp list-tools
Example Output:
Available MCP Tools (75):

  • praisonai.chat.completion
    Generate chat completion.

  • praisonai.agent.chat
    Chat with a PraisonAI agent.

  • praisonai.images.generate
    Generate images from text prompt.
  ...

list-resources

List all available MCP resources.
praisonai mcp list-resources
Example Output:
Available MCP Resources (7):

  • praisonai://memory/sessions
    List all memory sessions.

  • praisonai://workflows
    List available workflows in current directory.
  ...

list-prompts

List all available MCP prompts.
praisonai mcp list-prompts
Example Output:
Available MCP Prompts (7):

  • deep-research
    Generate a deep research prompt for comprehensive topic analysis

  • code-review
    Generate a code review prompt for analyzing code quality
  ...

config-generate

Generate client configuration for MCP clients.
# Claude Desktop config
praisonai mcp config-generate --client claude-desktop

# Cursor config
praisonai mcp config-generate --client cursor

# VSCode config
praisonai mcp config-generate --client vscode

# Windsurf config
praisonai mcp config-generate --client windsurf

# Save to file
praisonai mcp config-generate --client claude-desktop --output config.json

# HTTP Stream config
praisonai mcp config-generate --client claude-desktop --transport http-stream --port 8080
Options:
OptionDescriptionDefault
--clientClient typeclaude-desktop
--outputOutput file pathstdout
--transportTransport typestdio
--hostServer host (for http-stream)127.0.0.1
--portServer port (for http-stream)8080

doctor

Check MCP server health and configuration.
praisonai mcp doctor
Example Output:
PraisonAI MCP Server Health Check

Protocol Version: 2025-11-25
Supported Versions: 2025-11-25, 2025-03-26, 2024-11-05

Registered Components:
  • Tools: 75
  • Resources: 7
  • Prompts: 7

Environment:
  ✓ OPENAI_API_KEY
  ○ ANTHROPIC_API_KEY
  ○ GOOGLE_API_KEY

Dependencies:
  ✓ starlette
  ✓ uvicorn
  ✓ praisonaiagents

✓ MCP server is ready to run

Deprecated Commands

The following commands are deprecated and will be removed in a future version:
# DEPRECATED - use 'praisonai mcp serve' instead
praisonai serve mcp

# DEPRECATED - use 'praisonai mcp serve' instead
praisonai serve tools
These commands will show a deprecation warning and redirect to praisonai mcp serve.

Examples

Start STDIO Server for Claude Desktop

praisonai mcp serve --transport stdio

Start HTTP Server with Authentication

praisonai mcp serve \
  --transport http-stream \
  --port 8080 \
  --api-key mysecretkey

Start Server with Custom Origins

praisonai mcp serve \
  --transport http-stream \
  --allowed-origins "http://localhost:3000,https://myapp.com"

Generate and Apply Claude Desktop Config

# Generate config
praisonai mcp config-generate --client claude-desktop --output ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Or manually copy the output
praisonai mcp config-generate --client claude-desktop

Debug Mode

praisonai mcp serve --transport http-stream --debug --log-level debug

Environment Variables

VariableDescription
OPENAI_API_KEYOpenAI API key for chat/image tools
ANTHROPIC_API_KEYAnthropic API key
GOOGLE_API_KEYGoogle API key

Exit Codes

CodeDescription
0Success
1Error

See Also