launch(protocol="mcp") — the built-in idiom that delegates to serve_agents(...) under the hood.
Same code path as
serve_agents([...]). launch(protocol="mcp") calls serve_agents(...) for you, so the published tools (ask_{name} + list_agents), the /mcp endpoint, and per-session continuity are identical. Pick whichever idiom fits your code — a method on the Agent/Agents object, or the standalone function.Quick Start
1
Install Dependencies
praisonai-mcp is an optional package imported lazily. Without it, launch(protocol="mcp") prints: “MCP serving requires the ‘praisonai-mcp’ package.”2
Set API Key
3
Create Agent MCP Server
4
Verify
Which idiom fits your code?
Single Agent as MCP
ask_tweetagent + list_agents. The output comes from praisonai-mcp and the endpoint is /mcp.
Multi-Agent as MCP
ask_{name} tool — here ask_researcher and ask_writer — plus one shared list_agents.
path is ignored in MCP mode. protocol="http" behaviour is unchanged.MCP Endpoints
See Serve Agents for the canonical tool schema and session model.
launch() Parameters
Connect MCP Client
Claude Desktop (claude_desktop_config.json):
.cursor/mcp.json):
Test MCP Tools
Docker Deployment
app.py:Troubleshooting
Related
- Serve Agents - The
serve_agents([...])functionlaunch()delegates to - API Vocabulary - One page for
approval=andlaunch(protocol=...) - Tools MCP - Deploy tools as MCP server
- Recipes MCP - Deploy recipes as MCP server
- PraisonAI MCP - Full PraisonAI MCP server
- Agents HTTP - Deploy as HTTP server

