Overview
Client Tools
SDK-defined
- Runs in your app process
- Full access to app state
Stdio Server
Subprocess
- External process
- stdio communication
- Any language
SSE Server
Streaming
- Server-Sent Events
- Real-time updates
HTTP Server
REST API
- REST API endpoint
- Stateless
- Any backend
Client Tools (Most Common)
Tools that run directly in your application, with handlers you define:When to Use
- Tools that need access to your app’s state
- Browser tools (DOM manipulation)
- Tools that call your own APIs
- Simple integrations
Stdio Servers
External processes that communicate via stdin/stdout. Great for using existing MCP servers or tools written in other languages.Configuration Options
When to Use
- Using existing MCP servers from the ecosystem
- Tools written in Python, Go, Rust, etc.
- Complex tools that benefit from process isolation
- Tools with heavy dependencies
Available MCP Servers
Popular pre-built servers:| Server | Description |
|---|---|
@anthropic/mcp-server-filesystem | File system access |
@anthropic/mcp-server-github | GitHub API integration |
@anthropic/mcp-server-postgres | PostgreSQL database |
@anthropic/mcp-server-sqlite | SQLite database |
@anthropic/mcp-server-brave | Brave search |
@anthropic/mcp-server-fetch | HTTP fetching |
SSE Servers
Connect to Server-Sent Events endpoints for real-time streaming tools:Configuration Options
When to Use
- Real-time data sources
- Long-running connections
- Server-push updates
- Live monitoring tools
HTTP Servers
Connect to REST API endpoints:Configuration Options
When to Use
- Existing REST APIs
- Serverless functions
- Third-party integrations
- Stateless tools
Combining Multiple Servers
Use multiple MCP servers together:Tool Naming
When using MCP servers, tools are namespaced:allowedTools and disallowedTools:
Building an MCP Server
Simple Server
With Zod Schemas
Error Handling
Always handle errors in tool handlers:- Try a different approach
- Ask for clarification
- Report the issue to the user