📦
Bridge
A TypeScript utility that bridges the Model Context Protocol (MCP) with the Vercel AI SDK.
0 installs
3 stars
Trust: 49 — Fair
Devtools
Installation
npx mcp-bridgeAsk AI about Bridge
Powered by Claude · Grounded in docs
I know everything about Bridge. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
MCP Bridge
A TypeScript utility that bridges the Model Context Protocol (MCP) with the Vercel AI SDK.
Features
- Converts MCP tools into Vercel AI SDK compatible tools
Installation
npm install mcp-bridge
Usage
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { getToolSet } from "mcp-bridge";
import { generateText } from "ai";
// Initialize your MCP client
const client = new Client(/* your config */);
await client.connect(/* client transport */);
// Get the tool set
const toolSet = await getToolSet(client);
// Use the tools with the Vercel AI SDK
// The toolSet object will contain all the MCP tools converted to AI SDK format
// e.g.
const result = await generateText({
model: yourModel,
tools: toolSet,
prompt: 'What is the weather in San Francisco?',
});
