Skip to main content
MCP (Model Context Protocol) enables agents to connect to external tool servers using standardized transports - stdio, SSE, HTTP stream, or WebSocket.

Quick Start

1

Install MCP Support

2

Connect to MCP Server


Transport Types


Connection Methods

Stdio (Subprocess)

HTTP/SSE

WebSocket


Configuration Options


How It Works

Tool Discovery

MCP automatically discovers tools from the server:

Tool Execution

Tools are executed through the MCP protocol:

Creating MCP Servers

Expose your tools as an MCP server:

Common Patterns

NPX Servers (Smithery)

Multi-Server Setup


Best Practices

  • stdio: Best for local tools, simple setup
  • HTTP Stream: Best for remote servers, modern standard
  • WebSocket: Best for real-time, bidirectional communication
Increase timeout for slow-starting servers or network latency.
Use debug=True to see MCP protocol messages when debugging.
MCP servers may not always be available. Handle initialization failures gracefully.

Tools

Function-based tools

Skills

Modular skill packages