LirPay
OpenAPI

MCP: manage your LirPay account with AI

Connect an AI client that supports MCP Streamable HTTP and OAuth. Sign in to LirPay, select the permissions you want to delegate, and return to your AI client.

https://lirpay.org/api/v2/mcp

Connect by URL

  1. Open your AI client's MCP server or connector settings. Add a remote server with the URL above and select OAuth authentication.
  2. The client discovers LirPay's authorization server and registers its callback automatically. If your client requires a pre-registered application, create one in LirPay Cloud and enter its client ID and secret in that client.
  3. Sign in to LirPay and review the requested permissions. Select write permissions for the account sections the AI should manage. Select offline_access to allow rotating refresh tokens for up to 30 days.
  4. Return to the AI client. It receives only the tools allowed by your grant. Ask it to check your account and balances before making changes.

You can disconnect the AI in LirPay Cloud → Connected applications. Disconnecting immediately invalidates its access and refresh tokens. Read and write permissions can be granted separately.

Account sections

  • Account details, balances, funds on hold, ledger entries, and financial reports.
  • Projects, verification, moderator-approved payment methods, and merchant/buyer commission splits.
  • Payment links, transaction history, cancellations, and eligible refunds.
  • Payout methods, withdrawal quotes, withdrawals, and cancellations.
  • Conversion quotes, exchanges, and autoswap routes for incoming payments.
  • Robux deliveries, products, stock keys, and product delivery status.
  • Support tickets and replies, account notifications, and Telegram notification settings.
  • Webhooks, delivery history, redelivery, account settings, API keys, OAuth applications and connections, and dashboard sessions.

Existing account rules still apply: high-risk Stars projects require their dedicated relay, payment methods need moderator approval, and spending requires sufficient available funds. Application-owner balance billing is a separate OAuth API feature and is not an MCP account tool.

Local clients using stdio

Build the executable from the repository and create an API key with account:read and the other permissions you need. The local process authenticates directly to the Integration API.

cd v2/services/payment-core
go build -o lirpay-mcp ./cmd/lirpay-mcp

For clients that use an mcpServers configuration:

{
  "mcpServers": {
    "lirpay": {
      "command": "/absolute/path/to/lirpay-mcp",
      "env": {
        "LIRPAY_BASE_URL": "https://lirpay.org",
        "LIRPAY_PUBLIC_KEY": "YOUR_PUBLIC_KEY",
        "LIRPAY_SECRET_KEY": "YOUR_SECRET_KEY"
      }
    }
  }
}

Keep credentials in your client's secret storage or environment. Do not put them in chat messages. Test-mode financial operations stay in test mode; delegated keys cannot gain additional permissions or switch environments. Account and project settings are shared between environments.

Tool arguments and retries

Tools expose typed schemas from the Integration API contract. Identifiers and query filters are top-level arguments; JSON request fields go inside body. Financial writes require idempotency_key: use one key per intended operation and reuse it when retrying that operation. Withdrawals and exchanges use an API quote first.

{
  "name": "lirpay_post_payment_links",
  "arguments": {
    "idempotency_key": "invoice-your-unique-order-id",
    "body": {
      "project_id": "YOUR_PROJECT_ID",
      "display_name": "Order 42",
      "amount": "1000.00",
      "currency": "RUB",
      "method_mode": "multi"
    }
  }
}

Results include http_status and data. API rejections become MCP tool errors with their original error codes. Secret-creation tools return their new credential once and do not cache plaintext credentials for retries.