Streamable HTTP · https://mcp.upp3.com/mcp 56 Hosted MCP Tools · 67 REST Endpoints · 16 Platforms -81.3% Verified Token Savings (mode="summary") Next.js App Router & Edge Ready · 0 Credits on 504/429

Connect EdgeData Hosted MCP to
Vercel AI SDK & Next.js App Router

Power streaming Next.js and TypeScript AI copilots with live structured data from 16 global platforms. Mount all 56 Hosted MCP tools in seconds via experimental_createMCPClient pointed at https://mcp.upp3.com/mcp (same-origin alias https://upp3.com/mcp also valid) with Authorization: Bearer, or wrap any of 67 /v1/* REST endpoints at https://api.upp3.com/v1/* using tool() + zod — backed by -81.3% average mode="summary" token savings, GDPR 0-PII (strip_real_estate_pii), and 0 credits charged on HTTP 504/429.

56 Hosted MCP Tools
Zero local stdio binaries across 16 global platforms & 67 /v1/* REST routes
-81.3% Token Savings
V2.19 verified mode="summary" reduction (-78.8% compact JSON) inside streamText
0 Credit Charge on 504/429
Strict zero-billing guardrail on upstream timeouts & rate limits + GDPR 0-PII
Next.js App Router & Edge
Native streamText, generateText, experimental_createMCPClient & zod tools
3-Step Production Integration · HowTo Blueprint

Wire Vercel AI SDK to EdgeData in Under 2 Minutes

Authenticate Streamable HTTP MCP calls to https://mcp.upp3.com/mcp (or https://upp3.com/mcp) with Authorization: Bearer YOUR_EDGEDATA_API_KEY, or invoke REST routes at https://api.upp3.com/v1/* using X-API-Key: YOUR_EDGEDATA_API_KEY.

Step 01 · Provision Key

Claim 100 Free Monthly Credits

Generate an instant sandbox API key (no card required) in the Free Key Wizard below. Every TypeScript & Next.js snippet on this page auto-fills immediately.

Step 02 · Mount MCP or REST Tool

Attach experimental_createMCPClient or tool()

Use Streamable HTTP MCP (https://mcp.upp3.com/mcp, alias https://upp3.com/mcp) to auto-load 56 tools in streamText/generateText, or wrap https://api.upp3.com/v1/* with zod schemas.

Step 03 · Ship Guardrails

Lock mode="summary" & 504/429 Backoff

Keep mode="summary" enabled for -81.3% pretty / -78.8% compact token savings, rely on server-side GDPR 0-PII scrubbing, and retry HTTP 504/429 at strictly 0 credits.

Vercel AI SDK + Streamable HTTP MCP Client
npm install ai @ai-sdk/openai @modelcontextprotocol/sdk zod
Next.js .env.local Configuration
OPENAI_API_KEY=sk-...
EDGEDATA_API_KEY=YOUR_EDGEDATA_API_KEY
Using placeholder YOUR_EDGEDATA_API_KEY — claim a free key below to auto-fill every Vercel AI SDK snippet. Auto-Fill Free Key →
lib/edgedata-mcp.ts
import { experimental_createMCPClient } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const EDGEDATA_API_KEY = process.env.EDGEDATA_API_KEY ?? "YOUR_EDGEDATA_API_KEY";
// Primary Streamable HTTP gateway; same-origin alias https://upp3.com/mcp is also valid
const EDGEDATA_MCP_URL = "https://mcp.upp3.com/mcp";

export async function createEdgeDataMcpClient() {
  const transport = new StreamableHTTPClientTransport(new URL(EDGEDATA_MCP_URL), {
    requestInit: {
      headers: {
        Authorization: `Bearer ${EDGEDATA_API_KEY}`,
      },
    },
  });

  // Auto-discovers all 56 Hosted MCP tools across 16 global platforms
  return experimental_createMCPClient({ transport });
}
Streamable HTTP Parity · Zero Local Sidecars

Point StreamableHTTPClientTransport at https://mcp.upp3.com/mcp (or same-origin alias https://upp3.com/mcp) with Authorization: Bearer. Serverless Next.js deployments on Vercel never need local stdio binaries, headless browsers, or OAuth callback routes, and every MCP client shares the exact same key and credit balance as https://api.upp3.com/v1/*.

Production Blueprints · Verified Live Tool & REST Schemas

3 End-to-End Next.js & TypeScript Agent Pipelines

Switch tabs locally to inspect production-ready Vercel AI SDK handlers for cross-channel ecommerce, GDPR 0-PII transatlantic real estate, and TradingView financial quotes with HTTP 504/429 zero-credit retry protection.

app/api/agent/route.ts

Ecommerce Price Intelligence (app/api/agent/route.ts · streamText + experimental_createMCPClient): Connects Next.js App Router to https://mcp.upp3.com/mcp, filters down to verified commerce tools (amazon_get_product_detail, walmart_get_item, tiktok_shop_search_products), enforces mode="summary", and cleanly closes the MCP transport when streaming completes.

streamText + experimental_createMCPClient amazon_get_product_detail walmart_get_item tiktok_shop_search_products mode="summary" · -79.8% to -80.9% tokens
// app/api/agent/route.ts (Next.js App Router)
import { experimental_createMCPClient, stepCountIs, streamText } from "ai";
import { openai } from "@ai-sdk/openai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

export const runtime = "nodejs";
export const maxDuration = 60;

const EDGEDATA_API_KEY = process.env.EDGEDATA_API_KEY ?? "YOUR_EDGEDATA_API_KEY";
const MCP_URL = "https://mcp.upp3.com/mcp"; // Same-origin alias https://upp3.com/mcp also valid

const COMMERCE_ALLOWLIST = new Set([
  "amazon_get_product_detail",
  "amazon_search_products",
  "walmart_get_item",
  "tiktok_shop_search_products",
]);

export async function POST(req: Request) {
  const { prompt } = (await req.json()) as { prompt?: string };

  const transport = new StreamableHTTPClientTransport(new URL(MCP_URL), {
    requestInit: {
      headers: {
        Authorization: `Bearer ${EDGEDATA_API_KEY}`,
      },
    },
  });

  const mcpClient = await experimental_createMCPClient({ transport });
  const allTools = await mcpClient.tools();

  // Narrow tool surface for faster LLM selection & lower schema tokens
  const commerceTools = Object.fromEntries(
    Object.entries(allTools).filter(([name]) => COMMERCE_ALLOWLIST.has(name))
  );

  const userPrompt =
    prompt ||
    "Run a 3-channel price benchmark with mode='summary': " +
      "1) amazon_get_product_detail(asin='B0BSHF7WHW', country='US', mode='summary'); " +
      "2) walmart_get_item(item_id='5043652254', mode='summary'); " +
      "3) tiktok_shop_search_products(query='portable espresso maker', region='US', mode='summary'). " +
      "Stream a concise Markdown comparison table with price spread and rating gaps.";

  const result = streamText({
    model: openai("gpt-4.1-mini"),
    system:
      "You are an ecommerce price intelligence copilot powered by EdgeData Hosted MCP. " +
      "Always pass mode='summary' on every tool call (-81.3% avg pretty / -78.8% compact token savings). " +
      "If any upstream call returns HTTP 504 or 429, retry once safely (strictly 0 credits charged).",
    prompt: userPrompt,
    tools: commerceTools,
    stopWhen: stepCountIs(6),
    onFinish: async () => {
      await mcpClient.close();
    },
    onError: async () => {
      await mcpClient.close();
    },
  });

  return result.toTextStreamResponse();
}
Architecture Selection & Token Budget · Verified V2.19 Benchmarks

Vercel AI SDK: Hosted MCP vs. REST tool() Comparison

Choose between Streamable HTTP MCP auto-discovery and deterministic zod REST wrappers inside Next.js App Router—or mix both in the same codebase using one EdgeData key.

Engineering Dimension Hosted MCP (experimental_createMCPClient) Typed REST tool() + zod DIY HTML / Browser Scraper Route
Gateway & Auth Header https://mcp.upp3.com/mcp (alias https://upp3.com/mcp) · Authorization: Bearer https://api.upp3.com/v1/* (67 routes) · X-API-Key Headless browser service + proxy credentials + custom parser API
Next.js Runtime Fit Node.js App Router Route Handlers & Server Actions (zero local stdio processes) Both Vercel Edge Runtime and Node.js Route Handlers with tiny bundle size Incompatible with Edge Runtime; heavy Playwright/Chrome cold starts
Verified Context Token Savings -81.3% Pretty / -78.8% Compact avg via mode="summary" (V2.19 6-endpoint benchmark) -81.3% Pretty / -78.8% Compact + optional zod post-filtering before LLM context 3,000–15,000+ raw Markdown tokens per page inflating streamText latency & bill
HTTP 504 / 429 Retry Cost Strictly 0 Credits Charged on upstream timeouts & rate limits Strictly 0 Credits Charged + direct access to Retry-After & meta.credits_remaining Billed residential proxy GBs, CAPTCHA solves, and serverless duration on every retry
GDPR 0-PII Privacy Boundary Gateway-level scrubbing (strip_real_estate_pii, review & jobs scrubbers) before streaming Identical server-side GDPR 0-PII boundary across all 16 global platforms Unfiltered DOM leaks personal emails & phone numbers into Vercel logs & client UI
Pricing & Unit Economics $0 Free (100/mo) · $47 Pack (25k never-expiring) · $49/mo Pro (15k) · $149/mo Scale (60k) Same unified API key & credit weights (1 credit commerce; 2 credits Redfin/Rightmove/TradingView) Unpredictable proxy bandwidth + scraping infra + high LLM token burn
No Card Required

Free

$0 / month
  • ✓100 credits / mo · 10 RPM
  • ✓All 56 Hosted MCP tools & 67 REST routes
  • ✓mode="summary" (-81.3% avg tokens)
Claim Free Key ↓
Never Expires

One-Time Pack

$47 one-time
  • ✓25,000 credits · never expire
  • ✓Zero monthly subscription lock-in
  • ✓HTTP 504/429 = 0 credits charged
Buy $47 Pack →
Most Popular

Pro

$49 / month
  • ✓15,000 credits / mo · 60 RPM
  • ✓Deep reviews (500/call) + NDJSON stream
  • ✓Built for production Next.js SaaS copilots
Choose Pro ($49/mo) →
High Throughput

Scale

$149 / month
  • ✓60,000 credits / mo · 200 RPM
  • ✓Up to 2,000 reviews/call + priority routing
  • ✓High-concurrency multi-tenant Vercel apps
Choose Scale ($149/mo) →
Vercel AI SDK MCP FAQ

Frequently Asked Questions

Streamable HTTP auth, MCP vs REST tool() trade-offs, verified token savings, 504/429 billing, and GDPR 0-PII.

How do I connect Vercel AI SDK experimental_createMCPClient to EdgeData over Streamable HTTP?
Pass a StreamableHTTPClientTransport pointed at https://mcp.upp3.com/mcp (the same-origin alias https://upp3.com/mcp is equally valid) with Authorization: Bearer <YOUR_EDGEDATA_API_KEY> in requestInit.headers. Calling await mcpClient.tools() auto-discovers all 56 Hosted MCP tools across 16 platforms with zero local stdio subprocesses.
Should I use experimental_createMCPClient or custom zod REST tool() wrappers in Next.js App Router?
Use experimental_createMCPClient when you want rapid multi-platform tool discovery across all 56 EdgeData tools inside streamText or generateText without maintaining schemas. Use custom ai tool() + zod wrappers against https://api.upp3.com/v1/* (with X-API-Key) when running on strict Edge Runtime workers, enforcing custom backoff on HTTP 504/429, or trimming specific fields before streaming to clients.
How much context token cost does mode="summary" save inside streamText and generateText loops?
Across EdgeData’s 6 V2.19 summarizer.py benchmark endpoints (Amazon, TikTok Shop, Walmart, Redfin, Rightmove, and TradingView), mode="summary" cuts payload tokens by an average of 81.3% in pretty JSON and 78.8% in compact JSON, keeping multi-step Vercel AI SDK tool calls fast and affordable.
Do upstream HTTP 504 or 429 retries inside Next.js Route Handlers burn EdgeData credits?
No. EdgeData enforces a strict 0 credits charged rule on every upstream HTTP 504 timeout or HTTP 429 rate-limit response across all 56 Hosted MCP tools and 67 REST endpoints, so exponential backoff retries in Next.js Route Handlers never double-bill your account.
Are Redfin US and Rightmove UK responses GDPR 0-PII safe for Next.js copilots, and what are the pricing tiers?
Yes. EdgeData runs server-side recursive scrubbing (including strip_real_estate_pii) to remove personal emails, phone numbers, and homeowner contacts before JSON leaves the gateway. One API key unlocks all 16 platforms across four transparent tiers: $0 Free (100 credits/mo), $47 One-Time Pack (25,000 never-expiring credits), $49/mo Pro (15,000 credits/mo), and $149/mo Scale (60,000 credits/mo).