payfriend-mcp
v1.0.0
Published
MCP server for Payfriend — invoice management, customer CRM, payments, and collection flows
Maintainers
Readme
payfriend-mcp
MCP server for Payfriend — manage invoices, customers, payments, and collection flows from Claude Code and other MCP clients.
Setup
1. Get your MCP token
Go to payfriend.io/settings → API Tokens, create a token with mcp:access ability, and copy the value shown — it's only displayed once.
2. Add to Claude Code
claude mcp add payfriend -s user -- npx -y payfriend-mcp --token=YOUR_TOKENThat's it. The payfriend server is now available in every Claude Code session.
Verify it's connected:
claude mcp list
# payfriend: ✓ ConnectedAvailable tools
Customers (5)
| Tool | Description |
|---|---|
| customers_list | List customers with pagination and status filter |
| customers_get | Get a single customer with contacts and invoices |
| customers_create | Create a new customer |
| customers_update | Update an existing customer |
| customers_search | Search by name, email, phone, or CVR |
Invoices (6)
| Tool | Description |
|---|---|
| invoices_list | List invoices with filters (status, customer, date range) |
| invoices_get | Get invoice with customer, line items, and payments |
| invoices_create | Create a new invoice |
| invoices_update_status | Transition invoice status (state machine) |
| invoices_mark_paid | Mark invoice as fully paid |
| invoices_stats | Get invoice statistics (totals, counts by status) |
Payments (2)
| Tool | Description |
|---|---|
| payments_list | List payments, optionally filtered by invoice |
| payments_register | Register a manual payment against an invoice |
Collection Flows (5)
| Tool | Description |
|---|---|
| flows_list | List all collection flows |
| flows_get | Get flow with nodes, edges, and execution count |
| flows_activate | Activate a flow to start processing |
| flows_deactivate | Deactivate a flow to stop processing |
| flows_executions | List recent flow executions |
Usage in Claude Code
Once connected, Claude can manage your collections naturally:
"Show me all overdue invoices"
"Create a customer: Acme ApS, CVR 12345678"
"Mark invoice 42 as paid"
"What are my invoice stats?"
"Activate collection flow 1"
"Search for customers matching 'hansen'"Configuration
| Flag | Env var | Description |
|---|---|---|
| --token=VALUE | PAYFRIEND_TOKEN | Your MCP token (required) |
| --api=URL | — | Override API base URL (default: https://payfriend.io/mcp/v1) |
Using an env var instead of a flag:
claude mcp add payfriend -s user \
--env PAYFRIEND_TOKEN=YOUR_TOKEN \
-- npx -y payfriend-mcpOther MCP clients
Cursor / Windsurf — add to your MCP config file:
{
"mcpServers": {
"payfriend": {
"command": "npx",
"args": ["-y", "payfriend-mcp", "--token=YOUR_TOKEN"]
}
}
}Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"payfriend": {
"command": "npx",
"args": ["-y", "payfriend-mcp", "--token=YOUR_TOKEN"]
}
}
}Links
- payfriend.io — create an account and get your token
- Documentation — in-app API & MCP reference
- MCP documentation — learn about the Model Context Protocol
