MCP Server
Use the MCP Server to manage billing infrastructure.
What is an MCP Server?
MCP is an open protocol that standardizes how applications provide context to LLMs. Among other benefits, it provides LLMs tools to act on your behalf.
What can Commet's MCP Server do?
Commet's MCP server gives your AI agent native access to the full Commet platform through a single integration. You can manage all aspects of your billing infrastructure using natural language.
- Organizations — List, create, switch, and get the current organization
- Catalog — Create and manage plans, prices, features, add-ons, promo codes, and regional prices
- Customers — Create and update customers
- Subscriptions — Revert scheduled cancellations
- Data — Query revenue, subscriptions, invoices, and usage with read-only SQL
- Docs — Search the live Commet documentation
- API Keys — Create and delete API keys for the SDK
As an example, you could use this to create a full billing setup, manage plans and features, inspect customer subscriptions, or review invoices and usage data.
Prerequisites
The MCP endpoint is the same for sandbox and live data:
https://commet.co/mcpOAuth uses the authenticated user's active organization. API key authentication uses the organization that created the key.
To use it, you'll need to:
- Create a Commet account
- Have an MCP-compatible client (Cursor, Claude Code, Claude Desktop, etc.)
Browser-based clients can use OAuth with no API key. If your client runs in CI, on a server, or anywhere browser login is not possible, pass a Commet API key in the x-api-key header.
Switch to a sandbox organization when experimenting or setting up billing for the first time. Operations on a live organization affect real customers immediately.
How to use the MCP Server
Choose your preferred client below.
Open the command palette and choose "Cursor Settings" > "MCP" > "Add new global MCP server".
{
"mcpServers": {
"commet": {
"url": "https://commet.co/mcp"
}
}
}claude mcp add --transport http commet https://commet.co/mcpOpen Claude Desktop settings > "Developer" tab > "Edit Config".
{
"mcpServers": {
"commet": {
"url": "https://commet.co/mcp"
}
}
}codex mcp add commet --url https://commet.co/mcpThe command opens the browser for OAuth authentication. Once complete, verify with:
codex mcp listAdd the following to your VS Code settings.json:
{
"mcp": {
"servers": {
"commet": {
"type": "http",
"url": "https://commet.co/mcp"
}
}
}
}Add the following to ~/.gemini/settings.json:
{
"mcpServers": {
"commet": {
"httpUrl": "https://commet.co/mcp"
}
}
}Add the following to opencode.json:
{
"mcp": {
"commet": {
"type": "remote",
"url": "https://commet.co/mcp"
}
}
}{
"mcpServers": {
"commet": {
"serverUrl": "https://commet.co/mcp"
}
}
}API key authentication
For clients that cannot open browser login, add an x-api-key header:
claude mcp add --transport http commet https://commet.co/mcp --header "x-api-key: ck_xxxxxxxxx"For JSON-based clients:
{
"mcpServers": {
"commet": {
"url": "https://commet.co/mcp",
"headers": {
"x-api-key": "ck_xxxxxxxxx"
}
}
}
}API-key sessions authenticate as the user who created the key and use the organization that created the key. Create the key from a sandbox organization when experimenting.
Available Tools
The MCP server exposes the following tools once connected:
Organizations
| Tool | Description |
|---|---|
list_organizations | List all organizations you have access to, including live orgs and their sandboxes |
get_current_organization | Get the currently active organization context |
switch_organization | Switch the active organization context |
create_organization | Create a new organization for the authenticated user |
switch_organization and create_organization work on OAuth sessions only — API-key sessions are pinned to the key's organization. The switch takes effect on the next message.
Catalog
| Tool | Description |
|---|---|
create_plan | Create a pricing plan. Paid plans must include at least one price; free plans take none |
update_plan | Update a plan's name or description |
delete_plan | Soft-delete a plan. Existing subscriptions continue billing normally |
toggle_plan_visibility | Toggle a plan between public and private. Private plans are hidden but existing subscriptions keep access |
add_plan_price | Add a base price to a plan for another billing interval. Configure Markets and selectable variants through the API or dashboard |
update_plan_price | Update a base catalog price or trial; included credits/balance allocations update on their next reset |
add_plan_feature | Add a feature to a plan, configured per the plan's consumption model |
remove_plan_feature | Remove a feature from a plan. Active subscriptions keep their current-period snapshot until renewal |
create_feature | Create a feature: boolean (on/off), usage (usage-based), or seats (per-user) |
update_feature | Update a feature's name, description, or unit name |
delete_feature | Soft-delete a feature. Remove it from all plans and archive its add-on first |
create_addon | Create a purchasable add-on linked to one feature with its own pricing |
update_addon | Update an add-on's name, description, pricing, or usage limits |
delete_addon | Archive (soft-delete) an add-on. Cannot archive one with active subscriptions |
create_promo_code | Create a single-discount Offer and its percentage or fixed-amount Promo Code together |
toggle_promo_code | Toggle a promo code between active and inactive. Inactive codes cannot be redeemed at checkout |
set_regional_prices | Set an exchange rate for a plan + currency and auto-calculate regional prices |
remove_regional_prices | Remove all regional prices for a plan + currency |
Customers
| Tool | Description |
|---|---|
create_customer | Create a customer. Idempotent on externalId — returns the existing customer if already created |
update_customer | Update a customer's billing email, name, timezone, address, external ID, or metadata |
Subscriptions
| Tool | Description |
|---|---|
uncancel_subscription | Revert a scheduled cancellation before the subscription is fully canceled |
Data & Docs
query_billing_data is the read path. Instead of one tool per entity, the agent writes read-only SQL — automatically scoped to your organization, SELECT only, max 100 rows per query, 5-second timeout.
| Tool | Description |
|---|---|
query_billing_data | Run read-only SQL over your billing data: revenue, subscriptions, customers, invoices, usage, plans |
search_docs | Search the live Commet documentation by semantic query |
API Keys
| Tool | Description |
|---|---|
create_api_key | Create an API key for the SDK. The plaintext key is shown only once |
delete_api_key | Permanently delete an API key. Applications using it immediately lose access |
How is this guide?