Claude Code
Use Streamable HTTP transport with an Authorization header until Claude Code supports Pairag OAuth directly.
First: this page is for Claude Code, not Claude Desktop
Here “install MCP” means **Anthropic Claude Code** (terminal or the official Claude Code desktop/IDE experience where slash commands like **`/mcp`** exist). The consumer **Claude Desktop** chat app uses a different config file and **does not** read `~/.claude.json`. If you open Desktop looking for Pairag, you will not see this MCP.
Step 1: one-shot install via your system terminal
Run the command in macOS Terminal or Windows Command Prompt / PowerShell (not inside a browser tab, and not the Claude chat text box). You need **Node.js** installed so **`npx`** can download and run **add-mcp**. On success, the installer should print something like “Installed to … Claude Code … ~/.claude.json”.
npx -y add-mcp "https://api.pairag.com/mcp" -g -a claude-code -yStep 2: where the config is written
The command registers a global remote MCP server named **pairag** (Streamable HTTP) for **Claude Code**. It does not change Cursor’s `~/.cursor/mcp.json` and does not touch Claude Desktop’s `claude_desktop_config.json`.
User-scoped MCP servers for Claude Code live in **`~/.claude.json`** at your home directory (note the filename — it is **not** inside the `~/.claude/` folder). Claude Desktop on macOS uses **`~/Library/Application Support/Claude/claude_desktop_config.json`** instead; do not mix the two.
Step 3: confirm it inside Claude Code
- Open **Claude Code** on the same machine and macOS/Windows user account you used in the terminal.
- **Quit Claude Code fully**, then reopen so it reloads `~/.claude.json` (some builds do not refresh MCP lists until restart).
- Run **`/mcp`** in Claude Code (or use the MCP status entry your build exposes). You should see **pairag** and its connection state.
- If nothing appears: run `grep pairag ~/.claude.json` locally. No output means the install did not land — retry Step 1 after checking Node and network.
If your org uses managed MCP allowlists (e.g. allowedMcpServers), an admin must allow **pairag** before it shows up in the client.
CLI snippet
Run once per machine profile (adjust CLI wording if Anthropic updates flags):
claude mcp add --transport http pairag https://api.pairag.com/mcp --header "Authorization: Bearer <YOUR_TOKEN>"
Replace YOUR_TOKEN with either an OAuth-backed MCP access JWT (`aud=mcp`) **or** a PAT (`pgpat_…`) from POST …/personal-access-tokens.
OAuth roadmap
After Step 3, when **`/mcp`** lists **pairag**, follow Claude Code’s browser OAuth flow to sign in on Pairag and approve access (tokens are stored by Claude Code). If the redirect does not return to the terminal, paste the callback URL from the address bar when prompted. See Anthropic’s Claude Code MCP docs. Step 1 uses the community **add-mcp** helper to write global config without hand-editing JSON.
Verify credentials
Same sanity check as Cursor:
curl -sS -H "Authorization: Bearer <MCP_ACCESS_TOKEN>" https://api.pairag.com/api/v1/mcp/v1/me