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: Add the MCP server

Add the Tierux MCP server to your agent's configuration. All it needs is the server URL — no API key, no config header. For Claude Code, this goes in .mcp.json:

{
  "mcpServers": {
    "tierux": {
      "url": "https://mcp-tierux.web.app"
    }
  }
}

Using another client? The MCP setup docs cover setup for Claude Code, Cursor, VS Code, ChatGPT and Claude.ai.

Step 2: Sign in when prompted

On first connect, your agent opens a browser window for an OAuth sign-in — use the same Google account as your Tierux dashboard. If you don't have a Tierux account yet, that first sign-in creates one along with a default project. The MCP server accepts only this OAuth sign-in. Your server-side spe_ API key is for the REST API (step 5), and an MCP request carrying it gets a 401.

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 $9.99/month Pro subscription.
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. This is where your server-side spe_ API key goes — the dashboard shows it once, and Rotate key mints a new one. Keep it on your backend, and never ship it in your app:

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