Skip to content

taku629/mcpay

Repository files navigation

MCPay

Drop-in monetization for MCP servers. Add per-tool pricing to your Model Context Protocol server in 3 lines. Get paid in fiat via Stripe.

License: MIT Status: Alpha


Why MCPay?

There are 11,000+ MCP servers in the wild as of 2026. Fewer than 5% have any monetization. The handful that do are locked into crypto rails (x402, Lightning, USDC), platform marketplaces (Apify), or homemade auth — none of which the average TS/Python author wants to wire up.

MCPay closes that gap. Wrap your MCP server, set per-tool prices, and we handle:

  • API-key issuance for your customers
  • Per-call metering and rate limiting
  • Stripe-based invoicing (fiat, not crypto)
  • Payouts to you via Stripe Connect
  • A dashboard with revenue + usage analytics

You ship tools. We ship the cash register.

30-Second Example

import { wrapMCPServer } from "@mcpay/sdk";
import { Server } from "@modelcontextprotocol/sdk/server/index.js";

const server = new Server({ name: "my-mcp", version: "0.1.0" });

// existing tool registration ...

export default wrapMCPServer(server, {
  projectId: process.env.MCPAY_PROJECT_ID!,
  apiSecret: process.env.MCPAY_API_SECRET!,
  pricing: {
    "search_web":     { type: "per_call", amountUsd: 0.01 },
    "generate_image": { type: "per_call", amountUsd: 0.05 },
    "ping":           { type: "free" },
  },
});

That's it. Customers paste an MCPay-issued key into their MCP client config, calls get metered, you get paid monthly.

Pricing (Platform)

Tier Monthly GMV Platform fee
Starter < $1,000 0%
Standard $1,000–$10,000 10%
Scale > $10,000 5% + invoiced

Stripe fees are pass-through (2.9% + $0.30 / transaction, customer-facing). We don't take a cut until you're earning real money.

Repository Layout

mcpay/
├── packages/
│   ├── sdk-ts/         # @mcpay/sdk      — TypeScript SDK
│   ├── sdk-python/     # mcpay (PyPI)    — Python SDK (wire-compatible)
│   └── web/            # Next.js dashboard
│       ├── app/api/    #   verify · usage · stripe/* · billing/portal
│       ├── lib/        #   repository (memory + supabase) · stripe · auth · rate-limit
│       └── db/         #   schema.sql + migrations
├── examples/
│   └── basic-server/   # Reference MCP server using the SDK
├── docs/
│   ├── ARCHITECTURE.md
│   └── GETTING_STARTED.md
└── README.md

Roadmap

  • TypeScript SDK (core metering + auth)
  • Python SDK (wire-compatible with TS)
  • Next.js dashboard skeleton
  • Stripe Connect onboarding flow (Express)
  • Stripe webhook with signature verification
  • Stripe Billing Portal route
  • Postgres/Supabase data layer + RLS schema
  • Sliding-window rate limiting
  • Auth scaffold (demo + Supabase modes)
  • Real Supabase Auth wiring (JWT verification, not unsafe decode)
  • Usage-based invoicing (Stripe metered billing → monthly invoice)
  • Per-customer monthly reset cron
  • Marketplace listing page (discoverability)
  • Webhook system for author usage events

Getting Started

See docs/GETTING_STARTED.md.

Architecture

See docs/ARCHITECTURE.md.

License

MIT. Use it, fork it, ship monetized MCP servers.

About

Drop-in monetization for MCP servers. Stripe-backed billing, metering, and dashboards.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors