ContextStream MCPSetting up
Connect your assistant
One command detects supported assistants, signs you in, and writes the MCP connection and instruction files.
Setup connects both halves of the experience: the MCP capability and the managed instructions that teach your assistant to use it on its own initiative. Afterwards, you can state the outcome instead of coaching every context lookup.
Run the setup
# macOS and Linux
curl -fsSL https://contextstream.io/scripts/mcp.sh | bash
# Windows, in PowerShell
irm https://contextstream.io/scripts/mcp.ps1 | iexIt walks you through the whole thing:
Sign in
Opens a browser. No API key to copy.
Pick a workspace
Join an existing one or create it. This is the boundary your project context and decisions live in — see Workspaces and projects.
Link this project
The folder you ran it in becomes a project. Later folders resolve on their own.
Choose your editors
It detects what you have installed and asks which to connect.
Finish the connection
The setup creates each selected editor's connection and instruction files for you. Where supported, it also enables automatic context guidance.
Index the project
Starts in the background. You can work while it runs.
Restart your editor afterwards. That's it.
When setup offers MachineStream remote checks, you can see which checks your project can run remotely on a warm isolated VM and turn them on for your account (83 free build minutes/mo included on Starter). You can make the same choice after setup. See Run checks remotely with MachineStream.
Without a terminal
A coding agent's sandbox, a container, or a CI job has no terminal for the
questions above, and often no sudo. Give the installer an API key and
--yes: it installs the binary and runs the setup without asking anything.
curl -fsSL https://contextstream.io/scripts/mcp.sh | CONTEXTSTREAM_API_KEY="…" bash -s -- --yesPut the key on the bash side of the pipe, or export it first. Written before
curl, it reaches curl only and the setup never sees it. A key saved by an
earlier setup on the same machine works too, with no variable at all. The
installer never prints the key.
With --yes (or -y), every argument is handed to the setup as you wrote it:
--workspace-id=<UUID> when the account has more than one workspace,
--editors=claude to connect one editor, --project-path=. to name the
project folder. Without --yes the arguments are ignored, and the installer
says so.
With --yes and no key, the installer still installs the binary, then stops
with exit status 2 and the command to run: nothing was connected. If the setup
itself fails, its exit status is the installer's.
Without --yes and without a terminal, the installer installs the binary,
prints the command to run next, and exits successfully.
The Windows installer takes no arguments. With no console it installs the
binary and prints the same next command: set CONTEXTSTREAM_API_KEY, then run
contextstream-mcp setup --yes.
The installer puts the binary in CONTEXTSTREAM_INSTALL_DIR when you set it.
Otherwise it updates the contextstream-mcp on your PATH that you own, in
its own folder, or installs to ~/.local/bin and prints the line that puts
that directory on your PATH. It never uses sudo unless you ask, and then
only for a folder you cannot write. To install for every user of the machine:
curl -fsSL https://contextstream.io/scripts/mcp.sh | CONTEXTSTREAM_INSTALL_DIR=/usr/local/bin bash -s -- --sudo(CONTEXTSTREAM_INSTALL_SUDO=1 asks for sudo too.) The installer never
removes another copy of contextstream-mcp: it lists each one with the
version it reports. It checks that the download runs before it replaces the
old binary, so a failed install leaves the old binary as it was.
Signed-in commands on an existing machine
The dashboard's Generate signed-in command creates a one-use setup link for your account. Setup keeps a valid key for the same account. If this machine belongs to a different account, setup requires an interactive confirmation before replacing its saved credentials.
A piped command such as curl … | sh can still ask for confirmation when
run in a terminal: the installer reconnects to that terminal. In CI or a
container without a terminal, a different-account conflict stops setup and
leaves the existing credentials unchanged.
To switch accounts, open an interactive terminal, generate a fresh
signed-in command for the intended account, run it, and confirm the switch.
The failed attempt has already redeemed its one-use link, so reusing that
link cannot repeat the signed-in flow. Remove any conflicting
CONTEXTSTREAM_API_KEY or CONTEXTSTREAM_TOKEN value from that shell or CI
job; an environment credential can override the saved account. On shared
machines or in CI, use an isolated OS user configured for the intended
account instead of replacing another person's credentials unattended.
What changes after setup
Your assistant can now orient to the active project, retrieve context relevant to the current request, search the appropriate evidence, and preserve durable work when you ask. The generated instructions also tell it to stop when scope is ambiguous and to treat matching lessons as working guardrails.
ContextStream does not widen the assistant's execution permissions. You still control the goal and consequential actions; the connection removes repeated project explanation, not human authority. See how the agent partnership works for the full loop.
Check it worked
Ask your assistant a real codebase question that uses indexed search and the dependency graph right away:
Find where we handle auth or retries in this repo, and use the code graph to show every caller a change would touch.Your assistant should return exact file paths, line numbers, and the downstream caller tree from the live code graph — giving you verifiable value on minute one. From there, capture a real architectural decision (for example, "save a decision that we keep session state in Postgres") and retrieve it in a fresh session.
Your editor's exact details
The setup wizard manages Claude Code, Cursor, Windsurf, GitHub Copilot in VS Code, Cline, Kilo Code, Codex CLI, Aider, Antigravity, OpenCode, Muse Code, Kimi Code CLI, ZCode, Qwen Code, Gemini CLI, Zed, Claude Desktop, GitHub Copilot CLI, Factory Droid, Amp, and Crush. For each one you select, the wizard creates every supported connection and instruction file automatically. On editors with lifecycle support, it also installs the automation that surfaces relevant context and guardrails while you work. Aider supports instruction rules only, and Claude Desktop gets the local binary because its config file only launches local servers. Roo Code has shut down; setup still repairs and removes existing Roo configs. Custom MCP connectors are not part of this wizard: paste the hosted URL into any client that accepts a custom connector. See Connect ContextStream Custom MCP.
Running Kimi, GLM, Qwen, DeepSeek, or MiniMax models? See Kimi, GLM, and other models.
Pick yours to see its exact files and connection shape:
Claude Code
Hosted connectionAnthropic's terminal and IDE coding agent.
- Connection file
.claude.json~/.claude.json globally (user scope), or .mcp.json in a project- Instructions file
CLAUDE.mdProject root, or ~/.claude/CLAUDE.md globally
Claude Code reads user-scope servers from ~/.claude.json; it never reads ~/.claude/mcp.json.
{
"mcpServers": {
"contextstream": {
"type": "http",
"url": "https://mcp.contextstream.io/mcp?default_context_mode=fast",
"headers": {
"X-ContextStream-API-Key": "YOUR_API_KEY"
}
}
}
}Replace YOUR_API_KEY with a key from your dashboard, keep the file out of version control, and restart the client. The setup command writes the fuller managed configuration for you.
Connecting more editors later
Run the setup again — it's safe to re-run and won't duplicate anything. Or use the maintenance commands in Keeping it current.
If it doesn't work
The assistant doesn't seem connected. Restart the editor. Most read MCP configuration only at startup.
It connected but knows nothing about the project. Indexing runs in the background and takes a few minutes on a large repository.
The script can't find my editor. It looks in standard install locations. Set it up by hand — see Set it up by hand.