Model Context Protocol (MCP)
Connect Tambo to external tools and services using the MCP standard.
Model Context Protocol (MCP) allows you to give Tambo access to tools defined by other people. Many popular services publish MCP servers, and Tambo provides a simple way to connect to them. This is a quick way to allow your users to conversationally interact with other services without needing to write any of the interaction code yourself.
Connection Types
Tambo supports two ways to connect to MCP servers:
-
Server-side MCP (recommended) - Configure MCP servers through the Tambo dashboard. Best for shared services, OAuth authentication, and optimal performance.
-
Client-side MCP - Connect directly from the browser to MCP servers accessible to end users. Best for local servers and user-specific services.
Quick Start
<TamboProvider
mcpServers={[
{
// MCP server configuration
url: "http://some-mcp-endpoint.com",
// Optional stable prefix used when multiple MCP servers are configured
// If omitted, a key is derived from the URL hostname
serverKey: "external",
// Optional custom headers, eg.
// { "Authorization": `Bearer ${token}` } or { "X-Api-Key": "1234567890" }
customHeaders: {},
transport: MCPTransport.HTTP, // optional, defaults to HTTP
},
]}
>
<TamboMcpProvider>
<App />
</TamboMcpProvider>
</TamboProvider>Note: As of
@tambo-ai/react@0.65.0, passmcpServerstoTamboProviderinstead ofTamboMcpProvider.
When more than one MCP server is configured, Tambo prefixes names using serverKey to avoid collisions:
- Prompts:
serverKey:promptName - Tools:
serverKey__toolName
If you don't specify serverKey, Tambo derives one from the server URL hostname (for example, https://mcp.linear.app/mcp becomes linear). For predictable behavior across environments, set serverKey explicitly. Avoid : and __ in the serverKey (since prompts use : and tools use __ as separators); prefer letters, numbers, _, and -. With a single MCP server, names are not prefixed.