feat: add @plasmate/ai — Vercel AI SDK integration#37
Merged
dbhurley merged 1 commit intoplasmate-labs:masterfrom Apr 4, 2026
Merged
feat: add @plasmate/ai — Vercel AI SDK integration#37dbhurley merged 1 commit intoplasmate-labs:masterfrom
dbhurley merged 1 commit intoplasmate-labs:masterfrom
Conversation
Adds a new integration package under integrations/vercel-ai/ that wraps
Plasmate's MCP server for use with the Vercel AI SDK.
## What it does
createPlasmateTools() spawns `plasmate mcp` as a stdio subprocess,
connects via the AI SDK's experimental_createMCPClient + StdioMCPTransport,
and returns CoreTool objects ready for generateText/streamText.
```ts
import { createPlasmateTools } from '@plasmate/ai'
import { generateText } from 'ai'
import { openai } from '@ai-sdk/openai'
const { tools, close } = await createPlasmateTools()
const { text } = await generateText({
model: openai('gpt-4o'),
tools,
maxSteps: 5,
prompt: 'Summarize the top stories on news.ycombinator.com',
})
await close()
```
## Package details
- Name: @plasmate/ai
- Version: 0.1.0
- License: Apache-2.0
- Peer deps: ai >= 4.0.0, @ai-sdk/mcp >= 0.0.1
- Dual ESM + CJS build via tsup
- Full TypeScript types
Follows the same structure as integrations/browser-use and integrations/langchain.
|
@dbhurley is attempting to deploy a commit to the dbh ventures Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
integrations/vercel-ai/— a new@plasmate/aipackage that makes Plasmate's browser tools available as first-class tools in the Vercel AI SDK.What it does
createPlasmateTools()spawnsplasmate mcpas a stdio subprocess, connects via the AI SDK'sexperimental_createMCPClient+Experimental_StdioMCPTransport, and returnsCoreToolobjects ready forgenerateText/streamText.Package details
@plasmate/aiai >= 4.0.0,@ai-sdk/mcp >= 0.0.1tsup, full TypeScript typesFollows existing patterns
Structured like
integrations/browser-useandintegrations/langchain— lives underintegrations/alongside the other framework adapters.Why this matters
The Vercel AI SDK is the most widely adopted TypeScript AI framework. This gives every Next.js / Node.js developer using the AI SDK a one-liner to drop Plasmate's browser capabilities into their agents — no manual MCP wiring required.