Legacy documentation. These pages are inherited from the upstream OpenAffiliate project and may describe endpoints, packages and repositories that Afftera does not operate. For what this site publishes today, see About.
References
AI SDK
Use the Vercel AI SDK to build AI-powered affiliate tools.
Usage
TypeScript
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
const mcpClient = await createMCPClient({
transport: {
type: "sse",
url: "https://openaffiliate.dev/api/mcp",
},
});
const tools = await mcpClient.tools();
const { text } = await generateText({
model: anthropic("claude-sonnet-4.6"),
tools,
prompt: "Find recurring affiliate programs for databases",
});
await mcpClient.close();