How to Use the FRED Series — U.S. Economic Time Series MCP in Vercel AI SDK
Stream U.S. economic data directly into your Next.js frontend with Vercel AI SDK.
Works with every AI agent you already use
…and any MCP-compatible client
Connect FRED Series — U.S. Economic Time Series MCP to Vercel AI SDK
Create your Vinkius account to connect FRED Series — U.S. Economic Time Series 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.
Search 816,000+ Indicators
The `search_series` tool lets your agent find specific economic metrics by keyword across the entire FRED database. You pass a query like "unemployment rate" and get back matching IDs ordered by popularity. Once you have the ID, `get_series` pulls the exact metadata. Your Vercel AI SDK setup streams this directly to the user interface, meaning users watch the exact indicator details appear on screen without waiting for a full database roundtrip.
Pull Real-Time Economic Data
Using `get_observations`, your agent retrieves actual data values for any FRED time series. This tool handles date filtering, unit transformations like percent change, and frequency aggregation natively. You don't need to write custom math logic in your frontend. The MCP Server processes the log transformations before sending the payload, so your React charts render the exact figures immediately.
Vercel AI SDK MCP Server Vintages
The `get_vintage_dates` tool exposes historical revision dates for ALFRED-style analysis. Economic data changes after the initial release, and this shows you exactly when those numbers shifted. You can pair this with `get_series_updates` to monitor fresh data releases. If you build a financial dashboard, your agent knows exactly when macro indicators update and pushes the new data straight to the edge.
Set up FRED Series — U.S. Economic Time Series 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 FRED Series — U.S. Economic Time Series 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 FRED Series — U.S. Economic Time Series 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 FRED. 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 FRED Series — U.S. Economic Time Series 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 FRED Series — U.S. Economic Time Series MCP today
We host it, we monitor it, we maintain it. You just paste one token.