JSPM

  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q68687F
  • License MIT

MCP server for tru — portable identity, billing, and provisioning for AI-native apps

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tru-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    tru MCP Server

    MCP server for tru — auth and billing API in one. Verify identity, charge users, issue virtual cards, and get risk signals on every user. Payments flow to your existing Stripe account.

    Quick Setup

    npx tru-mcp init

    No API key needed. This detects your MCP client (Claude Code, Claude Desktop, Cursor) and writes the config automatically. Then tell your agent:

    "Run dev_setup to set up tru"

    Your agent will register your app, get you an API key, connect Stripe, and discover your API — all in one conversation.

    If you already have an API key:

    npx tru-mcp init --key tru_ak_your_key_here

    Manual Config

    Add to your .mcp.json (Claude Code) or equivalent:

    {
      "mcpServers": {
        "tru": {
          "command": "npx",
          "args": ["-y", "tru-mcp"],
          "env": {
            "TRU_API_URL": "https://tru.so"
          }
        }
      }
    }

    Environment Variables

    Variable Required Description
    TRU_API_KEY No Your tru API key (starts with tru_ak_). Not needed for initial setup — dev_register_app will create one.
    TRU_API_URL No tru server URL (default: https://tru.so)

    Getting Started

    The MCP tools walk you through setup step by step:

    1. dev_setup — Full guide: what tru is, why it matters, risk signals, setup walkthrough
    2. dev_register_app — Create your app, get an API key
    3. dev_connect_stripe — Link your Stripe account to receive payments

    After that, you're live. All the tools below work immediately.

    Tools

    Wallet

    Tool Description
    login Authenticate with tru via the browser
    logout Log out and clear stored credentials
    request_payment Request a payment from a tru user — works with tru-connected apps or external merchants
    check_payment_status Check the status of a charge or subscription request
    get_card Request a one-time virtual card to make a purchase on behalf of a user
    request_spt Request a Shared Payment Token for purchasing from an ACP-compatible merchant
    report_purchase Report that an approved external purchase has been completed
    browse_apps List all apps in the tru directory
    lookup_skill Fetch an app's SKILL.md — how agents should interact with its API
    discover_products List products and pricing available from an app
    check_spending Check spending totals and remaining budget across all apps
    check_history View recent charges and payment activity
    check_rules List your current app rules (spending limits, permissions, escalation thresholds)
    suggest_rule Create a new app rule to auto-approve future charges

    Developer

    Tool Description
    dev_setup Full setup guide — what tru is, how to integrate, risk signals explained
    dev_register_app Register a new app on tru and get an API key
    dev_connect_stripe Link your existing Stripe account to receive payments
    dev_configure_products Sync and configure which Stripe products agents can discover and sell
    dev_configure_login Generate an OAuth authorization URL for a tru-integrated app
    dev_generate_skill Crawl your site and generate an agent skill (SKILL.md)
    dev_add_agent_signup Get the agent signup HTML snippet for your app's login page
    dev_provision_user Auto-create a user account on a third-party app
    dev_validate Validate an app's tru integration — checks config, endpoints, and SDK usage
    dev_enable_acp Generate an ACP bearer token so external agents can create checkout sessions

    Why tru?

    • Risk signals from day one — every user carries a risk profile built from Stripe Radar. Use risk level, score, card funding type, country, and fingerprint reuse to set trial length, spending limits, and feature access.
    • Auth + billing in one API — stop stitching together Stripe, an identity provider, a KYC vendor, and your own spending controls.
    • Payments to your Stripe — connect via OAuth, money flows to your existing account. Same dashboard, same bank, same everything.
    • Users control spending — they set per-app rules ("auto-approve under $10"), which builds trust and increases conversion.

    Example: Developer Setup

    Developer: I want to integrate tru into my app
    
    Agent: → dev_setup()
           Here's how tru works...
    
    Agent: Let's register your app.
           → dev_register_app(service_name: "my-app", display_name: "My App")
           ✓ App created — API key: tru_ak_...
    
    Agent: Now let's connect your Stripe account.
           → dev_connect_stripe(service_name: "my-app")
           Open this URL to authorize: https://connect.stripe.com/oauth/authorize?...
    
    Agent: You're live. Charges approved by tru users will flow to your Stripe account.

    Example: Auto-Provisioning

    User: Sign me up for clayking
    
    Agent: → login(email: "user@example.com")
           ✓ Verified — risk: low
    
    Agent: → dev_provision_user(email: "user@example.com", service_name: "clayking")
           ✓ Provisioned — got API key and account ID
    
    Agent: Now using clayking API on behalf of user...

    Example: End User Flow

    User: Sign me up for that new service
    
    Agent: → login(email: "user@example.com")
           ✓ Verified — risk: low, score: 12, debit card, US
    
    Agent: → request_payment(amount_cents: 999, description: "Monthly plan", merchant: "my-app")
           ✓ Auto-approved by spending rules

    License

    MIT