AI SDK (runstack-tools)
Drop-in Runstack meta tools for the Vercel AI SDK. Use 150+ connector tools in any agentic workflow with one line.
runstack-tools is the official npm package that wraps the Runstack MCP server as native Vercel AI SDK tools. Add 150+ connector tools (GitHub, Notion, Gmail, Linear, Google Sheets, Google Calendar, …) to any generateText, streamText, or agent loop with a single import.
Under the hood it forwards tools/call JSON-RPC requests to /mcp — same auth, same usage tracking, same 4 meta tools.
Install
npm install runstack-tools ai zodYou'll need a Runstack API key (rsk_…). See API Keys.
Quick start
import { generateText } from 'ai';
import { runstackTools } from 'runstack-tools';
await generateText({
model: 'anthropic/claude-sonnet-4-5',
prompt: 'Star the vercel/ai repo on GitHub and email me a confirmation.',
tools: runstackTools(process.env.RUNSTACK_API_KEY!),
});That single tools: line gives the model access to every tool across every connector you have linked.
Scoping to one connector
When you only need a single connector, scope search_tools to it. All 4 meta tools are still returned, so the agent can authenticate and execute as needed — but discovery is limited to the chosen connector.
tools: runstackTools('github', process.env.RUNSTACK_API_KEY!)Supported connector slugs:
githubnotiongmaillineargoogle-sheetsgooglecalendar
What you get
runstackTools() returns an object with the four AI SDK tool() definitions that mirror the meta tools on the MCP server:
| Tool | Purpose |
|---|---|
search_tools | Discover tools by regex over names and descriptions |
check_authentication | Verify the user has connected the required provider |
initiate_connection | Get an OAuth link for the user to connect a provider |
execute_tool | Run any discovered tool with type-coerced arguments |
Because the object shape is Record<string, Tool>, it plugs straight into any AI SDK call site:
import { streamText } from 'ai';
import { runstackTools } from 'runstack-tools';
const result = streamText({
model: 'anthropic/claude-sonnet-4-5',
messages,
tools: runstackTools(process.env.RUNSTACK_API_KEY!),
});You can also merge them with your own tools:
tools: {
...runstackTools(apiKey),
myCustomTool: tool({ /* ... */ }),
}Self-hosted endpoint
If you're running Runstack on your own infrastructure, override the endpoint:
runstackTools(apiKey, { endpoint: 'https://runstack.mycompany.com/mcp' })
// or with a connector
runstackTools('github', apiKey, { endpoint: 'https://runstack.mycompany.com/mcp' })How it relates to /mcp
| Surface | Best for |
|---|---|
runstack-tools | Building agents with the Vercel AI SDK in Node/Edge |
| MCP Server | Claude Desktop, Cursor, any MCP-native client |
| stdio MCP | Local tools that need a stdio MCP transport |
All three speak to the same registry and the same 4 meta tools — pick whichever matches your runtime.
Meta Tools
Full reference for the 4 meta tools exposed by the Runstack MCP server — search_tools, check_authentication, initiate_connection, and execute_tool.
Skills
Agent skills that teach AI coding assistants how to use Runstack correctly. Drop into Claude Code, Cursor, or any custom agent framework.