npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aerostack/sdk-vercel-ai

v0.11.27

Published

Use Aerostack workspace tools with the Vercel AI SDK

Readme

@aerostack/sdk-vercel-ai

Use Aerostack workspace tools with the Vercel AI SDK.

Aerostack is the full-stack platform for AI agents — compose MCP servers, skills, and functions into a single workspace URL that any AI agent can call. This SDK lets you drop 250+ pre-built tools into your Vercel AI app in 3 lines of code.

npm version License: MIT

Why?

The Vercel AI SDK supports tool calling across any LLM provider — but you still need to build and maintain each tool integration yourself. With Aerostack, you compose a workspace of tools (GitHub, Slack, Notion, Stripe, 250+ more) and this SDK makes them instantly available to generateText, streamText, or any AI provider.

Your App → Vercel AI SDK → @aerostack/sdk-vercel-ai → Aerostack Workspace → GitHub, Slack, Notion, ...

Install

npm install @aerostack/sdk-vercel-ai ai

Quick Start

import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';
import { getTools } from '@aerostack/sdk-vercel-ai';

const { tools } = await getTools({ workspace: 'my-workspace', token: 'mwt_...' });

const { text } = await generateText({
    model: openai('gpt-4o'),
    tools,
    maxSteps: 5,
    prompt: 'Create a GitHub issue for the login bug',
});

That's it. Tools auto-execute — no handleToolCall needed. The Vercel AI SDK handles the tool-call loop for you with maxSteps.

Streaming

import { streamText } from 'ai';

const { tools } = await getTools({ workspace: 'my-workspace', token: 'mwt_...' });

const result = streamText({
    model: openai('gpt-4o'),
    tools,
    maxSteps: 10,
    prompt: 'Summarize Notion pages and post to Slack',
});

for await (const chunk of result.textStream) {
    process.stdout.write(chunk);
}

Works With Any Provider

import { anthropic } from '@ai-sdk/anthropic';
import { google } from '@ai-sdk/google';

// Claude
const { text } = await generateText({
    model: anthropic('claude-sonnet-4-20250514'),
    tools,
    maxSteps: 5,
    prompt: 'Check GitHub PRs and notify on Slack',
});

// Gemini
const { text } = await generateText({
    model: google('gemini-2.0-flash'),
    tools,
    maxSteps: 5,
    prompt: 'Search Notion and create a report',
});

Factory Pattern

For reusable clients that share a single connection:

import { createAerostackVercelAI } from '@aerostack/sdk-vercel-ai';

const aero = createAerostackVercelAI({ workspace: 'my-workspace', token: 'mwt_...' });
const { tools } = await aero.tools();

API Reference

getTools(config)Promise<ToolSetResult>

Fetches tools from the workspace and converts to Vercel AI SDK ToolSet format. Each tool includes an execute function that calls the workspace gateway. Returns { tools, raw }.

createAerostackVercelAI(config)AerostackVercelAIClient

Creates a reusable client that shares a single WorkspaceClient instance.

formatToolResult(result)

Lower-level utility to flatten MCP tool results into strings.

How It Works

  1. Tool DiscoverygetTools() calls your Aerostack workspace gateway to fetch all connected MCP server tools
  2. Format Conversion — MCP tool schemas are wrapped with jsonSchema() from the AI SDK — zero conversion overhead since both use JSON Schema
  3. Auto-Execution — Each tool gets a built-in execute function that proxies calls through the workspace gateway to actual MCP servers
  4. Error Handling — Errors are caught and returned as string results, keeping the AI conversation flow intact

Requirements

  • Node.js 18+
  • ai (Vercel AI SDK) >= 3.0.0
  • An Aerostack workspace with a token (mwt_...)

Getting Your Workspace Token

  1. Sign up at app.aerostack.dev
  2. Create a workspace and add MCP servers (GitHub, Slack, Notion, etc.)
  3. Copy the workspace token (mwt_...) from the workspace settings

Related Packages

| Package | Framework | |---------|-----------| | @aerostack/sdk-openai | OpenAI SDK | | @aerostack/sdk-langchain | LangChain.js | | @aerostack/core | Core types + WorkspaceClient |

Links

License

MIT