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.
Deploy any PraisonAI recipe as an MCP server for Claude Desktop, Cursor, and other MCP clients.
Quick Start
Install Dependencies
pip install "praisonai[mcp]"
Set API Key
export OPENAI_API_KEY="your-key"
List Available Recipes
praisonai mcp list-recipes
Serve Recipe as MCP
praisonai mcp serve-recipe support-reply --transport stdio
CLI - STDIO Transport
For Claude Desktop local integration:
praisonai mcp serve-recipe support-reply --transport stdio
Expected Output:
🚀 Starting Recipe MCP Server 'support-reply'
📡 Transport: stdio
🛠️ Available tools: support_reply.run, support_reply.agent.respond
CLI - HTTP Stream Transport
For remote access:
praisonai mcp serve-recipe support-reply --transport http-stream --port 8080
Expected Output:
🚀 Starting Recipe MCP Server 'support-reply'
📡 HTTP Stream endpoint: http://127.0.0.1:8080/mcp
🛠️ Available tools: support_reply.run, support_reply.agent.respond
Python SDK
from praisonai.mcp_server import RecipeMCPAdapter, RecipeMCPConfig
# Create adapter with config
config = RecipeMCPConfig(
recipe_name="support-reply",
expose_agent_tools=True,
expose_run_tool=True,
safe_mode=True
)
adapter = RecipeMCPAdapter("support-reply", config=config)
adapter.load()
# Get MCP server
server = adapter.to_mcp_server()
server.run(transport="stdio")
Recipe MCP Mapping
| Recipe Component | MCP Primitive |
|---|
| Recipe metadata | Server metadata |
| Agent tools | MCP Tools (namespaced) |
| Agent instructions | MCP Prompts |
| Recipe config | MCP Resources |
| Recipe outputs | MCP Resources |
RecipeMCPConfig Options
| Field | Type | Default | Description |
|---|
recipe_name | str | - | Recipe to serve |
expose_agent_tools | bool | True | Expose agent tools |
expose_run_tool | bool | True | Expose run tool |
tool_namespace | str | prefixed | flat, nested, prefixed |
expose_config | bool | True | Expose config as resource |
expose_outputs | bool | True | Expose outputs as resource |
expose_prompts | bool | True | Expose prompts |
safe_mode | bool | True | Enable security restrictions |
tool_allowlist | list | None | Allowed tool names |
tool_denylist | list | None | Denied tool names |
CLI Options
| Option | Default | Description |
|---|
--transport | stdio | stdio or http-stream |
--host | 127.0.0.1 | HTTP host |
--port | 8080 | HTTP port |
--safe-mode | True | Enable security |
--log-level | warning | Log level |
Generate Client Config
# Generate Claude Desktop config
praisonai mcp config-generate-recipe support-reply --client claude-desktop
Output:
{
"mcpServers": {
"support-reply": {
"command": "praisonai",
"args": ["mcp", "serve-recipe", "support-reply", "--transport", "stdio"]
}
}
}
Connect MCP Client
Claude Desktop (claude_desktop_config.json):
For STDIO:
{
"mcpServers": {
"support-reply": {
"command": "praisonai",
"args": ["mcp", "serve-recipe", "support-reply", "--transport", "stdio"]
}
}
}
For HTTP Stream:
{
"mcpServers": {
"support-reply": {
"url": "http://localhost:8080/mcp",
"transport": "http-stream"
}
}
}
Validate Recipe
Check if a recipe is MCP-compatible:
praisonai mcp validate-recipe support-reply
Output:
✅ Recipe 'support-reply' is MCP-compatible
Tools: 3
• support_reply.run
• support_reply.agent.respond
• support_reply.agent.analyze
Resources: 2
• recipe://support-reply/config
• recipe://support-reply/outputs
Prompts: 1
• support_reply.instructions
Inspect Recipe Schema
praisonai mcp inspect-recipe support-reply
Security
Default denied tools (dangerous operations):
shell.exec, shell.run
file.write, file.delete
db.write, db.delete
execute_command, os.system
Override with --safe-mode=false (not recommended).
Troubleshooting
| Issue | Fix |
|---|
| Recipe not found | praisonai mcp list-recipes |
| Missing deps | pip install "praisonai[mcp]" |
| Tool denied | Check tool_denylist |
| Port in use | Change --port |