Recommended Reading: For practical implementation details, see the MCP Integration Guide.
What is MCP?
The Model Context Protocol (MCP) is an open standard that enables seamless communication between AI applications and external tools. Slide’s Tyler package includes first-class MCP support, allowing your agents to:- Connect to any MCP-compatible server
- Use tools from external services
- Share context across applications
- Build interoperable AI systems
MCP Architecture in Slide
Tyler uses the official MCP SDK’sClientSessionGroup to manage connections to multiple MCP servers simultaneously. This provides:
- Automatic session lifecycle management
- Tool discovery and aggregation across servers
- Tool execution routing to the correct server
- Support for all SDK transport types (stdio, SSE, StreamableHTTP)
Quick Start
Python API (Recommended)
Using MCP Tools
Once connected, MCP tools are automatically available to your agent with namespaced names:MCP Server Types
1. Stdio Servers
Local processes that communicate via standard input/output. Great for local tools and development:2. StreamableHTTP Servers
HTTP-based servers using the newer streaming protocol. Recommended for hosted MCP servers:3. SSE (Server-Sent Events) Servers
Legacy HTTP transport for streaming connections:Creating MCP Servers
Using FastMCP (Python)
Create an MCP server that exposes tools to Slide:Advanced MCP Usage
Multiple Server Connections
Connect to multiple MCP servers simultaneously:Tool Filtering
Control which tools are available:Custom Prefixes
Override the default namespace prefix for cleaner tool names:Environment Variable Substitution
Use environment variables for secrets (recommended!):Graceful Degradation
Control failure behavior per server:Best Practices
1. Connection Management
1. Connection Management
Always cleanup MCP connections in long-running applications:For short scripts with
streamablehttp transport, cleanup is required:2. Security
2. Security
Never hardcode secrets:Only connect to trusted MCP servers - they execute with your agent’s permissions.
3. Tool Organization
3. Tool Organization
Use custom prefixes for cleaner tool names:
4. Fail-Safe Configuration
4. Fail-Safe Configuration
Use
fail_silent: True for optional servers: