# Claude Code

URL: https://docs.sigment.ai/connect/claude-code

Add the Sigment MCP server to Claude Code with one command.

## With your Sigment account (OAuth)

```bash
claude mcp add --transport http sigment https://api.sigment.ai/mcp
```

Then run `/mcp` inside Claude Code, select **sigment** and choose **Authenticate**. A browser opens for the Sigment sign-in. After that, approve the agent in **Sigment → Settings → AI agents**.

Add `--scope user` to make it available in every project, or `--scope project` to share it with your team through `.mcp.json`:

```json title=".mcp.json"
{
  "mcpServers": {
    "sigment": { "type": "http", "url": "https://api.sigment.ai/mcp" }
  }
}
```

## With an API key (headless)

For CI or other places that can't open a browser, create an API key in **Sigment → Settings → AI agents** and pass it as a header:

```bash
claude mcp add --transport http sigment https://api.sigment.ai/mcp \
  --header "Authorization: Bearer $SIGMENT_API_KEY"
```

API keys are approved automatically. Anyone holding one can spend your workspace's credits, so keep it in a secret store, not in `.mcp.json`.

## Also add the docs

The docs have their own small MCP server with `search_docs` and `get_doc_page`, so Claude Code can look things up while it works:

```bash
claude mcp add --transport http sigment-docs https://docs.sigment.ai/mcp
```

## Check it works

```txt
> Use sigment to show my credit balance, then quote a discovery for "home espresso".
```

Claude Code should call `get_account` and then `quote_cost`.
