SpecStream for Cloudflare Agents
SpecStream is the live web data engine for teams and agents. Give an agent built with the Cloudflare Agents SDK live web search. It calls SpecStream over MCP or from an AI SDK tool, and gets an answer with the page each value came from.
What you get
- Two tools, by name
- addMcpServer with the id specstream keys the tools tool_specstream_search_web and tool_specstream_read_pages, so the model gets only those two.
- MCP or a plain tool
- Connect https://api.specstream.ai/mcp with the key in the transport headers, or wrap the Search API in an AI SDK tool().
- A limit on every call
- The Worker runs on its own API key with a spending limit. Each search is {search} per 1,000 and is kept in your history with its sources.
Set it up
- Create a SpecStream API key under Agents & API and store it with npx wrangler secret put SPECSTREAM_API_KEY.
- In onStart, call this.addMcpServer("SpecStream", "https://api.specstream.ai/mcp") with id specstream and the key as a Bearer header.
- Pass tool_specstream_search_web and tool_specstream_read_pages from this.mcp.getAITools() to generateText.
The full setup guide has every step, with what to do if something doesn’t arrive.
Live web data, in Cloudflare Agents.
Ask in your own words for companies, places, people, filings or anything else the web lists.