MCP Server
Connect Corebill to any MCP-compatible AI client like Claude Desktop, Cursor, Windsurf, or VS Code.
Overview
The Corebill MCP (Model Context Protocol) server lets you manage your billing platform directly from any MCP-compatible AI client. Create customers, invoices, quotes, and more using natural language through your favorite AI assistant.
Available on npm: corebill-mcp
Prerequisites
- Node.js 18 or higher
- A Corebill account with an API key
- An MCP-compatible client (Claude Desktop, Cursor, Windsurf, VS Code, etc.)
Getting Your Credentials
- Log in to Corebill
- Go to Developers > API Keys
- Create a new API key with write permission (or admin if you need delete operations)
- Copy the API key (
sk_...) and your Company ID (com_...)
Store your API key securely. It provides access to your billing data.
Setup: Claude Desktop
Open the configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Corebill MCP server:
Restart Claude Desktop to load the new configuration.
Setup: Cursor
Create a file at .cursor/mcp.json in your project root:
Setup: Windsurf
Open the configuration file at ~/.codeium/windsurf/mcp_config.json:
Setup: VS Code (Copilot)
Create a file at .vscode/mcp.json in your project root:
Setup: Claude Code (CLI)
Add to your ~/.claude/settings.json:
Available Tools
Each tool groups the actions of one resource (the AI client picks the action). Actions that write need a key with write permission.
| Tool | Actions |
|---|---|
list_companies | List the companies of the organization |
manage_customers | list (text search), get, create, update, delete |
manage_quotes | list, get, create, update, delete, send, approve, reject, convert (to invoice) |
manage_invoices | list, get, create, update, send, record_payment, refund, cancel, mark_uncollectible, delete |
manage_items | list, get, create, update, delete (services and products catalog) |
manage_expenses | list, get, create (vendor and category by name), update, delete, vendors, categories |
manage_projects | list, get, create, update, summary, list_tasks, create_task, update_task, log_time |
Usage Examples
Once configured, you can interact with Corebill using natural language:
- "List all my customers"
- "Create a quote for Acme Corp with 2 units of the Business plan"
- "Show me all unpaid invoices"
- "Create a new customer called Globex Corp in the US"
- "What items do I have in my catalog?"
- "Update the status of invoice INV-2026-00001 to sent"
The AI client will automatically use the appropriate Corebill tools to fulfill your requests.
Environment Variables
| Variable | Required | Description |
|---|---|---|
COREBILL_API_KEY | Yes | API key of the company to operate on (each key belongs to one company) |
COREBILL_API_URL | No | API base, with or without /v1 (default: https://api.corebill.io) |
API Key Permissions
The MCP server requires different permission levels depending on the operations:
| Permission | Operations |
|---|---|
| read | List and get resources |
| write | Create and update resources |
| admin | Delete resources |
Permissions are hierarchical: admin includes write, which includes read.
MCP vs AI Agent
Corebill offers two AI-powered interfaces. Choose the one that fits your workflow:
| Feature | AI Agent (Built-in) | MCP Server |
|---|---|---|
| Access | Corebill dashboard | Any MCP client (Claude, Cursor, etc.) |
| Authentication | Automatic (logged in) | API key required |
| Customers | Full CRUD + search | Full CRUD + search |
| Invoices | Full CRUD | Full CRUD |
| Quotes | Full CRUD | Full CRUD |
| Items catalog | Search, list, create | Full CRUD |
| Send emails | Yes | Not yet |
| Record payments | Yes | Not yet |
| Convert quote to invoice | Yes | Not yet |
| Analytics & reports | Yes (4 tools) | Not yet |
| Streaming responses | Yes (SSE) | N/A |
| Conversation history | Yes (saved) | Managed by client |
The AI Agent is best for non-technical users who want a chat interface inside Corebill. The MCP Server is best for developers who want to manage billing from their IDE or AI assistant.