Skip to main content
Velobase provides an official Model Context Protocol (MCP) server (@velobaseai/velobase-sdk-mcp). By installing this server in your AI coding assistant (Cursor, Windsurf, Cline, etc.), the AI can access our latest Python and JavaScript SDK documentation and automatically write integration code, both for the model gateway (point your OpenAI or Anthropic SDK at https://api.velobase.io/v1 and bill each call to an end customer’s wallet) and for the billing primitives you use to price your own work (freeze, consume, deduct).
The gateway routes model calls and meters them against a per customer wallet using the X-Velobase-Customer: <user-id> header. The billing primitives (/v1/billing/freeze, /v1/billing/consume, /v1/billing/deduct) cover work you price yourself. The MCP server can generate code for both.

Installation

If you are using Cursor, you can install the MCP server with one click:Install in Cursor

Usage

Once installed, you can prompt your AI assistant like this:
  • “I need to route my Anthropic SDK calls through the Velobase gateway in Python so each call bills an end customer’s wallet. Check how to install the SDK and write the setup.”
  • “Use the Velobase MCP to find the JavaScript SDK instructions for freezing and consuming funds with a transaction_id.”
  • “Integrate Velobase billing and write a script to deduct 50000 credits ($0.05) from a customer’s wallet.”
The AI will use the sdk_download_and_usage tool to fetch the required information and generate the code.
All amounts are positive integer credits: 1 credit = 1 micro-USD, so 1 USD = 1,000,000 credits. Unit-suffixed fields such as amount_usd or amount_cents are rejected by the API. For JavaScript the MCP server pins the current SDK version when it writes install steps: npm i @velobaseai/billing@^1.2.0. From Python, use plain REST calls plus the OpenAI SDK for gateway calls.