How to Use the Blueshift MCP in Vercel AI SDK
Stream real-time Blueshift campaign metrics and customer profile updates directly into your Next.js UI using the Vercel AI SDK.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Blueshift MCP to Vercel AI SDK
Create your Vinkius account to connect Blueshift 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.
Stream Blueshift Campaign Data with Vercel AI SDK
The `get_campaign_performance` and `get_campaign_detail` tools pull marketing analytics directly into your application's frontend. Your AI client invokes these tools to fetch raw performance metrics and format them on the fly. Because we use this Vercel AI SDK setup, the data renders in your UI as it arrives instead of making users wait for a slow API handshake to finish. You don't need to build custom loading screens or backend polling routes. Connect the server using `createMCPClient` and pass the tools directly to `streamText`. Your users watch the AI pull live open rates and click counts into the dashboard in real-time.
Update Customer Profiles on the Edge
The `create_update_customer` tool writes user attributes directly to your marketing database from Edge Functions. This setup allows your AI client to modify profiles instantly based on user chat behavior. You handle identity updates right at the network edge, dropping latency down to single-digit milliseconds. To make this work, fetch the customer data via `get_customer` first to see what needs changing. The Vercel AI SDK handles the MCP tool execution loop, allowing your model to decide which fields to update and execute the write operation without spinning up heavy Node.js runtimes.
Pull Live Product Catalogs Into Chat
The `get_catalog_items` and `list_catalogs` tools let your conversational agent browse through your active Blueshift inventory. Your AI client reads these catalogs to suggest relevant products to users during a support session. By feeding these tools into your model, you turn a basic chat interface into an interactive shopping assistant. Simply map the tools from your MCP Server instance into the `generateText` function. The SDK handles the schema validation, so your model receives structured catalog items and presents them to the user without formatting errors.
Set up Blueshift 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 Blueshift 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 Blueshift 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 Blueshift. 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 Blueshift 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 Blueshift MCP today
We host it, we monitor it, we maintain it. You just paste one token.