Skip to the page

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

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.
  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
    {
    "mcp": {
    "specstream": {
    "type": "remote",
    "url": "https://api.specstream.ai/mcp"
    }
    }
    }
  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
    mimo mcp add
  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
    mimo mcp auth specstream
  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
    mimo mcp list
  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
    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: 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.

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.

DetailBuilt-in websearchSpecStream
Set upMIMOCODE_ENABLE_EXA=1One entry under mcp
Sign inNone, or EXA_API_KEY for higher rate limitsmimo mcp auth specstream, or an API key in a header
Searchwebsearch, codesearchsearch_web
Written report with citationsThe deep-research workflow, on your model's tokensstart_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 has the details.

Deep Search is priced per row, and nothing runs until you approve the maximum its quote shows. See billing.

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. Every tool is described in the MCP guide. Questions go to [email protected].

More

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