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

@vercel/connect

v0.2.4

Published

SDK for obtaining scoped tokens for third-party services on behalf of apps or users. Authenticates the calling Vercel project via [`@vercel/oidc`](https://www.npmjs.com/package/@vercel/oidc) and exchanges the OIDC token for a Vercel Connect-issued credent

Readme

@vercel/connect

SDK for obtaining scoped tokens for third-party services on behalf of apps or users. Authenticates the calling Vercel project via @vercel/oidc and exchanges the OIDC token for a Vercel Connect-issued credential.

Six entrypoints, all ESM:

  • @vercel/connect — core token / authorization SDK
  • @vercel/connect/ai-sdkVercel AI SDK glue: re-exports connectAuthProvider for MCP transports (optional peers: ai, @ai-sdk/mcp)
  • @vercel/connect/mcp — canonical MCP-spec OAuthClientProvider for any MCP client (optional peer: @ai-sdk/mcp)
  • @vercel/connect/eve — adapter helpers for Eve connections (optional peer: eve)
  • @vercel/connect/betterauthBetter Auth genericOAuth provider (optional peer: better-auth)
  • @vercel/connect/authjsAuth.js OAuth2Config provider (optional peer: @auth/core)

Install

pnpm add @vercel/connect

Usage

Core SDK

import { getToken } from '@vercel/connect';

const token = await getToken(process.env.CONNECTOR_LINEAR!, {
  subject: { type: 'user', id: 'user_123' },
});

Vercel AI SDK + MCP

import { createMCPClient } from '@ai-sdk/mcp';
import { streamText } from 'ai';
import {
  connectAuthProvider,
  ConsentRequiredError,
} from '@vercel/connect/ai-sdk';

const mcp = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://mcp.linear.app',
    authProvider: connectAuthProvider('oauth/linear', {
      subject: { type: 'user', id: 'user_123' },
    }),
  },
});

try {
  const result = await streamText({
    model: 'openai/gpt-5.4',
    tools: await mcp.tools(),
    prompt,
  });
  return result.toUIMessageStreamResponse();
} catch (err) {
  if (err instanceof ConsentRequiredError) return Response.redirect(err.url);
  throw err;
}

Tool-call approval (Human-in-the-Loop) is independent of Connect — use the AI SDK's toolApproval option or wrapMcpTools from @ai-sdk/policy-opa.

Non-AI-SDK MCP clients (the official MCP TypeScript SDK, Mastra, etc.) can import the same connectAuthProvider from @vercel/connect/mcp.

Eve

import { defineMcpClientConnection } from 'eve/connections';
import { connect } from '@vercel/connect/eve';

export default defineMcpClientConnection({
  url: 'https://mcp.linear.app/sse',
  auth: connect('linear'),
});

Better Auth

import { genericOAuth } from 'better-auth/plugins';
import { connect } from '@vercel/connect/betterauth';

genericOAuth({ config: [connect({ connector: 'linear' })] });

Auth.js

import { connect } from '@vercel/connect/authjs';

const providers = [connect({ connector: 'linear' })];

See the source under src/ for the full API (additional helpers like revokeToken, getTokenResponse, startAuthorization, typed error classes, and per-adapter options).