TypeScript · Agent framework

Use OpenRegistry from Vercel AI SDK

Use OpenRegistry from Vercel AI SDK (TypeScript) — generateText / streamText / agent flows.

Vercel AI SDK 4+ has first-class MCP support. OpenRegistry's tools appear natively in any generateText / streamText call — no schema conversion, no custom wrappers.

Install

npm install ai @ai-sdk/anthropic @modelcontextprotocol/sdk

Minimum working example

import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";

const transport = new StreamableHTTPClientTransport(
  new URL("https://openregistry.sophymarine.com/mcp")
);
const client = await createMCPClient({ transport });
const tools = await client.tools();

const { text } = await generateText({
  model: anthropic("claude-3-5-sonnet-latest"),
  prompt: "Find Revolut Ltd in the UK and list its officers.",
  tools,
  maxSteps: 8,
});

console.log(text);
await client.close();

What you get

Framework docs

Official MCP integration docs for Vercel AI SDK:

sdk.vercel.ai — createMCPClient ›

Use from a different framework?

OpenRegistry is a Model Context Protocol server. Any MCP client can connect — these are just the most popular agent frameworks.