Connect ChatGPT Claude and Cursor
Any AI assistant that supports MCP can connect to https://low-cost.ai/api/mcp. Some connect with an API key, and some, such as ChatGPT, with an OAuth sign-in and a consent screen. Here are the steps for each, following each company's official documentation.
On this page
Before you start
- An account with a credit balance. The assistant generates with your balance
- For assistants that connect with a key: a key from the developers page. Use a separate key for each assistant, with a clear name
- For assistants that connect with OAuth: no key needed. You sign in to the site and approve on a screen
ChatGPT
ChatGPT cannot take an API key, so it connects with OAuth. According to OpenAI's documentation, you add an MCP server as a plugin in ChatGPT on the web:
- Go to ChatGPT Plugins
- Select the plus button, then Add custom MCP server
- Enter a name, such as LowCostAi, and a description if you like
- Under Connection, in Server URL, paste https://low-cost.ai/api/mcp
- For authentication choose OAuth
- Read the risk warning and select I understand and want to continue
- Select Create as a plugin
- Find the plugin in your personal or workspace plugins, and install it
On install a page of ours opens. If you are not signed in, sign in, and the consent screen appears: what ChatGPT will be able to do, what it cannot, and the address you return to. Approve, and you are back in ChatGPT, connected. The developers page will show a new key named after the app followed by (OAuth).
Using it in a chat
- In the message box type @ and select the plugin, then write what you want
- According to OpenAI, a tool not marked read only counts as a write action, and write actions ask for confirmation by default. Here those are generate, which spends credits, and delete_file. Before approving you can open the call details and see the max_credits it sends
- You can choose to remember an approval for the rest of the conversation. OpenAI recommends doing so only for tools you fully trust
- If several similar plugins are installed, say explicitly to use LowCostAi
Claude Code
Claude Code connects with a key, in one terminal command:
claude mcp add --transport http lowcostai https://low-cost.ai/api/mcp --header "Authorization: Bearer $LCA_KEY"
- The shell replaces $LCA_KEY with your key, so the variable must be set when you run the command. On the developers page the command is ready, with a key you created there
- Inside Claude Code the /mcp command shows the connection status, and claude mcp list in the terminal lists the servers you have set up
Claude on the web and desktop
On claude.ai and in the Claude desktop app you add the server as a custom connector. According to Anthropic's help center:
- Go to Customize, then Connectors
- Click + Add, then Add custom connector
- Enter a name, such as LowCostAi
- As the server URL paste https://low-cost.ai/api/mcp
- Review the detected authentication settings. Under Authentication choose to sign in, and under OAuth client you can keep automatic registration. Our server supports both automatic registration and a metadata document
- Click Add
Signing in shows our consent screen, after which the connector is active. In a chat turn it on from the plus button at the bottom, under Connectors. A connector set up on your account works both on the web and in the app. According to Anthropic, on Team and Enterprise plans only owners can add connectors, through Organization settings, then Connectors.
Cursor
In Cursor you add the server to an mcp.json file: ~/.cursor/mcp.json for every project, or .cursor/mcp.json in one project folder:
{ "mcpServers": { "lowcostai": { "url": "https://low-cost.ai/api/mcp", "headers": { "Authorization": "Bearer ${env:LCA_KEY}" } } } }
According to Cursor's documentation, ${env:LCA_KEY} is replaced with the value of the environment variable, so the key is not stored in the file. You can also write the key itself there, and then never share the file or commit it to a code repository.
Other assistants
Any assistant that supports remote MCP over Streamable HTTP can connect:
- The address: https://low-cost.ai/api/mcp
- With a key: the Authorization: Bearer header and an lca_ key
- With OAuth: the assistant finds the details by itself from the WWW-Authenticate header on the 401 answer. PKCE with S256, dynamic registration and metadata documents are supported. Details on the authentication page
How to disconnect
- Open the developers page
- Find the key: an OAuth connection is named after the app followed by (OAuth), and a regular key by the name you gave it
- Revoke it and confirm. From that moment the assistant cannot reach the account
You can then also remove the server in the assistant itself, so it does not try to connect again. Every new OAuth approval creates a new key, so revoke old connections: an account is limited to 25 active keys.
When something does not work
| What you see | What to do |
|---|---|
| 401 unauthorized | The key is missing, wrong or revoked. Check the developers page, or connect again with OAuth |
| invalid_grant on an OAuth sign-in | The account already has 25 keys, or more than 5 minutes passed. Revoke an old key and connect again |
| insufficient_credits | The balance is below the price. Add credits on the credits page |
| price_above_cap | The price went up since the estimate. Ask the assistant to estimate again |
| 429 rate_limited | More than 120 requests or 30 generations a minute. Wait a minute |