### MCP
We offer a hosted MCP server at: https://mcp.kagi.com/mcp
You can authenticate with the MCP server via your Kagi Account using OAuth or by using a static [API key from the dashboard](https://kagi.com/api/keys).
**NOTE**: OAuth login is only supported for account admins at this time, users of team/family accounts should ask their account owner for an API key.
Below are some examples from popular clients on how to set them up:
**Claude Code**:

```
claude mcp add kagi https://mcp.kagi.com/mcp --transport http --client-id 393794653092071821 --scope user
```
**Codex**:

```
codex mcp add kagi --url https://mcp.kagi.com/mcp --oauth-client-id 393794653092071821
codex mcp login kagi
```
**OpenCode**:

```json
{
  "mcp": {
    "servers": {
      "kagi": {
        "type": "remote",
        "url": "https://mcp.kagi.com/mcp",
        "oauth": { "client_id": "393794653092071821" }
      }
    }
  }
}
```
If you prefer to use the MCP with an API key:

```
claude mcp add kagi https://mcp.kagi.com/mcp --transport http --header "Authorization: Bearer $(read -sp 'API key: ' k; echo $k)" --scope user
```
You can review and contribute to our [MCP server on GitHub](https://github.com/kagisearch/kagimcp)!
