Connect an AI Agent via MCP
ClusterNest runs an MCP server that exposes the same operations as the REST API as tools: creating, updating, and deleting OpenSearch and Prometheus clusters, managing organization members, and reading invoices. Any MCP-compatible client can connect to it and act on your account directly, using your normal ClusterNest login.
Connection details
| Server URL | https://api.clusternest.com/mcp |
| OAuth Client ID | mcp |
| OAuth Client Secret | (leave blank - this is a public client) |
This server manages your account: clusters, members, invoices. To let an agent search the data inside a cluster, see Connect an AI agent to your OpenSearch cluster, which covers OpenSearch's own MCP server. The two are independent and an agent can hold both at once.
Every client below uses these same two values. There's nothing to pre-register - pasting the URL and Client ID in, then logging in through the browser prompt that appears, is the whole setup.
- Claude
- Codex
- Cursor
- Other / manual token
Claude.ai, Desktop, mobile, Cowork
Go to Settings > Connectors > Add custom connector, then fill in:
- Remote MCP server URL:
https://api.clusternest.com/mcp - OAuth Client ID:
mcp - OAuth Client Secret: leave blank
Click Connect - a browser window opens to log into your ClusterNest account and approve access. Claude handles token refresh on its own after that.
Claude Code
claude mcp add --transport http --client-id mcp --scope user clusternest https://api.clusternest.com/mcp
--scope user makes the server available from any project directory rather than just the one
you ran the command in. Then run /mcp and select Authenticate to complete the browser login.
codex mcp add clusternest --url https://api.clusternest.com/mcp --oauth-client-id mcp
codex mcp login clusternest
Or add it directly to ~/.codex/config.toml:
[mcp_servers.clusternest]
url = "https://api.clusternest.com/mcp"
[mcp_servers.clusternest.oauth]
client_id = "mcp"
codex mcp login clusternest opens the browser login; codex mcp logout clusternest followed by
codex mcp login clusternest forces a fresh token exchange if it's ever needed.
Add to mcp.json:
{
"mcpServers": {
"clusternest": {
"url": "https://api.clusternest.com/mcp",
"auth": {
"CLIENT_ID": "mcp"
}
}
}
}
Open Settings > MCP and click Connect next to the server to trigger the browser login.
This works from the desktop client and from Cursor's web and cloud agents. The two surfaces use different OAuth callbacks, and both are accepted.
For a config-based client that doesn't do OAuth discovery, or a script using the MCP SDK
directly, get a bearer token the same way the REST API does and set it as a static
Authorization header instead of going through OAuth:
curl -X POST https://api.clusternest.com/auth/token \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "<app password>"}'
Generate the app password from the MFA settings page in your account settings first - your regular account password won't work here. See Get an access token for the full request/response shape. The token expires; re-run this to get a new one, or point the client at the OAuth flow above instead if it supports one.