AgentDomains MCP for Vercel AI SDK
Use StreamableHTTPClientTransport in Vercel AI SDK to give Next.js and Node agents live DNS automation.
MCP tool flow: Vercel AI SDK sends JSON-RPC calls to mcp.agentdomains.co and receives a live HTTPS domain.
Add Config
Open TypeScript: ai (experimental_createMCPClient) + @modelcontextprotocol/sdk and paste the snippet below.
Reload Tools
Refresh MCP tools in Vercel AI SDK. Confirm 20 AgentDomains tools appear.
Run Prompt
Paste the test prompt below to check, claim, and route a live domain.
TypeScript: ai (experimental_createMCPClient) + @modelcontextprotocol/sdk
1. Install & Configure Vercel AI SDK
Choose hosted Streamable HTTP for zero local setup, or pick local stdio to reuse your Go CLI config.
import { experimental_createMCPClient as createMCPClient, generateText } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { openai } from "@ai-sdk/openai";
const mcpClient = await createMCPClient({
transport: new StreamableHTTPClientTransport(
new URL("https://mcp.agentdomains.co"),
{ requestInit: { headers: { Authorization: `Bearer ${process.env.AGENTDOMAINS_API_KEY}` } } }
),
});
const tools = await mcpClient.tools();
const result = await generateText({ model: openai("gpt-4.1"), tools, prompt: "Check if edge-demo is free on makes.fyi" });
await mcpClient.close();
import { experimental_createMCPClient as createMCPClient } from "ai";
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
const mcpClient = await createMCPClient({
transport: new Experimental_StdioMCPTransport({
command: "npx",
args: ["-y", "agentdomains-mcp"],
env: { AGENTDOMAINS_API_KEY: process.env.AGENTDOMAINS_API_KEY ?? "" },
}),
});
2. Tested First Prompt
Reload MCP tools in Vercel AI SDK. Run this prompt to check a name, claim it, and set routing.
Check availability of edge-demo on makes.fyi and set up an HTTPS forward to our preview deployment.
3. Vercel AI SDK Setup Notes
- On Vercel Serverless / Edge Functions, always use StreamableHTTPClientTransport — stdio subprocesses cannot spawn in edge runtimes.
- Call await mcpClient.close() inside a try/finally block or onFinish callback when streaming responses.
- Enable maxSteps >= 4 in streamText/generateText so the model can chain check_availability → claim_domain → set_proxy.
4. Available MCP Tools (20 total)
Vercel AI SDK gets all 20 tools across account auth, domain claims, DNS records, and edge routing.
Account & Auth 5 tools
Domains & Stats 6 tools
DNS & ACME 4 tools
Edge Proxy & Forward 5 tools
Frequently asked questions
Does Vercel AI SDK work with Streamable HTTP or stdio?
Vercel AI SDK supports Streamable HTTP & stdio. Pick hosted Streamable HTTP when available for zero local Node setup, or run npx -y agentdomains-mcp for stdio.
Where does Vercel AI SDK store its MCP config?
Store it in TypeScript: ai (experimental_createMCPClient) + @modelcontextprotocol/sdk. Keep your adom_ API key in an env var and never commit it to Git.
How much does it cost to claim domains from Vercel AI SDK?
Start with a 30-day free trial for 10 names with no card. Pro costs $10/yr or $1/mo for up to 100 names.
Related MCP Clients
Mastra MCP Setup
Integrate AgentDomains into Mastra TypeScript agents via @mastra/mcp over Streamable HTTP or local stdio.
Python / TS Agent FrameworkOpenAI Agents SDK MCP Setup
Connect OpenAI Agents SDK via MCPServerStreamableHttp or MCPServerStdio. Let Python and TypeScript agents claim domains and write DNS.
LangChain MCP Setup
Load AgentDomains MCP tools into LangChain and LangGraph using MultiServerMCPClient over stateless Streamable HTTP or local stdio.
LLM App & Workflow PlatformDify MCP Setup
Register https://mcp.agentdomains.co inside Dify Studio to expose AgentDomains DNS and reverse-proxy tools to Dify Agent workflows.
Claim your agent domain now
Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.