How to Use the Adafruit IO MCP in Vercel AI SDK
Connect the Vercel AI SDK to your Adafruit IO data through this managed MCP server. Stream sensor readings directly into your React components.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Adafruit IO MCP to Vercel AI SDK
Create your Vinkius account to connect Adafruit IO 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.
Live IoT Dashboards with this MCP Server
Pull all your Adafruit IO dashboards and feeds right into your UI. Use `list_dashboards` and `list_feeds` to build out a navigation menu, then call `get_dashboard` to show a specific one. Your users won't wait for a full page load to see their IoT setup. When a user clicks on a feed, you can stream the latest data points directly into a chart. The `list_data` tool gets recent values, and the Vercel AI SDK streams them into your components as they arrive. It feels instant, not like a loading screen.
Get Specific Sensor Readings
Your agent can grab individual data points on command. Just pass a feed key and a data ID to `get_data`. This is perfect for showing the exact value of a sensor at a specific time, like a temperature reading from last Tuesday. Because you're using the AI SDK, this isn't just a backend call. The result streams directly to the frontend, updating a specific part of your UI without a full re-render. You can build interfaces that feel alive with real-time IoT information.
Inspect Triggers and Groups
This server lets you see all your configured triggers and groups. Your agent can use `list_triggers` to get a complete overview or `get_trigger` to inspect a specific one. This is useful for building admin panels where users can see how their automations are set up. Combine this with `list_groups` to get a full picture of your device organization. You can build an interface that shows which devices belong to which group and what triggers are associated with them, all powered by your AI client.
Set up Adafruit IO 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 Adafruit IO 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 Adafruit IO 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 Adafruit IO. 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 Adafruit IO 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 Adafruit IO MCP today
We host it, we monitor it, we maintain it. You just paste one token.