Documentation Index
Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
Use this file to discover all available pages before exploring further.
You can use the Vercel AI SDK with Corsair through the dashboard or in code.
In the dashboard
- Sign in at app.corsair.dev.
- Open Dashboard and click New instance.
- Open your instance and click Add Plugin to enable an integration (e.g. GitHub, Slack).
- Click New User to add a tenant — enter a tenant ID and click Save.
- Connect the integration for that tenant: click the cell where the tenant row meets the plugin column, then sign in with OAuth or enter credentials.
- Click the tenant name in the first column to open the side panel.
- Copy the MCP URL and create an API key (New key → name → Create → copy the secret once).
For SDK apps you can also use a developer API key from API Keys in the sidebar (scoped to your instance) with tenant.mcp.createVercelClient().
Quick Start under SDK → Vercel copies a full starter if you want a guided demo.
In code
With developer API key (backend)
Uses your developer key + tenant.mcp.createVercelClient() — no separate MCP secret file:
npm install @corsair-dev/app ai @ai-sdk/mcp @ai-sdk/openai
import { openai } from "@ai-sdk/openai";
import { createClient } from "@corsair-dev/app";
import { stepCountIs, streamText } from "ai";
const corsair = createClient({ apiKey: process.env.CORSAIR_DEV_KEY! });
const mcpClient = await corsair
.instance(process.env.CORSAIR_INSTANCE_ID!)
.tenant("alice")
.mcp.createVercelClient();
const stream = streamText({
model: openai("gpt-4.1"),
tools: await mcpClient.tools(),
stopWhen: stepCountIs(15),
prompt: "Star the corsairdev/corsair repo on GitHub",
});
for await (const text of stream.textStream) {
process.stdout.write(text);
}
await mcpClient.close?.();
With tenant MCP key
import { createClient, createVercelAiMcpClient } from "@corsair-dev/app";
const key = await corsair
.instance(instanceId)
.tenant("alice")
.mcpKeys.create("vercel-agent");
const mcpClient = await createVercelAiMcpClient({
url: key.mcpHttpUrl,
apiKey: key.secret,
});
const tools = await mcpClient.tools();
Always await mcpClient.tools() before passing to streamText.
Run it
Run your script or pass any prompt to streamText.
If you connected GitHub, the Quick Start prompt is:
Use Corsair to star the Corsair repo on GitHub