SDK Quickstart
Slonge Billing ships three npm packages:
@slonge/cli— command-line tool@slonge/agent-sdk— TypeScript SDK for the HTTP API@slonge/mcp-server— MCP server (stdio) for Claude Desktop / Cursor
Installation
npm install -g @slonge/cli
Create a token
- In the dashboard go to Settings → API Tokens
- Click New token
- Copy the token (shown only once)
Configuration
export SLONGE_API_TOKEN=slk_...
export SLONGE_API_BASE_URL=https://app.slonge-billing.ch
First call
slonge client list
slonge invoice send <id>
See slonge --help for the complete reference.
Programmatic SDK Usage
import { SdkClient, ClientResource } from '@slonge/agent-sdk';
const client = new SdkClient({
baseUrl: 'https://app.slonge-billing.ch',
apiToken: process.env.SLONGE_API_TOKEN!,
});
const clients = await new ClientResource(client).list();
MCP (Claude Desktop / Cursor)
Local via stdio:
npm install -g @slonge/mcp-server
Then in claude_desktop_config.json:
{
"mcpServers": {
"slonge-billing": {
"command": "slonge-mcp",
"env": {
"SLONGE_API_TOKEN": "slk_...",
"SLONGE_API_BASE_URL": "https://app.slonge-billing.ch"
}
}
}
}
Or hosted via HTTP at https://app.slonge-billing.ch/api/mcp — if your client supports remote MCP servers.