Blog

Setting up MCP for AI agent billing

June 28, 2026 · Tierux Team

The Model Context Protocol (MCP) is an open standard that lets AI coding agents — Claude Code, Cursor, Codex — interact with external tools and services through a uniform interface. Tierux exposes its entire platform over MCP: creating Google Play products, mapping entitlements, building paywalls, and running test purchases are all available as MCP tools your agent can call.

This guide walks through connecting the Tierux MCP server to your agent and running the first setup command. By the end, your agent will have created a subscription product, mapped it to an entitlement, configured a paywall, and run a test verification — all from one natural-language prompt.

Step 1: Get your API key

Sign in to Tierux and create a project. You will get a server-side API key with the pe_live_ prefix. This key stays on your backend and in your agent's MCP config — it never ships in your app.

Step 2: Configure the MCP server

Add the Tierux MCP server to your agent's configuration. For Claude Code, this goes in .mcp.json:

{
  "mcpServers": {
    "tierux": {
      "url": "https://mcp-tierux.web.app",
      "headers": { "Authorization": "Bearer pe_live_your_key_here" }
    }
  }
}

Step 3: Write the prompt

Now describe what you want in plain language. The agent will call the MCP tools to implement it:

Set up a Pro monthly subscription with a 7-day free trial.
Map it to a "pro" entitlement.
Build a paywall with two packages — monthly and annual.
Run a test purchase to verify it works from end to end.

Step 4: Review and confirm

Every MCP tool that modifies state returns a preview before persisting. The preview shows exactly what will be created — product IDs, mapped entitlements, paywall layout, and pricing. Review each preview and confirm to persist. Nothing is created without your explicit approval.

Step 5: Verify from your backend

Once the agent finishes, your subscription products are live on Google Play, your entitlement mapping is configured, and your paywall is ready. From your backend, verify purchases with a single REST call:

curl https://tierux.com/api/v1/purchases/google-play/verify \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"appId":"...","userId":"...","packageName":"...",
       "productId":"pro_monthly","purchaseToken":"..."}'

# Response
{ "active": true, "entitlement": "pro", "expiresAt": "2026-07-28" }

Why MCP matters for billing

Traditional billing setup involves clicking through multiple cloud consoles (Google Cloud, Play Console, App Store Connect), configuring service accounts and shared secrets, setting up Pub/Sub topics, and wiring up verification code. It takes hours in the best case, days in the worst.

MCP eliminates that. Your agent has access to tools that automate the cloud setup, create products, configure webhooks, and build paywalls. The agent navigates the complexity so you do not have to. And because the MCP protocol is an open standard, it works across Claude Code, Cursor, and any other MCP-compatible agent.

The difference between MCP billing setup and traditional setup is the difference between "send one prompt and review" and "open seven cloud consoles and copy-paste credentials for two hours."
Related reading

Server-side purchase verification guide

What happens after MCP setup — the definitive guide to verifying purchases on your backend.

Google Play Billing 7 migration

If you are migrating an existing app — what changed in Billing Library 7 and how to handle it.

MCP setup docs

Reference documentation for all Tierux MCP tools and their parameters.

Wire up billing with one prompt

Free tier — unlimited apps, 1 paywall. No credit card, no revenue share.

Start free