Skip to content

feat: add @plasmate/ai — Vercel AI SDK integration#37

Merged
dbhurley merged 1 commit intoplasmate-labs:masterfrom
dbhurley:feat/plasmate-ai-vercel-sdk
Apr 4, 2026
Merged

feat: add @plasmate/ai — Vercel AI SDK integration#37
dbhurley merged 1 commit intoplasmate-labs:masterfrom
dbhurley:feat/plasmate-ai-vercel-sdk

Conversation

@dbhurley
Copy link
Copy Markdown
Member

@dbhurley dbhurley commented Apr 2, 2026

Summary

Adds integrations/vercel-ai/ — a new @plasmate/ai package that makes Plasmate's browser tools available as first-class tools in the Vercel AI SDK.

What it does

createPlasmateTools() spawns plasmate mcp as a stdio subprocess, connects via the AI SDK's experimental_createMCPClient + Experimental_StdioMCPTransport, and returns CoreTool objects ready for generateText / streamText.

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
  • Build: dual ESM + CJS via tsup, full TypeScript types

Follows existing patterns

Structured like integrations/browser-use and integrations/langchain — lives under integrations/ 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.

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.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

@dbhurley is attempting to deploy a commit to the dbh ventures Team on Vercel.

A member of the Team first needs to authorize it.

@dbhurley dbhurley merged commit 90d1cbf into plasmate-labs:master Apr 4, 2026
2 of 3 checks passed
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.

1 participant