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

# MiMo Code

Add SpecStream under `mcp` in MiMo Code's config, and the terminal agent can search the live web, read pages and order a cited research report in the middle of a task. Sign in once in the browser with `mimo mcp auth`, or send an API key from your environment.

[SpecStream for MiMo CodeCoding agents](https://specstream.ai/integrations/mimo-code.md)

## What you need

-   MiMo Code installed (`curl -fsSL https://mimo.xiaomi.com/install | bash` on macOS and Linux), with a model set up on first launch.
-   A SpecStream account. New accounts start with $10 of credit, no card. [Create one](https://specstream.ai/signup?utm_source=mimo-code).

1.  1

    ## 1. Add SpecStream under mcp

    MiMo Code reads MCP servers from the `mcp` field of its main config: `~/.config/mimocode/mimocode.jsonc` for every project, or `.mimocode/mimocode.jsonc` for one project. `mimocode.json` in the same folders works too. An entry with `"type": "remote"` and a `url` is a remote server. Merge this into the file:

    ~/.config/mimocode/mimocode.jsonc

    ```json
    {
      "mcp": {
        "specstream": {
          "type": "remote",
          "url": "https://api.specstream.ai/mcp"
        }
      }
    }
    ```

2.  2

    ## 2. Or add it from the command line

    `mimo mcp add` asks the same questions and writes the entry. In a git project it first asks **Location**: choose **Current project** or **Global**. For **Enter MCP server name** type `specstream`, for **Select MCP server type** choose **Remote**, and for **Enter MCP server URL** paste `https://api.specstream.ai/mcp`. Answer yes to **Does this server require OAuth authentication?** and no to **Do you have a pre-registered client ID?**: SpecStream lets MiMo Code register itself.

    Terminal

    ```bash
    mimo mcp add
    ```

3.  3

    ## 3. Sign in to SpecStream

    A remote server in MiMo Code supports OAuth with no extra field. Run the auth command with the server's name. Your browser opens on SpecStream's sign-in: approve the access MiMo Code asks for. MiMo Code stores the token and sends it on every call.

    Terminal

    ```bash
    mimo mcp auth specstream
    ```

4.  4

    ## 4. Check the connection

    `mimo mcp list` lists the configured servers and their status. `specstream` shows `connected` once the sign-in is done.

    Terminal

    ```bash
    mimo mcp list
    ```

5.  5

    ## 5. Ask

    Start `mimo` and ask something that needs today's web. For a single fact the agent calls `search_web`. For a question that needs many pages, ask for a report: the agent calls `research_price`, shows you the price of each depth, and starts the report only after you approve one.

    In MiMo Code

    ```text
    Write a standard research report on what changed in HTTP caching between RFC 7234 and RFC 9111. Show me the price first.
    ```

## Use an API key instead of signing in

On a server or in CI, where no browser opens, send a SpecStream API key. Create one in [Agents & API](https://specstream.ai/workspace/agents?tab=keys&utm_source=mimo-code): choose **API keys**, then **Create API key**, and give it a spending limit above 0.

Export it as `SPECSTREAM_API_KEY` in the shell that starts MiMo Code. MiMo Code fills `{env:VAR}` in the config from its environment, so the key stays out of the file. `"oauth": false` tells MiMo Code to send the header and skip the sign-in.

## What MiMo Code calls

The tools the agent reaches most:

-   `search_web` answers a question from the live web with up to 10 results, each with its URL.
-   `read_pages` returns the main text of up to 20 pages or documents (PDF, Word, Excel), read live.
-   `research_price` shows the price of a research report at each depth: quick, standard or deep. It costs nothing.
-   `start_research` starts a report, and only with `confirm_max_cents` equal to the price you approved. `get_research` reads it until it is completed. The report is written text with numbered markers, and each cited sentence comes with the URL of the page it was read on and the read time.
-   `compile` and `quote_capacity_work` read and price a request for many records, and cost nothing. `authorize_capacity_work` starts that Deep Search run after you approve its maximum.

## SpecStream next to MiMo Code's own search

MiMo Code's README names three ways to search: the built-in `websearch` and `codesearch` tools behind `MIMOCODE_ENABLE_EXA=1`, the Exa and Tavily remote servers, and Volcengine Doubao Search as a local server. SpecStream is one more entry under `mcp` and runs beside any of them.

MiMo Code also ships a `deep-research` workflow that plans, searches and writes a report inside your session with your model's tokens. `start_research` does that work on SpecStream's side for a fixed price and hands back the finished report, so the session's context holds the report and none of the pages read on the way.

| Detail | Built-in websearch | SpecStream |
| --- | --- | --- |
| Set up | `MIMOCODE_ENABLE_EXA=1` | One entry under `mcp` |
| Sign in | None, or `EXA_API_KEY` for higher rate limits | `mimo mcp auth specstream`, or an API key in a header |
| Search | `websearch`, `codesearch` | `search_web` |
| Written report with citations | The `deep-research` workflow, on your model's tokens | `start_research`, at a fixed price a report |

## Cost

Adding SpecStream to MiMo Code is free. Each `search_web` call is one Search API call 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 and no approval, within the key's spending limit.

A research report costs $0.10 (quick), $0.30 (standard) or $1.00 (deep). A quick report takes about a minute, a standard report about four minutes and a deep report about five. The price is taken from the balance once, when the report is delivered, and a cancelled report is not charged. [Research reports](https://specstream.ai/docs/research.md) has the details.

Deep Search is priced per row, and nothing runs until you approve the maximum its quote shows. See [billing](https://specstream.ai/docs/billing.md).

## If it does not connect

-   `mimo mcp debug specstream` tests the connection and the OAuth discovery, and prints the auth status.
-   `mimo mcp auth list` lists the servers that can sign in with OAuth and the state of each.
-   A `401` means no token or key reached SpecStream. Run `mimo mcp auth specstream` again, or check that `SPECSTREAM_API_KEY` is exported in the shell that starts MiMo Code.
-   A request to the server stops after 5000 ms unless the entry sets `timeout`, in milliseconds.
-   The sign-in comes back to `http://127.0.0.1:19876/mcp/oauth/callback`. If that port is taken, set `redirectUri` under `oauth` in the entry.
-   `alwaysDirectTools` in the entry, for example `["search_web", "read_pages"]`, keeps those tools at the top level where MiMo Code would defer them behind `mcp_tool_search`.
-   `"enabled": false` in the entry turns SpecStream off without deleting it.

## Disconnect

`mimo mcp logout specstream` removes the stored sign-in. Delete the `specstream` entry from the config to remove the server. Revoke a key in SpecStream's **Agents & API**. MiMo Code is a fork of OpenCode: for OpenCode itself, see [the OpenCode guide](https://specstream.ai/docs/integrations/opencode.md). Every tool is described in the [MCP guide](https://specstream.ai/docs/mcp.md). Questions go to [support@specstream.ai](mailto:support@specstream.ai).

## More

[SpecStream for MiMo Code](https://specstream.ai/integrations/mimo-code.md) covers what it does in MiMo 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).
