MCP Server API
Expose PraisonAI tools as MCP (Model Context Protocol) servers that can be consumed by Claude Desktop, Cursor, and other MCP clients.Transport Types
MCP servers support two transport types:| Transport | Use Case | Endpoint |
|---|---|---|
| stdio | Local CLI tools, Claude Desktop | Standard input/output |
| SSE | Remote HTTP access | /sse and /messages/ |
Starting the Server
Using ToolsMCPServer
Using launch_tools_mcp_server
Using Agent.launch with MCP
SSE Transport Endpoints
When using SSE transport, the server exposes:GET /sse
Server-Sent Events endpoint for MCP communication. ConnectionPOST /messages/
Send messages to the MCP server. RequestMCP Protocol Methods
| Method | Description |
|---|---|
tools/list | List available tools |
tools/call | Execute a tool |
initialize | Initialize MCP session |
tools/call Example
Configuration
ToolsMCPServer Options
SSE Server Options
Claude Desktop Configuration
Add toclaude_desktop_config.json:
Built-in Tools
Load built-in tools by name:Error Responses
MCP errors follow JSON-RPC 2.0 format:| Code | Message |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params |
-32603 | Internal error |
Installation
See Also
- MCP Module - SDK reference
- Agent Launch API - HTTP deployment
- MCP Server Deploy - Production deployment

