ContextForge
Register SpecStream with your ContextForge gateway through POST /gateways, and every client behind it can search the live web, read pages and ask for structured data through one ContextForge endpoint, on one SpecStream key with a spending limit.
What you need
- A running ContextForge gateway, from PyPI (
mcp-contextforge-gateway) or the container, and a gateway token made withmcpgateway.utils.create_jwt_tokeninMCPGATEWAY_BEARER_TOKEN, as its README shows.curlandjq. - A SpecStream account. New accounts start with $10 of credit, no card. Create one.
- 1
1. Create a SpecStream API key
In SpecStream, open Agents & API, choose API keys, then Create API key, and give it a spending limit above 0.
ContextForge keeps one token per gateway and sends it on every call it forwards to SpecStream, so every user of these tools spends from this key and its limit is the ceiling for all of them. Make a key for the gateway alone, and put it in
SPECSTREAM_API_KEYin your shell. - 2
2. Register SpecStream with POST /gateways
Send the name, SpecStream's address and the transport. The transport defaults to
SSE, so setSTREAMABLEHTTP.auth_typebearerwith the key inauth_tokenmakes ContextForge sendAuthorization: Bearer <key>to SpecStream. Use your gateway's address in place ofhttp://localhost:4444(port 8080 behind the Docker Compose stack's nginx):Terminal - 3
3. Check the tools
ContextForge reads SpecStream's tool list when it registers the gateway. Each tool's name starts with the gateway's slug and the separator,
-by default, sosearch_webbecomesspecstream-search-web. List the tools of this gateway alone:Terminal - 4
4. Bundle the tools in a virtual server
Clients reach tools through a virtual server. This one carries web search and page reading only; add the ids of the Deep Search tools, such as
specstream-compileandspecstream-quote-capacity-work, if your clients should ask for structured data too:Terminal - 5
5. Connect a client
Point any MCP client at
http://localhost:4444/servers/<server id>/mcpover Streamable HTTP, with a ContextForge token in theAuthorizationheader. The client seesspecstream-search-webandspecstream-read-pagesnext to the other tools you bundled.
Or add it in the Admin UI
Open /admin, go to MCP Servers, and fill in Add New MCP Server or Gateway: MCP Server Name specstream, MCP Server URL https://api.specstream.ai/mcp, Transport Type Streamable HTTP, Authentication Type Bearer Token, and the SpecStream key in Token. Click Add Gateway. ContextForge imports the tools the same way.
When registration is asynchronous
With GATEWAY_ASYNC_LIFECYCLE_ENABLED=true, POST /gateways answers 202 Accepted with status pending, and a worker connects to SpecStream after the reply. Read GET /gateways/specstream until the gateway is active, then list its tools. After SpecStream adds a tool, POST /gateways/$GATEWAY_ID/tools/refresh reads the list again.
Ask through the gateway
In a client, ask a question with a recent answer. The model calls specstream-search-web with {"q": "<the question>"} and gets back an answer and the sources it read, each with url, title, site and snippet. To read a page it found, it calls specstream-read-pages with {"urls": ["<url>"]} and gets the page's main text as Markdown.
Who can spend from the key
A gateway registered with no visibility is public. Set "visibility": "team" with your team_id, or "private", in the registration body when only some users of the gateway should reach SpecStream's tools. A virtual server with only the search and reading tools keeps Deep Search out of their reach as well.
Why SpecStream behind a gateway
SpecStream's Search API reads each answer from the live web at the moment of the call. It scores 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. Scores and method are on the benchmarks page.
One registration gives every client search, page reading and structured records with a source URL and read time on every value, on one key and one spending limit.
Cost
Registering SpecStream in ContextForge is free. Each specstream-search-web call is one Search API call at $5 per 1,000 searches of up to 10 results, and each page specstream-read-pages reads is $0.80 per 1,000 pages; a page with no text is not charged. Both come out of the balance with no quote and no approval, within the key's spending limit.
Deep Search is priced per row, and nothing runs until its quote is approved: authorize_capacity_work needs the approved maximum in confirm_max_cents, and a run cannot cost more. Search API, Extract API and billing.
Remove
DELETE /gateways/$GATEWAY_ID removes SpecStream and its tools from ContextForge, and POST /gateways/$GATEWAY_ID/state?activate=false turns it off and keeps it. Revoke the key in SpecStream's Agents & API to end its access at once. Every tool is described in the MCP guide. Questions go to [email protected].
More
SpecStream for ContextForge covers what it does in ContextForge on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].