Skip to main content

MCP Server

The Credyt MCP Server connects AI assistants directly to your billing infrastructure. Once installed, you can create products, configure pricing, onboard customers, submit usage events, and inspect wallet balances. All through natural language, without leaving your editor.

What is an MCP Server?

MCP (Model Context Protocol) is an open standard that lets AI assistants call external tools and APIs in a structured way. When an MCP server is connected to your AI client, the model can invoke those tools during a conversation, reading and writing real data on your behalf, rather than just generating code for you to run separately.

Credyt's MCP Server exposes your billing operations as callable tools. Your AI assistant can manage pricing, customers, and analyze activity directly without switching context.

What can Credyt's MCP Server do?

  • Products & pricing: create, version, and manage products with usage-based, fixed, or hybrid pricing. Simulate usage events to verify pricing before going live.
  • Customers: create and look up customers, update their details, and link them to your own external IDs.
  • Subscriptions: subscribe customers to products, activate or deactivate subscriptions, and upgrade or downgrade to different product versions.
  • Wallets: inspect wallet balances and drill into individual account details, including pending transactions.
  • Usage events: submit metered usage events, retrieve event details with generated fees and profitability stats, and review event history per customer.
  • Charges & adjustments: create ad-hoc charges or directly credit and debit wallet accounts for gifts, external top-ups, and refunds.
  • Vendors: set up vendors to track costs associated with usage events and measure profitability.
  • Assets: create and manage custom credit units (tokens, minutes, credits, etc.) with exchange rates.

Example prompts you can use once connected:

"Create a $29/month Pro plan that includes 1,000 API credits, renewing monthly."

"Show me the wallet balance and recent usage for customer cust_abc123."

"Simulate 500 api_call events against the Pro plan's default version."

Prerequisites

  • A Credyt account — sign up at app.credyt.ai
  • A Credyt API key (found in the Developers section of the dashboard)
  • An MCP-compatible AI client (Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Gemini CLI, or GitHub Copilot)
  • Node.js installed (required for the npx-based setup commands below)
Live vs. test mode

There is a single MCP endpoint: https://mcp.credyt.ai. Whether you're operating in live or test mode is determined by the API key you use — generate separate live and test keys from app.credyt.ai.

How to use the MCP Server

The fastest setup path is npx add-mcp, which writes the MCP config for your client automatically.

Step 1 — Connect the MCP server:

npx add-mcp \
https://mcp.credyt.ai \
--header "Authorization: Bearer key_your_api_key_here"

Step 2 — Install the Credyt plugin (adds guided skills as slash commands):

/plugin marketplace add credyt/ai-tools
/plugin install credyt@credyt/ai-tools

This gives you /credyt:billing-setup, /credyt:billing-verification, and /credyt:billing-integration as slash commands on top of the raw MCP tools.

AI Skills

Credyt ships guided AI Skills that walk your assistant through complete billing workflows. Unlike the raw MCP tools, Skills provide step-by-step instructions that keep the AI on track for complex multi-step tasks.

SkillWhat it does
pricing-strategyGuides you through defining your pricing strategy before configuring any billing tooling.
billing-setupDiscovers your pricing model through a guided conversation, then configures products, assets, and pricing via MCP. Runs a full end-to-end billing cycle verification automatically.
billing-verificationTests the full billing cycle for a specific product — creates a test customer, funds their wallet, sends a usage event, and confirms the fee was charged correctly.
billing-integrationWires Credyt into your application code. Adds customer creation at signup, usage event tracking, balance checks, billing portal links, and balance display.

Claude Code — skills are available as slash commands via the plugin installed above:

Pricing strategy
/credyt:pricing-strategy
Billing setup
/credyt:billing-setup
Billing verification
/credyt:billing-verification
Billing integration
/credyt:billing-integration

AI coding agents (Claude Desktop, Cursor, Codex, Windsurf, Gemini CLI, GitHub Copilot) — install skills first, then use the prompts below:

npx skills add credyt/ai-tools
Pricing strategy
Help me define my pricing strategy with Credyt
Billing setup
Set up my billing with Credyt
Billing verification
Verify my Credyt billing is working correctly
Billing integration
Integrate Credyt billing into my app

Vibe coding tools (Lovable, Bolt, Replit, V0) — skills are installed and run in one prompt, no terminal step needed:

Pricing strategy
Run 'npx skills add credyt/ai-tools --skill pricing-strategy' — then help me define my pricing strategy with Credyt
Billing setup
Run 'npx skills add credyt/ai-tools --skill billing-setup' — then set up my Credyt billing
Billing verification
Run 'npx skills add credyt/ai-tools --skill billing-verification' — then verify my Credyt billing is working correctly
Billing integration
Run 'npx skills add credyt/ai-tools --skill billing-integration' — then integrate Credyt billing into my app

Available tools

The Credyt MCP Server exposes 31 tools across 9 domains. Descriptions match the tool schemas returned to your AI client.

Customers

ToolDescription
create_customerCreate a customer with optional product subscriptions and metadata.
get_customerGet a customer's full details including subscriptions, metadata, and external accounts.
list_customersList customers with optional filtering by external ID.
update_customerUpdate a customer's name, email, or external ID.
create_subscriptionAdd a product subscription to an existing customer.
update_subscriptionActivate or deactivate a customer's subscription.
update_subscription_productChange the product version on a subscription to upgrade or downgrade the customer.

Products

ToolDescription
create_productCreate a new product with pricing. Products define what you bill for.
get_productGet a product's details including all versions and default version pricing.
list_productsList products with optional filtering by code.
delete_productDelete or archive a product. Products with active subscribers are archived instead of deleted.

Product versions

ToolDescription
create_product_versionCreate a new version of an existing product with updated pricing, without affecting existing subscribers.
get_product_versionGet details of a specific product version including its pricing configuration.
update_product_versionPublish a draft version or make a published version the default.
archive_product_versionArchive a product version. Archived versions cannot be modified or subscribed to.

Wallets

ToolDescription
get_walletGet a customer's wallet with account balances.
get_wallet_accountGet detailed balances for a specific wallet account, including pending transactions.

Usage events

ToolDescription
submit_eventsSubmit usage events for a customer, identified by customer_id or customer_external_id.
get_eventGet an event's details including generated usage fees and profitability stats.
list_eventsList usage events with optional filtering by customer, ordered by submission date descending.
simulate_usageSimulate usage events against a product version to test pricing before going live.

Charges & adjustments

ToolDescription
create_chargeCreate an ad-hoc charge against a wallet account outside normal usage processing.
create_adjustmentDirectly credit or debit a wallet account. Use positive amounts to credit (gifts, top-ups, refunds) and negative amounts to debit.

Vendors

ToolDescription
create_vendorCreate a vendor to track costs associated with usage events.
get_vendorGet a vendor's details.
list_vendorsList vendors with optional filtering by external ID.

Assets

ToolDescription
create_assetCreate a custom asset (credits, tokens, coins, minutes, etc.) with optional exchange rates.
get_assetGet an asset's details including exchange rate history.
list_assetsList all custom assets, sorted alphabetically by code.
add_asset_rateAdd a new exchange rate for an asset. Closes the previous rate automatically.
quote_assetGet an exchange quote — how many asset units a given source amount buys.

For a deeper guide to integrating Credyt into your application using an AI coding assistant, see the AI Integration Guide.