4,500+ servers built on MCP Fusion
Vinkius
Baidu Qianfan logo
Vinkius
Vercel AI SDK logo

How to Use the Baidu Qianfan MCP in Vercel AI SDK

Run Baidu Qianfan models in Next.js edge routes and stream live responses to your users with Vercel AI SDK.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Baidu Qianfan MCP on Cursor AI Code Editor MCP Client Baidu Qianfan MCP on Claude Desktop App MCP Integration Baidu Qianfan MCP on OpenAI Agents SDK MCP Compatible Baidu Qianfan MCP on Visual Studio Code MCP Extension Client Baidu Qianfan MCP on GitHub Copilot AI Agent MCP Integration Baidu Qianfan MCP on Google Gemini AI MCP Integration Baidu Qianfan MCP on Lovable AI Development MCP Client Baidu Qianfan MCP on Mistral AI Agents MCP Compatible Baidu Qianfan MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
Vercel AI SDK

Connect Baidu Qianfan MCP to Vercel AI SDK

Create your Vinkius account to connect Baidu Qianfan 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.

GDPR Free for Subscribers

Stream Qianfan chat completions in Vercel AI SDK

Stop making users stare at loading spinners while waiting for Chinese-language LLM responses. When your React app calls `chat_completions` through this MCP Server, the Vercel AI SDK pulls token chunks from Baidu's endpoint and pipes them straight to the frontend. You just pass the MCP tool directly into `streamText`. The client handles the edge-compatible HTTP transport under the hood, giving your users instant feedback as the Qianfan model generates text.

Live-render Qianfan text-to-image outputs

When your user inputs a prompt, your Next.js app can trigger the `text_to_image` tool to hit Baidu's generative models. The SDK handles the async tool execution state, meaning you can show a native UI skeleton while the image bytes compile. Because the SDK maps tool outputs directly to UI components, you don't need boilerplate state variables. The generated image URL feeds straight into your React node as soon as the server returns the payload.

Map Qianfan embeddings in edge functions

Running vector operations on Vercel's edge network requires low-latency data fetching. Use `get_embeddings` alongside `list_datasets` to feed contextually relevant data into your Qianfan prompts without hitting cold starts. The SDK's lightweight footprint ensures that initializing the MCP connection over HTTP doesn't bloat your edge function execution time. You get fast, serverless vector generation directly paired with Baidu's infrastructure.

Setup guide

Set up Baidu Qianfan MCP in Vercel AI SDK

Prerequisites

  • Node.js 18+ and a TypeScript project
  • ai + @modelcontextprotocol/sdk packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run npm install ai @modelcontextprotocol/sdk plus your preferred model provider (e.g. @ai-sdk/openai).

  2. 2

    Create the Streamable HTTP transport

    Use StreamableHTTPClientTransport with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Discover and use tools

    Call mcpClient.tools() to auto-discover all Baidu Qianfan tools. Pass them directly to generateText() or streamText() — no manual schema definitions needed.

  4. 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.

index.ts
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 Baidu Qianfan 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 Baidu Qianfan. 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 Baidu Qianfan MCP in Vercel AI SDK

You configure your credentials on Vinkius, which exposes a single secure endpoint. In your Vercel AI SDK code, you simply pass this endpoint to `createMCPClient` without leaking your Baidu API keys to the frontend.
While you can't stream the image generation process itself, you can use the `text_to_image` tool within `streamText`. The SDK will stream the tool invocation status to your UI, and then render the completed image URL once Baidu Qianfan finishes the job.
You call `get_embeddings` through the MCP client and pass the resulting vector array to your vector database. The SDK handles the type mapping automatically, making it easy to run semantic searches before hitting Baidu's chat models.
No. Vinkius hosts the server for you on a zero-trust sandbox. Your Vercel AI SDK application connects to it over a secure HTTP transport, meaning you only write client-side or serverless code.
Vinkius runs the server in an ephemeral V8 sandbox. When you call `list_train_jobs` or `list_datasets`, the data passes through encrypted channels and is never cached or stored on Vinkius servers.

Start using the Baidu Qianfan MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 6 tools

We've already built the connector for Baidu Qianfan. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 6 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.