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.
What you need
- MiMo Code installed (
curl -fsSL https://mimo.xiaomi.com/install | bashon 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
mcpfield of its main config:~/.config/mimocode/mimocode.jsoncfor every project, or.mimocode/mimocode.jsoncfor one project.mimocode.jsonin the same folders works too. An entry with"type": "remote"and aurlis a remote server. Merge this into the file:~/.config/mimocode/mimocode.jsonc - 2
2. Or add it from the command line
mimo mcp addasks 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 typespecstream, for Select MCP server type choose Remote, and for Enter MCP server URL pastehttps://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 - 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 - 4
4. Check the connection
mimo mcp listlists the configured servers and their status.specstreamshowsconnectedonce the sign-in is done.Terminal - 5
5. Ask
Start
mimoand ask something that needs today's web. For a single fact the agent callssearch_web. For a question that needs many pages, ask for a report: the agent callsresearch_price, shows you the price of each depth, and starts the report only after you approve one.In MiMo Code
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_webanswers a question from the live web with up to 10 results, each with its URL.read_pagesreturns the main text of up to 20 pages or documents (PDF, Word, Excel), read live.research_priceshows the price of a research report at each depth: quick, standard or deep. It costs nothing.start_researchstarts a report, and only withconfirm_max_centsequal to the price you approved.get_researchreads 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.compileandquote_capacity_workread and price a request for many records, and cost nothing.authorize_capacity_workstarts 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 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 specstreamtests the connection and the OAuth discovery, and prints the auth status.mimo mcp auth listlists the servers that can sign in with OAuth and the state of each.- A
401means no token or key reached SpecStream. Runmimo mcp auth specstreamagain, or check thatSPECSTREAM_API_KEYis 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, setredirectUriunderoauthin the entry. alwaysDirectToolsin the entry, for example["search_web", "read_pages"], keeps those tools at the top level where MiMo Code would defer them behindmcp_tool_search."enabled": falsein 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].