# Claude Code Setup

Source checked: 2026-06-19
Official source: https://docs.anthropic.com/en/docs/claude-code/mcp

Claude Code supports adding MCP servers from the command line. Use the current Anthropic docs for exact flags before changing generated commands.

Only use this guide when the current app is Claude Code. If the user says Claude Desktop, use the Claude Desktop guide instead; do not run `claude mcp` commands for Desktop setup.

Recommended setup path:

1. Use Claude Code's native MCP command first: `claude mcp add --transport http core https://core.gradien.ai/mcp`.
2. If the user wants a guided CLI walkthrough, run the setup CLI with `--harness claude-code` so it does not confuse Claude Code with Claude Desktop.
3. Prefer OAuth/browser consent where reliable.
4. Use a scoped bearer header fallback only when OAuth is unavailable or unreliable.
5. After adding the MCP server, do not ask the user to run `/mcp` in the same Claude Code session. Newly registered servers often do not appear there yet.
6. First ask the user to restart Claude Code or start a fresh Claude Code session.
7. Only in the fresh session, ask the user to run `/mcp`, select Core, and approve browser login if prompted.
8. If Core is missing from `/mcp`, treat that as a stale Claude Code session, not a failed Core install. Ask the user to fully quit/relaunch Claude Code and check `/mcp` again before retrying setup.
9. Verify the server appears in Claude Code and that Core tools are listed.
