Skip to the page

Blaxel

Deploy SpecStream on Blaxel as a code mode MCP server built from SpecStream's OpenAPI document. Every agent in your workspace can then search the live web and read pages, and Blaxel injects your key into each call.

SpecStream for Blaxel, API & cloud platforms

What you need

  • A Blaxel workspace and the bl CLI, signed in with bl login.
  • A SpecStream account. New accounts start with $10 of credit, no card. Create one.
  • A SpecStream API key with a spending limit, which step 1 creates.
  1. 1. Create an API key

    In your SpecStream workspace, open Agents & API, choose API keys, then Create API key. Turn on Authorize paid work: a key without it can't search or read pages. Set a Total spending limit above $0, because that limit is what caps the spending of everything that uses the key.

    Copy the key when it's shown. It isn't shown again.

  2. 2. Write the server definition

    Code mode turns an OpenAPI document into an MCP server. OPENAPI_REFERENCE points at SpecStream's document. The document names its key scheme apiKey, sent in the Authorization header, so Blaxel reads the key from AUTH_APIKEY and sends that value as the header. The value is therefore Bearer followed by your key.

    specstream.yaml
    apiVersion: blaxel.ai/v1alpha1
    kind: Function
    metadata:
    displayName: SpecStream
    name: specstream
    spec:
    runtime:
    type: mcp
    image: blaxel/code-mode:latest
    memory: 2048
    envs:
    - name: OPENAPI_REFERENCE
    value: https://api.specstream.ai/openapi.json
    - name: AUTH_APIKEY
    value: ${secrets.AUTH_APIKEY}
  3. 3. Deploy it

    Pass the key as a secret with -s, so it stays out of the file. Then wait for the status DEPLOYED and read the server's address:

    Terminal
    bl apply -f specstream.yaml -s "AUTH_APIKEY=Bearer $SPECSTREAM_API_KEY"
    bl get mcp specstream
    bl get mcp specstream -o json | jq -r '.[] | .metadata.url'
  4. 4. Give it to an agent

    Load the server's tools with the Blaxel adapter for your framework and pass them to the agent. The server has two tools: search looks through SpecStream's OpenAPI document for the endpoint, and execute runs a fetch() call to it in a Blaxel sandbox, with the key added there.

    src/agent.ts
    import { blTools } from "@blaxel/vercel";
    const tools = await blTools(["specstream"]);
  5. 5. Ask

    Name the endpoints in the agent's instructions, so it searches the document for the right ones first: GET /v1/web-search?q=<the question> answers with data.answer and data.sources, and POST /v1/extract with {"urls": [...]} returns the main text of up to 20 pages in data.results.

    Agent instructions
    To answer from the live web, call SpecStream's GET /v1/web-search with the question in q, then POST /v1/extract with the URLs you need to read. Name the page behind each fact.

From any MCP client

The deployed server answers at https://run.blaxel.ai/<workspace>/functions/specstream/mcp and takes your Blaxel API key as Authorization: Bearer. Add that address to Cursor, Claude Code or any client that speaks Streamable HTTP. The SpecStream key stays in Blaxel.

Or connect to SpecStream's own MCP server

An agent you deploy on Blaxel can also call https://api.specstream.ai/mcp directly with an MCP client, with the key in a Blaxel secret: put SPECSTREAM_API_KEY in the .env file you deploy with bl deploy. That server's search_web and read_pages tools need no code from the agent, and it adds Deep Search for structured lists. See the agent guide.

Errors

  • 401: the key is missing or wrong. Send it as Authorization: Bearer <key>.
  • 403: the key has no Authorize paid work, or the call would go over the key's spending limit.
  • 402: the balance is empty, or the call would go over the account's monthly spending limit.
  • 503 with Retry-After: wait that many seconds and send it again.

Cost

A search is $5 per 1,000 searches of up to 10 results, or $1 per 1,000 with speed=fast. A page read is $0.80 per 1,000 pages. They come out of your SpecStream balance up to the key's spending limit, with no quote and no approval. Blaxel bills the server and its sandboxes as usual. Balance, quotes, and billing has the details.

Remove

Delete the specstream MCP server in the Blaxel Console or with the bl CLI. To stop the key working everywhere, revoke it under API keys in Agents & API. Results already delivered stay in your workspace. Questions go to [email protected].

More

SpecStream for Blaxel covers what it does in Blaxel 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].