MCP server implementation for Bill.com API integration, providing accounts payable and spend management functionality.
- Vendors: Search, get, create, update, archive
- Bills: Search, get, create, update, archive
- Bill Payments: Search, get, create, void
- Vendor Credits: Search, get, create, update, archive
- Recurring Bills: Search, get, create, update, archive
- Approvals: Get policies, pending approvals, approve/reject bills, history
- Budgets: Search, get, create, update
- Cards: Search, get, create virtual, freeze, unfreeze
- Transactions: Search, get, update
- Reimbursements: Search, get, create, approve
This server uses two different Bill.com APIs:
- Base URLs:
- Production:
https://api.bill.com/api/v2 - Sandbox:
https://api-sandbox.bill.com/api/v2
- Production:
- Authentication: Session-based (username/password/devKey)
- Entities: Vendors, Bills, Bill Payments, Vendor Credits, Recurring Bills, Approvals
- Base URLs:
- Production:
https://gateway.bill.com/connect/v3/spend - Sandbox:
https://gateway.stage.bill.com/connect/v3/spend
- Production:
- Authentication: Token-based (
apiTokenheader) - Entities: Budgets, Cards, Transactions, Reimbursements
- Copy
.env.exampleto.envand fill in your credentials:
cp .env.example .env- Install dependencies:
npm install- Build:
npm run buildAdd to your Claude Code MCP configuration:
{
"billcom": {
"command": "node",
"args": ["/path/to/billcom-mcp-server/dist/index.js"],
"env": {
"BILLCOM_USERNAME": "your-email@example.com",
"BILLCOM_PASSWORD": "your-password",
"BILLCOM_ORG_ID": "your-org-id",
"BILLCOM_DEV_KEY": "your-dev-key",
"BILLCOM_SPEND_API_TOKEN": "your-spend-api-token",
"BILLCOM_ENVIRONMENT": "production"
}
}
}| Variable | Description | Required | Used By |
|---|---|---|---|
BILLCOM_USERNAME |
Bill.com login email | Yes (for AP) | v2 API |
BILLCOM_PASSWORD |
Bill.com password | Yes (for AP) | v2 API |
BILLCOM_ORG_ID |
Organization ID | Yes (for AP) | v2 API |
BILLCOM_DEV_KEY |
Developer API key | Yes (for AP) | v2 API |
BILLCOM_SPEND_API_TOKEN |
Spend & Expense API token | Yes (for Spend) | v3 API |
BILLCOM_ENVIRONMENT |
sandbox or production |
No (defaults to sandbox) | Both APIs |
Note: You can use just the v2 credentials if you only need AP features, or just the v3 token if you only need Spend & Expense features.
search_vendors- Search vendors with filtersget_vendor- Get vendor by IDcreate_vendor- Create new vendorupdate_vendor- Update vendorarchive_vendor- Archive (deactivate) vendor
search_bills- Search bills with filtersget_bill- Get bill by IDcreate_bill- Create new billupdate_bill- Update billarchive_bill- Archive bill
search_bill_payments- Search paymentsget_bill_payment- Get payment by IDcreate_bill_payment- Create payment for billsvoid_bill_payment- Void unprocessed payment
search_vendor_credits- Search creditsget_vendor_credit- Get credit by IDcreate_vendor_credit- Create creditupdate_vendor_credit- Update creditarchive_vendor_credit- Archive credit
search_recurring_bills- Search recurring billsget_recurring_bill- Get recurring bill by IDcreate_recurring_bill- Create recurring billupdate_recurring_bill- Update recurring billarchive_recurring_bill- Archive recurring bill
get_approval_policies- Get all approval policiesget_pending_approvals- Get items pending your approvalapprove_bill- Approve a pending billreject_bill- Reject a pending billget_approval_history- Get approval history for an object
search_budgets- Search budgetsget_budget- Get budget by UUIDcreate_budget- Create new budgetupdate_budget- Update budget
search_cards- Search cardsget_card- Get card by UUIDcreate_virtual_card- Create virtual cardfreeze_card- Freeze a cardunfreeze_card- Unfreeze a card
search_transactions- Search card transactionsget_transaction- Get transaction by UUIDupdate_transaction- Update transaction (categorize, add memo)
search_reimbursements- Search reimbursement requestsget_reimbursement- Get reimbursement by UUIDcreate_reimbursement- Create reimbursement requestapprove_reimbursement- Approve reimbursement
v2 API search tools support these filter operators:
| Operator | Description |
|---|---|
eq |
Equals |
ne |
Not equals |
lt |
Less than |
le |
Less than or equal |
gt |
Greater than |
ge |
Greater than or equal |
in |
In list |
nin |
Not in list |
sw |
Starts with |
ew |
Ends with |
ct |
Contains |
{
"filters": [
{ "field": "isActive", "op": "eq", "value": "1" }
]
}{
"filters": [
{ "field": "vendorId", "op": "eq", "value": "00000ABC123" }
],
"sort": [
{ "field": "dueDate", "asc": true }
]
}{
"cardType": "virtual",
"status": "active",
"limit": 10
}{
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"limit": 50
}- Uses session-based authentication
- Sessions are automatically managed
- Sessions expire after 35 minutes of inactivity
- The client automatically refreshes sessions before expiry
- Uses token-based authentication via
apiTokenheader - No session management required
- Token should be obtained from Bill.com Spend & Expense portal
You're trying to use v2 AP API features without the required credentials. Set all four environment variables.
You're trying to use v3 Spend & Expense features without the API token. Set BILLCOM_SPEND_API_TOKEN.
Your Spend API token is invalid or expired. Generate a new token from the Bill.com Spend & Expense portal.
MIT