Server: Recipes MCP
Deploy recipes as MCP servers using praisonai mcp serve-recipe
Deploy any PraisonAI recipe as an MCP server for Claude Desktop, Cursor, and other MCP clients.
Quick Start
- Install Dependencies
bash pip install "praisonai[mcp]" - Set API Key
bash export OPENAI_API_KEY="your-key" - List Available Recipes
bash praisonai mcp list-recipesExpected Output:
Available Recipes (2): • data-analyst (v1.0.0) Data analysis template using pandas tools • support-reply (v1.0.0) Draft a friendly reply to a customer support ticketFilter by source with
--source custom|project|package, by tags with--tags video,social, or add--jsonfor CI. See Recipe → MCP Bridge. - Serve Recipe as MCP
bash praisonai mcp serve-recipe support-reply --transport stdio
CLI – STDIO Transport
For Claude Desktop local integration:
praisonai mcp serve-recipe support-reply --transport stdioExpected Output:
🚀 Starting Recipe MCP Server 'support-reply'
📡 Transport: stdio
🛠️ Available tools: support_reply.run, support_reply.agent.respondCLI – HTTP Stream Transport
For remote access:
praisonai mcp serve-recipe support-reply --transport http-stream --port 8080Expected 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.respondPython 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-desktopOutput:
{
"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-replyOutput:
✅ 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.instructionsInspect Recipe Schema
praisonai mcp inspect-recipe support-replySecurity
Default denied tools (dangerous operations):
shell.exec,shell.runfile.write,file.deletedb.write,db.deleteexecute_command,os.system
Override with --safe-mode=false (not recommended).
Troubleshooting
| Issue | Fix |
|---|---|
| Recipe not found | praisonai mcp list-recipes |
list-recipes --source rejects a value | --source accepts only custom, project, package — local and all were never valid |
| Missing deps | pip install "praisonai[mcp]" |
| Tool denied | Check tool_denylist |
| Port in use | Change --port |
Related
- Tools MCP – Deploy tools as MCP server
- Agents MCP – Deploy agents as MCP server
- PraisonAI MCP – Full PraisonAI MCP server