Every AI coding tool speaks MCP now. Claude Code, Cursor, Windsurf, VS Code Copilot, Codex CLI, Gemini CLI, OpenClaw — they all support the Model Context Protocol.
But configuring MCP for each tool means editing JSON files in different locations, managing tokens, and remembering which tool uses which config format. We built a single command that handles all of it.
The command
npx @inariwatch/mcp init
That's the entire setup. No install, no global CLI. npx runs it directly.
What happens when you run it
Step 1 — Detect
The init script scans your machine for every supported AI tool:
- Claude Code — checks if
claudeis in PATH - Cursor — checks for
~/.cursor/config directory - Windsurf — checks for
~/.windsurf/config directory - VS Code + Copilot — checks if
codeis in PATH - Codex CLI — checks if
codexis in PATH - Gemini CLI — checks if
geminiis in PATH - OpenClaw — checks if
openclawis in PATH or~/.openclaw/exists
Step 2 — Authenticate
A browser window opens with a device code. You approve it on InariWatch, and the CLI receives your API token. No copy-pasting tokens from dashboards.
Authenticating via browser...
Code: ABC123
Opening: https://app.inariwatch.com/cli/verify?code=ABC123
If you already have a token, skip the browser flow:
npx @inariwatch/mcp init --token YOUR_TOKEN
Step 3 — Configure MCP
Here's where each tool gets different treatment. MCP config locations vary across tools:
- Claude Code — configured via
claude mcp addCLI command - Cursor — writes to
~/.cursor/mcp.json - Windsurf — writes to
~/.windsurf/mcp.json - VS Code — writes to
.vscode/mcp.json - Codex CLI — configured via
codex mcp addCLI command - Gemini CLI — configured via
gemini mcp addCLI command - OpenClaw — configured via
openclaw mcp setor writes to~/.openclaw/openclaw.json
Step 4 — Install the Capture SDK
If you're inside a Node.js project, init also installs @inariwatch/capture and wires it into your framework:
- Next.js — wraps
next.configwithwithInariWatch, createsinstrumentation.ts - Nuxt 3 — adds the module to
nuxt.config - Remix / SvelteKit / Astro / Vite — adds
inariwatchVite()to plugins - Express / Fastify / Node — installs the SDK with instructions
--no-capture if you only want MCP.
Step 5 — Link GitHub
If the gh CLI is installed and authenticated, init offers to link your GitHub account. This enables code intelligence (semantic search across your repos), PR risk assessment, and AI remediation that reads your actual source code.
What your AI tool gets
Once configured, every detected AI tool has access to 25 MCP tools:
Query — query_alerts, get_status, get_uptime, get_build_logs, get_error_trends
Diagnose — get_root_cause, assess_risk, search_community_fixes, get_postmortem, ask_inari
Fix — trigger_fix, rollback_deploy, silence_alert, acknowledge_alert, reopen_alert
Monitor — create_uptime_monitor, run_health_check, reproduce_bug, simulate_fix, verify_remediation, search_codebase
Plus 4 live resources (critical alerts, recent alerts, status overview, active remediations) and 7 prompt workflows.
The MCP server runs at mcp.inariwatch.com using Streamable HTTP. Auth is Bearer token with SHA-256 hashing. Rate limits apply per tool tier — 200/min for queries, 30/min for analysis, 5/min for execution.
The design principle: sampling-first
Four of the analysis tools — get_root_cause, assess_risk, ask_inari, and simulate_fix — don't call any AI on the server. Instead, they gather context (alerts, code, recordings, community fixes) and return it to your AI tool's LLM for analysis.
Your AI editor already has a model running. Why pay for a second inference call on the server? InariWatch provides the data, your tool provides the intelligence.
Only trigger_fix uses server-side AI — because remediation requires a multi-step pipeline (diagnose, read code, generate fix, self-review, push, CI, PR) that runs asynchronously.
Why one command matters
Before init, connecting InariWatch to three tools meant:
1. Go to Settings, copy your token 2. Open Claude config, paste the JSON 3. Open Cursor config, paste different JSON 4. Open VS Code config, paste yet another format 5. Remember to update all three when rotating tokens
Now it's one command. When we add support for a new AI tool, your existing setup doesn't change — just run init again and the new tool gets configured alongside the rest.
Try it
npx @inariwatch/mcp init
Works on macOS, Linux, and Windows. Detects your package manager automatically (npm, yarn, pnpm, bun).
