MCP Tools
Integrate Model Context Protocol (MCP) servers to extend agent capabilities with external tools, resources, and prompts.Quick Start
Transport Types
Stdio (Local Servers)
SSE (Server-Sent Events)
HTTP
WebSocket
OAuth Authentication
Resources
Access resources from MCP servers:Prompts
Use prompts from MCP servers:Popular MCP Servers
| Server | Package | Description |
|---|---|---|
| Filesystem | @modelcontextprotocol/server-filesystem | File operations |
| GitHub | @modelcontextprotocol/server-github | GitHub API |
| Slack | @modelcontextprotocol/server-slack | Slack integration |
| PostgreSQL | @modelcontextprotocol/server-postgres | Database queries |
| Brave Search | @modelcontextprotocol/server-brave-search | Web search |
Example: Filesystem Server
Example: GitHub Server
Cleanup
Always close MCP connections when done:Environment Variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | Yes | For the agent |
| Server-specific | Varies | MCP server requirements |
Best Practices
- Close connections - Always close MCP clients when done
- Handle errors - MCP servers may fail or timeout
- Use appropriate transport - Stdio for local, HTTP/SSE for remote
- Secure credentials - Use OAuth for authenticated servers

