GitHub hosts HunyuanVideo, Tencent's open-source framework for large-scale video generation models, enabling AI-driven video creation.
Rekey
About Rekey
Rekey provides an OAuth 2.1 authorization server and billing system designed for MCP-based AI agents. It combines identity management with usage-based billing, allowing agents to authenticate users and meter their consumption against predefined quotas. The system tracks credits consumed by model tokens, tool calls, or other resources, preventing negative balances by returning 402 errors when limits are exceeded. Rekey supports multiple payment processors through a unified interface, enabling configuration changes without altering billing code. The platform includes an operator MCP server with 24 tools for managing applications, plans, and subscriptions, while end-user tools provide read-only access to account information. Identity and entitlements are unified in a single tenant model to prevent drift between auth and billing records. The software is MIT licensed and can be self-hosted with full control over the Postgres database, or run as a managed service.
Key features
- OAuth 2.1 authorization server with PKCE support
- Usage-based billing with quota enforcement
- Unified tenant model for identity and entitlements
- Operator MCP server with 24 tools
- End-user MCP tools for account access
- Multiple payment processor integration
- Self-hosting via Docker Compose
- Atomic credit consumption with balance protection
Use cases
- Authenticating MCP clients for AI agents
- Metering agent usage against subscription plans
- Managing multi-tenant billing for agent platforms
Pros
- Unified tenant model for identity and billing
- Atomic credit consumption with non-negative balance enforcement
- Self-hosting option with MIT license and full control
- Support for multiple payment processors via single interface
- MCP-compliant OAuth 2.1 authorization server included
Cons
- No free tier for managed service
- Requires Docker Compose for self-hosting
- Limited to MCP ecosystem
- Enterprise features require contact
Frequently asked questions about Rekey
What is Rekey and what does it do?
Rekey is an OAuth 2.1 authorization server and billing system designed for MCP-based AI agents. It handles user authentication and usage-based billing, allowing agents to meter consumption against predefined quotas while preventing negative balances.
Who is Rekey suitable for?
Rekey is suitable for developers building and deploying MCP-based AI agents that require user authentication and usage-based billing. It is particularly useful for those who want to self-host their infrastructure and maintain full control over their data.
How does Rekey handle billing and quotas?
Rekey tracks credits consumed by model tokens, tool calls, or other resources, and stops usage when predefined quotas are exceeded by returning a 402 error. It supports multiple payment processors through a unified interface, allowing configuration changes without altering billing code.
Can Rekey be self-hosted?
Yes, Rekey can be self-hosted with full control over the Postgres database. It is MIT licensed, and the same build can be used for both self-hosting and production environments.
What MCP servers does Rekey provide?
Rekey provides two MCP servers: one for end-user tools (read-only access to account information) and one operator MCP server with 24 tools for managing applications, plans, and subscriptions.
How does Rekey integrate with payment processors?
Rekey supports multiple payment processors such as Stripe, PayPal, and Razorpay through a unified BillingProvider interface. You can configure the payment processor per application without changing billing code.