Cursor and Codex
Cursor and Codex read their MCP servers from a config file. Add Chartnaut's server, https://api.chartnaut.com/v1/mcp, to that file, and sign in with the browser or give it an API key. Your plan must be Starter or above. Connect Chartnaut to an AI app covers what the tools can do.
If you have the Chartnaut CLI, chartnaut mcp install cursor and chartnaut mcp install codex print the blocks below with your API address filled in, and --write adds them to the file for you. Command reference
Cursor
Add Chartnaut to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json in one project's folder:
{
"mcpServers": {
"chartnaut": {
"url": "https://api.chartnaut.com/v1/mcp"
}
}
}Keep any servers already in the file. Cursor finds the new server in its MCP settings; when it first connects, it opens a Chartnaut page in your browser. Click Allow there, and Chartnaut's tools appear in Cursor's agent. The consent page names the address Cursor returns to, such as a cursor:// link: that is Cursor's own app receiving the sign-in.
To use an API key instead, add a header. Cursor can read the key from an environment variable, so it stays out of the file:
{
"mcpServers": {
"chartnaut": {
"url": "https://api.chartnaut.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${env:CHARTNAUT_TOKEN}"
}
}
}
}Set CHARTNAUT_TOKEN to the key in the environment Cursor starts from. On macOS, Cursor opened from the Dock does not see variables you export in your shell profile; start it from a terminal with cursor ., or put the key in the file.
chartnaut mcp install cursor --write puts the key the CLI is signed in with straight into ~/.cursor/mcp.json, keeps every other server, and makes the file readable only by you. If the file is not valid JSON, it changes nothing and says so. To remove Chartnaut later, delete mcpServers.chartnaut from the file and revoke the key.
Codex
Add Chartnaut to ~/.codex/config.toml:
[mcp_servers.chartnaut]
url = "https://api.chartnaut.com/v1/mcp"
bearer_token_env_var = "CHARTNAUT_TOKEN"Codex sends the key in CHARTNAUT_TOKEN as a bearer token, so set that variable in the shell you start Codex from:
export CHARTNAUT_TOKEN=cn_live_XXXXIn PowerShell, use $env:CHARTNAUT_TOKEN = "cn_live_XXXX". The CLI reads the same variable, so one key serves both. chartnaut mcp install codex --write adds the block to config.toml, or replaces an older [mcp_servers.chartnaut] table, leaves everything else in the file as it was, and never writes the key.
Config keys for remote servers have changed between Codex versions. If Codex does not list Chartnaut's tools, check its MCP documentation for the version you run.
Which to use: sign-in or key
Browser sign-in | API key | |
|---|---|---|
Shows under Connected apps | Yes, with a Disconnect button | No, under API keys |
Permissions | What you approved on the Chartnaut page | The key's scopes |
Lasts | Until you disconnect it or leave it unused for 30 days | Until the key expires or you revoke it |
Works without a browser | No | Yes |
Where the secret lives | Cursor holds the tokens; they renew themselves | In your environment, or in the config file if you put it there |
Make one key per tool, so revoking one never breaks the others. Permissions and connected apps
If the tools do not appear
Cause | Fix |
|---|---|
The config file is not valid JSON or TOML | Check the brackets and commas; |
| Set it in that environment, then restart the app |
The key was revoked, expired or lacks a scope | Make a new key with the scopes you need on the Developers page |
The server is switched off in the app's MCP settings | Switch it on and reload |
Troubleshooting MCP covers the errors a tool call can return.
