Agent Billy MCP Server
Provides secure, role-based access to Stripe billing operations for AI assistants like Claude and Cursor. It enables users to manage customers, subscriptions, invoices, and refunds through a local proxy with server-side permission enforcement.
README
Agent Billy MCP Server
Local MCP proxy that gives AI assistants (Claude, Cursor, Copilot) secure, role-based access to your Stripe billing through your Billy container API.
Quick Start
npx agent-billy --api-url https://yourorg.agentbilly.ai --api-key billy_your-api-key
Or use environment variables:
export BILLY_API_URL=https://yourorg.agentbilly.ai
export BILLY_API_KEY=billy_your-api-key
npx agent-billy
MCP Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"agent-billy": {
"command": "npx",
"args": ["-y", "agent-billy"],
"env": {
"BILLY_API_URL": "https://yourorg.agentbilly.ai",
"BILLY_API_KEY": "billy_your-api-key"
}
}
}
}
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Claude Code
claude mcp add agent-billy \
-e BILLY_API_URL=https://yourorg.agentbilly.ai \
-e BILLY_API_KEY=billy_your-api-key \
-- npx -y agent-billy
Cursor
Go to Settings > MCP Servers > Add new MCP server and enter:
{
"command": "npx",
"args": ["-y", "agent-billy"],
"env": {
"BILLY_API_URL": "https://yourorg.agentbilly.ai",
"BILLY_API_KEY": "billy_your-api-key"
}
}
VS Code (GitHub Copilot)
Add to your settings.json:
{
"mcp": {
"servers": {
"agent-billy": {
"command": "npx",
"args": ["-y", "agent-billy"],
"env": {
"BILLY_API_URL": "https://yourorg.agentbilly.ai",
"BILLY_API_KEY": "billy_your-api-key"
}
}
}
}
}
Authentication
Generate an API key from your Billy dashboard:
- Log in at
https://yourorg.agentbilly.ai - Go to Settings > API Keys
- Click Generate Key and choose a role
- Copy the key and use it as your
BILLY_API_KEY
API keys inherit the role you assign when creating them. A Billing Clerk key can only perform Billing Clerk actions. Keys can be revoked at any time from Settings.
Available Tools
Read Tools
| Tool | Description |
|---|---|
billy_list_charges |
List recent charges. Filter by status (succeeded, failed, pending). |
billy_get_charge |
Get details for a specific charge by Stripe charge ID. |
billy_list_customers |
List customers with pagination. |
billy_get_customer |
Get details for a specific customer by Stripe customer ID. |
billy_list_subscriptions |
List subscriptions. Filter by status (active, past_due, canceled, trialing). |
billy_list_invoices |
List invoices. Filter by status (draft, open, paid, void, uncollectible). |
billy_list_refunds |
List all refunds that have been issued. |
billy_get_stats |
Dashboard snapshot: MTD revenue, success rate, active subs, failed charges. |
billy_search |
Search across customers, charges, subscriptions, and invoices by keyword. |
Write Tools
| Tool | Description |
|---|---|
billy_create_refund |
Issue a full or partial refund for a charge. |
billy_create_customer |
Create a new Stripe customer. |
billy_update_customer |
Update a customer's email, name, description, or metadata. |
billy_cancel_subscription |
Cancel a subscription (at period end or immediately). |
billy_reactivate_subscription |
Reactivate a canceled subscription that hasn't fully expired. |
billy_send_invoice |
Send an invoice to the customer via email. |
billy_void_invoice |
Void an invoice so it can no longer be paid. |
billy_create_coupon |
Create a discount coupon (percentage or fixed amount). |
billy_delete_coupon |
Delete a coupon so it can't be applied to new customers. |
Role-Based Access
All permissions are enforced server-side. The API key inherits the role of the user who created it.
| Role | Read | Refunds | Manage Subs | Invoices | Customers | Coupons |
|---|---|---|---|---|---|---|
| Owner | All | Unlimited | Full | Full | Full | Full |
| Billing Manager | All | Up to $5,000 | Full | Full | Full | Full |
| Billing Clerk | All | Up to $100 | View only | View only | Update only | No |
| Read Only | All | No | No | No | No | No |
Spending Limits
Refund limits are enforced per transaction, per role:
- Owner: No limit
- Billing Manager: $5,000 per refund
- Billing Clerk: $100 per refund
- Read Only: Cannot issue refunds
Attempting to exceed your limit returns a permission error. The action is logged in the audit trail.
CLI Options
agent-billy --api-url <url> --api-key <key>
Options:
--api-url Billy container API URL (or BILLY_API_URL env var)
--api-key API key (or BILLY_API_KEY env var)
--token JWT auth token, alternative to api-key (or BILLY_TOKEN env var)
--help, -h Show help
Links
- Website: agentbilly.ai
- Docs: agentbilly.ai/docs
- npm: npmjs.com/package/agent-billy
- Support: hello@agentbilly.ai
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。