> SpecStream is the live web data engine for teams and agents. This is the Markdown copy of https://specstream.ai/docs/integrations/deep-agents-code. Every page, with what SpecStream does and costs: https://specstream.ai/llms.txt

# Deep Agents Code

Add SpecStream to `~/.deepagents/.mcp.json` as an `http` server, and Deep Agents Code can search the live web, read pages and ask for structured data in every project, with no Tavily key.

[SpecStream for Deep Agents CodeCoding agents](https://specstream.ai/integrations/deep-agents-code.md)

## What you need

-   Deep Agents Code, the `dcode` command. Install it with `curl -LsSf https://langch.in/dcode | bash`.
-   A SpecStream account. New accounts start with $10 of credit, no card. [Create one](https://specstream.ai/signup?utm_source=deep-agents-code).

1.  1

    ## 1. Create a SpecStream API key

    In SpecStream, open [Agents & API](https://specstream.ai/workspace/agents?tab=keys&utm_source=deep-agents-code), choose **API keys**, then **Create API key**, and give it a spending limit above 0. Export it in the shell you start `dcode` from:

    Shell

    ```bash
    export SPECSTREAM_API_KEY="YOUR_SPECSTREAM_KEY"
    ```

2.  2

    ## 2. Add SpecStream to ~/.deepagents/.mcp.json

    Servers in the user file are available in every project on the machine, and Deep Agents Code trusts that file without a prompt. SpecStream serves Streamable HTTP, which Deep Agents Code calls `http`. `${SPECSTREAM_API_KEY}` is read from your shell when the server starts, so the key stays out of the file:

    If the file already lists servers, add the `specstream` entry inside the same `mcpServers` object.

    ~/.deepagents/.mcp.json

    ```json
    {
      "mcpServers": {
        "specstream": {
          "type": "http",
          "url": "https://api.specstream.ai/mcp",
          "headers": { "Authorization": "Bearer ${SPECSTREAM_API_KEY}" }
        }
      }
    }
    ```

3.  3

    ## 3. Start dcode and check the server

    Deep Agents Code reads the file at startup and prints how many MCP tools it loaded. Run `/mcp` in the session to see SpecStream's status, transport and tools. The status should read `ok`. An `error` status carries its reason: check the URL, and that `SPECSTREAM_API_KEY` is set in the shell you started from.

    Terminal

    ```bash
    dcode
    ```

4.  4

    ## 4. Ask for live web data

    Ask in plain words. The agent picks the SpecStream tool for the job:

    In a dcode session

    ```text
    Find the current stable release of Node.js, read its release notes, and update the engines field in package.json to match.
    ```

## Sign in with OAuth instead of a key

Use `"auth": "oauth"` in place of the `headers` line, then run `dcode mcp login specstream` once. Deep Agents Code registers itself with SpecStream, opens the sign in page in your browser and asks you to paste the redirected URL back into the terminal. Tokens are stored under `~/.deepagents/.state/mcp-tokens/` and refreshed automatically. Requests then run on the account that signed in. An entry cannot have both `auth: oauth` and an `Authorization` header.

## What the agent calls

Deep Agents Code puts the server name in front of each tool, so the agent sees `specstream_search_web`, `specstream_read_pages` and the rest.

-   `search_web` answers a question from the live web with up to 10 results, each with its URL. It takes `{"q": "<the question>"}`.
-   `read_pages` returns the main text of up to 20 pages or documents (PDF, Word, Excel), read live. It takes `{"urls": ["<url>"]}`.
-   `compile` reads a request for many records into its conditions and the facts to bring back, and `quote_capacity_work` prices it. Both cost nothing.
-   `authorize_capacity_work` starts a Deep Search run only with `confirm_max_cents` equal to the maximum you approved. `get_find` follows it and `list_find_rows` reads the rows, each value with its source URL and read time.

## Keep it to search and page reading

Add `allowedTools` to the entry, and Deep Agents Code drops every other SpecStream tool, so the agent cannot start a paid run:

## Next to the built in web\_search

Deep Agents Code's own `web_search` tool runs on Tavily and is off until `TAVILY_API_KEY` is set. With SpecStream connected, the agent searches the live web without a Tavily key, and reads whole pages and documents with `read_pages`. The Search API is the most accurate web search API on SimpleQA Verified and WideSearch; the scores and the method are on [the benchmarks page](https://specstream.ai/benchmarks.md).

## For one project only

Put the same entry in `<project>/.deepagents/.mcp.json`, or in `<project>/.mcp.json`, the file Claude Code also reads. Deep Agents Code asks before it starts a project server: choose **Allow once** for the session, or the option that saves the approval for the project. With `-n`, project servers are skipped unless you pass `--trust-project-mcp`. A project entry named `specstream` replaces the user entry of the same name.

## Cost

Each `search_web` call is one Search API search at $5 per 1,000 searches of up to 10 results, and each page `read_pages` reads is $0.80 per 1,000 pages. A page with no text is not charged. Both come out of your balance with no quote, up to the key's spending limit. A Deep Search run is priced per row and starts only after you approve its maximum. New accounts start with $10 of credit, no card. See [how billing works](https://specstream.ai/docs/billing.md).

## Disconnect

Remove the `specstream` entry from `.mcp.json`, or start `dcode --no-mcp` to load no MCP servers for a session. Revoke the key under **Agents & API** in SpecStream. Questions go to [support@specstream.ai](mailto:support@specstream.ai).

## More

[SpecStream for Deep Agents Code](https://specstream.ai/integrations/deep-agents-code.md) covers what it does in Deep Agents Code on one page. Every other tool has its guide in [Connect your tools](https://specstream.ai/docs/integrations.md). You see the most a request can cost before it starts, and the matches are paid from your balance. [Billing](https://specstream.ai/docs/billing.md) has the details. For help, email [support@specstream.ai](mailto:support@specstream.ai).
