How to Use the Amazon DSP MCP in Vercel AI SDK
Stream Amazon DSP campaign data straight into your React frontends using the Vercel AI SDK.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Amazon DSP MCP to Vercel AI SDK
Create your Vinkius account to connect Amazon DSP to Vercel AI SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Vercel AI SDK Streaming for Ad Data
Connect this Amazon DSP MCP server to your Next.js project to stream campaign metrics live instead of showing users a loading spinner. When a media planner asks for weekly stats, your agent hits `request_report` and immediately pushes the response chunks directly to the UI. The integration manages the polling behind the scenes. Your code calls `get_report_status` repeatedly, updating the frontend state the second the data drops. You get real-time interface updates without wiring up manual WebSockets.
Render Audiences in Real-Time
Custom media dashboards require instant access to targeting parameters. Pass the `list_audiences` and `list_creatives` tools into your `streamText` function. Your AI client grabs the exact segments and banner IDs attached to a specific advertiser account. Those results render immediately in your Svelte or Vue components. Media planners see the available creative assets populate instantly. They adjust targeting on the fly without waiting for a massive JSON payload to resolve.
Edge-Ready Campaign Inspection
Inspecting programmatic ad setups usually means navigating clunky native interfaces. Give your users a chat interface that understands their specific DSP setup. By exposing `get_campaign_details` to your edge functions, the agent pulls budget, pacing, and flight dates on demand. It digs deeper by chaining `list_ad_groups` to show exactly which line items are active right now. You keep the serverless architecture lean because Vinkius manages the actual MCP connection. Just call `mcpClient.close()` when the stream finishes.
Set up Amazon DSP MCP in Vercel AI SDK
Prerequisites
- Node.js 18+ and a TypeScript project
-
ai+@modelcontextprotocol/sdkpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install ai @modelcontextprotocol/sdkplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Create the Streamable HTTP transport
Use
StreamableHTTPClientTransportwith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and use tools
Call
mcpClient.tools()to auto-discover all Amazon DSP tools. Pass them directly togenerateText()orstreamText()— no manual schema definitions needed. - 4
Works with any model provider
Swap
openai("gpt-4o")for any AI SDK provider — Anthropic, Google, Mistral. The MCP tools work identically across all supported models.
import { experimental_createMCPClient as createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const transport = new StreamableHTTPClientTransport(
new URL("https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
);
const mcpClient = await createMCPClient({ transport });
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "List recent Amazon DSP transactions",
});
console.log(text);
await mcpClient.close(); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Amazon DSP. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Amazon DSP MCP in Vercel AI SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Amazon DSP MCP today
We host it, we monitor it, we maintain it. You just paste one token.