Skip to main content
You have three ways to install Theo’s MCP server, in increasing order of manual effort:
  1. theo init — recommended. Detects every supported IDE on your machine and writes the right config for each in one shot.
  2. theo mcp install --ide <name> — targets a single IDE.
  3. Hand-written mcp.json — for unusual setups or IDEs we haven’t bundled detection for.
All three install the same package (@hitheo/mcp) and point each IDE at it via npx -y @hitheo/mcp. They differ only in which config files they touch.
Every method requires the THEO_API_KEY environment variable to be set in the shell that launches your IDE. Get a key if you don’t have one, or run theo login to walk through it.

Prerequisites

  • Node.js 18+ with npx on $PATH (any LTS install will do).
  • A Theo API key of the form theo_sk_… exported as THEO_API_KEY in your shell.
  • (optional) The @hitheo/sdk package installed globally for the theo CLI:
theo init does the full project bootstrap in one command:
It will:
  1. Create theo.config.json (project-level config).
  2. Detect installed IDEs (Cursor, Claude Code, Warp, Windsurf, VS Code).
  3. Write the matching mcp.json for each detected IDE.
  4. Generate .theo/RULES.md so your IDE agent knows the tools exist.
Example output:
Restart each IDE after the command finishes.

Method 2 — theo mcp install --ide <name>

Use this when you want MCP set up for a single IDE without touching the others, or to re-run after installing a new IDE:
Supported --ide values: cursor, claude-code, warp, windsurf, vscode, all. See the theo mcp install CLI reference for the full flag list.

Method 3 — Hand-written config

Every IDE we support reads a JSON file with an mcpServers.<name> entry. The block is identical across IDEs:
The IDE expands ${env:THEO_API_KEY} to the value from the shell that launched it, so you never commit a key into the repo. Drop the block at the IDE-specific path below.
Path: <project>/.cursor/mcp.json
Cursor picks up the file when you reopen the project. The Theo tools appear under the agent’s tool menu as theo_complete, theo_image, and so on.

Verify the install

After restarting your IDE, ask the agent something only Theo can answer to confirm the tools are loaded:
“Use the Theo MCP server to run a status check.”
If the agent doesn’t see the tools, see Troubleshooting. The most common cause is a missed restart; the second most common is THEO_API_KEY set in a different shell than the one that launched the IDE.

What gets written where

theo init is idempotent — re-running it merges into existing files rather than overwriting them.