Skip to content

feat: add vercel provider #1709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

utkarsh-dixit
Copy link
Collaborator

@utkarsh-dixit utkarsh-dixit commented Jun 26, 2025

TL;DR

Added Vercel AI SDK Provider with Model Context Protocol (MCP) support, including documentation and examples.

What changed?

  • Added a new Vercel AI SDK Provider section to the MCP providers documentation
  • Updated the VercelProvider class to support MCP integration through experimental_createMCPClient
  • Created a new example file vercel-mcp-example.ts demonstrating Gmail integration via MCP
  • Enhanced the Vercel example README with information about the new MCP capabilities
  • Updated the provider documentation to include MCP-specific usage instructions
  • Modified the provider to transform MCP URLs into the SSE format expected by Vercel AI SDK

How to test?

  1. Run the new MCP example:
cd ts/examples/vercel
bun src/vercel-mcp-example.ts
  1. Verify the provider works with Vercel AI SDK's MCP client:
import { VercelProvider } from '@composio/vercel';
import { experimental_createMCPClient } from 'ai';

const composio = new Composio({
  provider: new VercelProvider(),
});

const mcpConfig = await composio.mcp.create(...);
const serverUrls = await mcpConfig.getServer({ userId: "user-id" });
const client = await experimental_createMCPClient({ transport: serverUrls[0] });

Why make this change?

This change enables seamless integration between Composio's MCP servers and the Vercel AI SDK, allowing developers to use Composio's tools with Vercel's experimental MCP client. By supporting the SSE transport format expected by Vercel, users can now leverage Gmail and other external services through MCP in their Vercel AI applications with minimal configuration.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copy link
Collaborator

@haxzie haxzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good to me, please add tests if possible 🙌🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants