# @beinfi/pulse-mcp
MCP server for the [Pulse](https://beinfi.com) usage-based billing platform.
Track metering events, manage customers, generate invoices, and more — directly from any MCP-compatible AI assistant (Claude, Cursor, Windsurf, etc.).
## Quick Start
```bash
npx @beinfi/pulse-mcp
```
Set your API key as an environment variable:
```bash
export PULSE_API_KEY=sk_live_...
```
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"pulse": {
"command": "npx",
"args": ["-y", "@beinfi/pulse-mcp"],
"env": {
"PULSE_API_KEY": "sk_live_..."
}
}
}
}
```
### Claude Code
```bash
claude mcp add pulse -- npx -y @beinfi/pulse-mcp
```
Then set your API key:
```bash
export PULSE_API_KEY=sk_live_...
```
## Available Tools
### Metering
- **track_event** — Track a single usage event for a customer
- **track_events_batch** — Track multiple usage events in a single request
- **get_usage** — Query aggregated usage data with optional filters
### Products & Meters
- **list_products** — List all products
- **get_product** — Get product details including its meters
- **create_product** — Create a new product
- **create_meter** — Create a meter (usage dimension) for a product
### Customers
- **list_customers** — List all customers for a product
- **create_customer** — Create a new customer
- **update_customer** — Update customer details
### Billing
- **list_invoices** — List invoices for a product
- **generate_invoice** — Generate an invoice for a customer's usage period
- **get_invoice** — Get invoice details
- **send_invoice** — Send an invoice via email
### Payment Links
- **list_payment_links** — List all payment links
- **create_payment_link** — Create a new payment link
- **get_payment_link** — Get payment link details
- **list_payment_intents** — List payment intents for a link
- **list_received_payments** — List all received payments
### Marketplace
- **list_my_agents** — List your published AI agents
- **get_agent_usage** — Get usage stats for an agent
- **invoke_agent** — Invoke an AI agent with text input
### Webhooks
- **list_webhooks** — List all webhook subscriptions
- **create_webhook** — Create a webhook subscription
- **delete_webhook** — Delete a webhook subscription
## Configuration
| Environment Variable | Required | Default | Description |
|---|---|---|---|
| `PULSE_API_KEY` | Yes | — | Your Pulse API key (`sk_live_...` or `sk_test_...`) |
| `PULSE_BASE_URL` | No | `https://api.beinfi.com` | API base URL |
## License
MIT