Integrations

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

  1. Log in to Corebill
  2. Go to Developers > API Keys
  3. Create a new API key with write permission (or admin if you need delete operations)
  4. 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:

JSON
1{
2 "mcpServers": {
3 "corebill": {
4 "command": "npx",
5 "args": ["-y", "corebill-mcp"],
6 "env": {
7 "COREBILL_API_KEY": "sk_your_api_key_here"
8 }
9 }
10 }
11}

Restart Claude Desktop to load the new configuration.

Setup: Cursor

Create a file at .cursor/mcp.json in your project root:

JSON
1{
2 "mcpServers": {
3 "corebill": {
4 "command": "npx",
5 "args": ["-y", "corebill-mcp"],
6 "env": {
7 "COREBILL_API_KEY": "sk_your_api_key_here"
8 }
9 }
10 }
11}

Setup: Windsurf

Open the configuration file at ~/.codeium/windsurf/mcp_config.json:

JSON
1{
2 "mcpServers": {
3 "corebill": {
4 "command": "npx",
5 "args": ["-y", "corebill-mcp"],
6 "env": {
7 "COREBILL_API_KEY": "sk_your_api_key_here"
8 }
9 }
10 }
11}

Setup: VS Code (Copilot)

Create a file at .vscode/mcp.json in your project root:

JSON
1{
2 "mcpServers": {
3 "corebill": {
4 "command": "npx",
5 "args": ["-y", "corebill-mcp"],
6 "env": {
7 "COREBILL_API_KEY": "sk_your_api_key_here"
8 }
9 }
10 }
11}

Setup: Claude Code (CLI)

Add to your ~/.claude/settings.json:

JSON
1{
2 "mcpServers": {
3 "corebill": {
4 "command": "npx",
5 "args": ["-y", "corebill-mcp"],
6 "env": {
7 "COREBILL_API_KEY": "sk_your_api_key_here"
8 }
9 }
10 }
11}

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.

ToolActions
list_companiesList the companies of the organization
manage_customerslist (text search), get, create, update, delete
manage_quoteslist, get, create, update, delete, send, approve, reject, convert (to invoice)
manage_invoiceslist, get, create, update, send, record_payment, refund, cancel, mark_uncollectible, delete
manage_itemslist, get, create, update, delete (services and products catalog)
manage_expenseslist, get, create (vendor and category by name), update, delete, vendors, categories
manage_projectslist, 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

VariableRequiredDescription
COREBILL_API_KEYYesAPI key of the company to operate on (each key belongs to one company)
COREBILL_API_URLNoAPI base, with or without /v1 (default: https://api.corebill.io)

API Key Permissions

The MCP server requires different permission levels depending on the operations:

PermissionOperations
readList and get resources
writeCreate and update resources
adminDelete 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:

FeatureAI Agent (Built-in)MCP Server
AccessCorebill dashboardAny MCP client (Claude, Cursor, etc.)
AuthenticationAutomatic (logged in)API key required
CustomersFull CRUD + searchFull CRUD + search
InvoicesFull CRUDFull CRUD
QuotesFull CRUDFull CRUD
Items catalogSearch, list, createFull CRUD
Send emailsYesNot yet
Record paymentsYesNot yet
Convert quote to invoiceYesNot yet
Analytics & reportsYes (4 tools)Not yet
Streaming responsesYes (SSE)N/A
Conversation historyYes (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.