Client-side MCP integration allows your application to connect to MCP servers
that are accessible from the end user's browser, for instance when using a local
MCP server.
This is useful for:
Local MCP servers running on the user's machine
MCP servers where the user's browser is already authenticated
Private or internal services behind a firewall, that are only visible from the user's browser
Note:There is currently no support for authenticated MCP servers when using client-side MCP connections.
Dependency note
The @tambo-ai/react/mcp subpath declares @modelcontextprotocol/sdk, zod, and zod-to-json-schema as optional peer dependencies. If you import this subpath in your application, make sure these packages are installed with compatible versions:
zod can also be ^3.25 if you prefer Zod 3; both ^3.25 and ^4.0 satisfy the SDK's zod/v3 subpath constraints. This keeps MCP support opt-in while avoiding runtime errors when you start using the MCP hooks and providers.
To implement client-side MCP support, pass mcpServers to TamboProvider:
import { TamboProvider } from "@tambo-ai/react";import { MCPTransport } from "@tambo-ai/react/mcp";function MyApp() { return ( <TamboProvider components={...} mcpServers={[ { // MCP server configuration url: "http://localhost:8123/", // Optional stable prefix used when multiple MCP servers are configured // If omitted, a key is derived from the URL hostname (e.g., "https://mcp.linear.app/mcp" -> "linear") serverKey: "local", // Optional custom headers, eg. // { "Authorization": `Bearer ${token}` } or { "X-Api-Key": "1234567890" } customHeaders: {}, transport: MCPTransport.HTTP, // optional, defaults to HTTP }, ]} > {/* Your application components */} </TamboProvider> );}
TamboProvider automatically establishes connections to the specified MCP servers and makes their tools available to Tambo agents in your application.
Note
Tambo always prefixes names using the serverKey to identify which MCP server they come from:
If you do not provide serverKey, Tambo derives one from the server URL (for example, https://mcp.linear.app/mcp becomes linear). To keep things predictable across environments, set serverKey explicitly. Avoid using : and __ in the serverKey since prompts/resources use : and tools use __ as separators; prefer letters, numbers, _, and -.
MCP servers can expose resources (such as files, documents, or other data) that can be referenced in prompts. Tambo provides hooks and UI components to work with these resources.
When a user selects a resource from the button, it inserts a reference with the syntax @<serverKey>:<resourceUri> (e.g., @linear:issue://TAM-123). The resourceUri portion (for example, issue://TAM-123) is defined by the MCP server; Tambo only adds the @<serverKey>: prefix.