> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ndi.nace.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP and CLI login

> Hosted MCP, local uvx ndi-mcp, and device-code login

NDI speaks [Model Context Protocol](https://modelcontextprotocol.io). Hosted
and local servers expose the same tool catalog. Prefer `uvx ndi-mcp`.

## Hosted

```json theme={"dark"}
{
  "mcpServers": {
    "ndi": {
      "type": "http",
      "url": "https://ndi-api.nace.ai/v1/mcp",
      "headers": { "X-API-Key": "ndi_sk_..." }
    }
  }
}
```

The hosted server cannot see your filesystem. Pass a public URL, or run local.

## Local CLI

```bash theme={"dark"}
uvx ndi-mcp login
claude mcp add ndi -- uvx ndi-mcp
```

`ndi-mcp login` opens the console, then stores the minted key in
`~/.ndi/config.toml`. `--api-key` or `$NDI_API_KEY` skips the browser.

Device-code routes (what the CLI uses):

* `POST /v1/cli/device/code`
* `POST /v1/cli/device/token`

Do not call these from application code — use an API key.

Cursor — `.cursor/mcp.json`:

```json theme={"dark"}
{
  "mcpServers": {
    "ndi": {
      "command": "uvx",
      "args": ["ndi-mcp"]
    }
  }
}
```

Tool names map 1:1 to the Python SDK (`parse_document` →
`client.documents.parse`). Ask `get_documentation` with a topic before writing
integration code.

See [MCP](/sdks/mcp).
