For developers

AI agents and MCP

Build your billing app with a coding agent, or let an AI assistant work on your account over MCP.

Mikrodius publishes everything an AI needs to work with it: the rules, a step-by-step guide to building a billing app, and the full API reference. You can use it two ways: let a coding agent write your billing app, or connect an AI assistant to your account so it can look things up and make changes for you.

Build an app with a coding agent

  1. 1
    Create an API key

    Under Developers → API keys. Your app uses it to talk to Mikrodius; keep it secret.

  2. 2
    Give the agent the Mikrodius skill

    Install it as below for Claude Code, or point any other agent at the reference.

  3. 3
    Start with the starter prompt

    Fill in your stack and the features you want, and let the agent build.

Claude Code

Install the Mikrodius plugin. It adds the skill, which loads by itself whenever the work touches Mikrodius, and the MCP server; Claude Code asks for your API key when you enable it.

terminal
claude plugin marketplace add https://mikrodius.com/plugins/marketplace.json
claude plugin install mikrodius@mikrodius

To add only the skill to one project, run this in its folder instead:

terminal
curl -fsSL https://mikrodius.com/skill.zip -o mikrodius-skill.zip
unzip -o mikrodius-skill.zip -d .claude/skills && rm mikrodius-skill.zip

Other coding agents

  • Cursor, Windsurf and similar: save skill.md into the agent's rules, for example .cursor/rules/mikrodius.md.
  • Codex, ChatGPT or any other: tell it to read https://mikrodius.com/llms-full.txt before writing code.
  • The whole skill as a folder: skill.zip.

Starter prompt

Paste this into the agent and fill in your stack:

prompt
Build a billing app for my internet business on top of Mikrodius.
Before writing any code, read https://mikrodius.com/llms-full.txt and follow its rules and guide.

Stack: <your stack, e.g. Next.js + PostgreSQL>
Features:
- customers, each linked to a Mikrodius subscriber by external_id
- products mapped to Mikrodius plans
- recording a payment renews the subscriber, with the payment ID as reference
- a webhook route that verifies signatures and handles subscriber.expired
- a customer page showing status, expiry and usage

The API key is in MIKRODIUS_API_KEY and the webhook secret in MIKRODIUS_WEBHOOK_SECRET.

MCP server

MCP lets an AI assistant (Claude Desktop, Claude Code, Cursor or your own agent) call Mikrodius directly: ask it who is online, renew a subscriber or create a plan. Add this to claude_desktop_config.json or the Cursor MCP settings, with your API key:

mcp.json
{
  "mcpServers": {
    "mikrodius": {
      "url": "https://mikrodius.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer mk_live_YOUR_KEY"
      }
    }
  }
}
A read-only API key lets the assistant look but never change anything, and never shows it passwords. Scope the key to one workspace to keep it away from the others.

Tools and schemas

Every MCP tool is one operation of the public API, named by its operationId, and a call runs against the same endpoint with your API key. The same tools are available for function calling:

claude.jsonTool definitions for the Claude Messages API.
openai.jsonJSON schema for OpenAI function calling.
API referenceEvery endpoint, field and webhook event.