Manages shared quota pools and enforces rate limits for multiple AI agents using a token bucket system.
Also known as jdkabattles/forgingstack-ration, forgingstack-ration
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Nov 8, 2026
- License
- MIT
What is ForgingStack Ration MCP?
ForgingStack Ration manages shared quota pools and enforces rate limits for multiple AI agents using a token bucket system.
Summary generated from the project's README
About ForgingStack Ration MCP server
ForgingStack Ration provides a centralized way to manage shared quota pools and enforce rate limits for multiple AI agents. It uses a token bucket system to prevent overruns by controlling capacity, refill rates, burst limits, and per-agent caps. This server acts as a public client that connects to a private service, requiring an API key and credits to function. Users must verify their email after signing up to enable pool creation and drawing operations.
Developers interact with the service through a set of tools including create_pool, draw, get_pool, list_pools, topup_pool, delete_pool, get_credits, and get_receipt. The system tracks every draw attempt, whether allowed or denied, by issuing a hash-chained receipt. The server runs locally via stdio after setting the FORGINGSTACK_API_KEY environment variable. Costs are calculated based on pool creations and draw calls, with 1,000 credits available for $10 via Stripe.
What you can do with it
- 1Enforce per-agent usage limitsRestrict an individual agent from exceeding a specific number of draws within a rolling 60-minute window.
- 2Prevent sudden resource spikesEnsure that agent activity does not exceed a predefined burst limit for a specific pool.
- 3Audit agent consumption historyRetrieve a hash-chained receipt for every attempt to draw units from a pool to verify activity.
- 4Manage shared token resourcesCreate a pool with specific capacity and refill rates to distribute units among several agents.
Written from the project's README. Every use case is checked against a quote from it.
How to install ForgingStack Ration MCP
Formats verified 10 Nov 2026Install ForgingStack Ration MCP in Claude Code
$ claude mcp add --env FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY> forgingstack-ration -- uvx forgingstack-rationInstall ForgingStack Ration MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}Install ForgingStack Ration MCP in VS Code
.vscode/mcp.json
{
"servers": {
"forgingstack-ration": {
"type": "stdio",
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}Install ForgingStack Ration MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}Install ForgingStack Ration MCP in Codex
~/.codex/config.toml
[mcp_servers.forgingstack-ration] command = "uvx" args = ["forgingstack-ration"] [mcp_servers.forgingstack-ration.env] FORGINGSTACK_API_KEY = "<YOUR_FORGINGSTACK_API_KEY>"
Install ForgingStack Ration MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}Configuration
FORGINGSTACK_API_KEYRequiredSecretAPI key for Ration. Sign up via POST /v1/signup (key shown once).
FORGINGSTACK_API_BASERation API base URL. Live default.
| Name | Description | |
|---|---|---|
| FORGINGSTACK_API_KEY | API key for Ration. Sign up via POST /v1/signup (key shown once). | RequiredSecret |
| FORGINGSTACK_API_BASE | Ration API base URL. Live default. |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablejdkabattles/forgingstack-ration is public and reachablegithub.com/jdkabattles/forgingstack-ration ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-08github.com/jdkabattles/forgingstack-ration ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from forgingstack-rationPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubForgingStack Ration
One quota pool, many agents, no overruns.
mcp-name: io.github.jdkabattles/forgingstack-ration
This is the public client for Ration. The service itself — the token bucket, the receipt chain, the key store, and billing — runs on ForgingStack's private service and is not in this repo. Copying this repo does not give you the service: you still need an API key and credits, from signup below.
Live API: https://forgingstack-ration.jkbattles.workers.dev
What it does
A principal creates a pool with a capacity, a refill rate, a per-agent cap, and a burst limit. Agents draw units from it. The pool enforces the limits and issues a hash-chained receipt for every draw attempt — allowed and denied.
A draw is denied when:
- the units exceed the burst limit (
draw_exceeds_burst) - the pool does not have enough available units
(
pool_insufficient_units) - the agent's allowed draws inside the rolling 60-minute window
would exceed the per-agent cap (
per_agent_cap_exceeded)
The per-agent cap window is a rolling 60 minutes — a documented design choice, not a calendar window.
Signup (v1)
curl -X POST https://forgingstack-ration.jkbattles.workers.dev/v1/signup \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
Returns an API key once and 100 starter credits. Save the key
immediately — it is stored only as a hash and cannot be shown again.
Click the verification link in the signup email before the key can
create pools or draw: until then, pool creation and draws return
403 email_not_verified.
Buying more credits
1 credit per pool creation, 1 credit per draw call (allowed or denied). Top-ups, pool reads, pool lists, and deletes are free.
curl -X POST https://forgingstack-ration.jkbattles.workers.dev/v1/billing/checkout \
-H "X-API-Key: YOUR_PRIMARY_KEY"
Returns the Stripe Payment Link: $10 for 1,000 credits. Pay on Stripe's hosted page with the same email you signed up with. Credits land once the payment is verified (within the hour).
Use it (MCP, stdio)
Set the key, then run the MCP server in this repo:
export FORGINGSTACK_API_KEY="your-key-here"
python -m app.mcp_server
Tools: create_pool, draw, get_pool, list_pools,
topup_pool, delete_pool, get_credits, get_receipt.
See SKILL.md for when to use it and when not to.
Price
1 credit per pool creation. 1 credit per draw call — a denied draw
still costs 1 credit, the draw was performed. An idempotent replay
(same Idempotency-Key) is free and returns the original receipt.
Files in this repo
app/mcp_server.py— MCP wrapper client (stdio, stdlib only)SKILL.md— when to use it, how to read allowed/deniedagent-card.json— A2A-style discovery cardserver.json— MCP Registry metadatapyproject.toml— package metadata for the MCP client
ForgingStack Ration MCP questions
How do I add ForgingStack Ration MCP to Claude Code?
Run claude mcp add --env FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY> forgingstack-ration -- uvx forgingstack-ration in your terminal. Add --scope user to make it available in every project.
How do I add ForgingStack Ration MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How much does it cost to use the service?
It costs 1 credit per pool creation and 1 credit per draw call, even if the draw is denied. Top-ups, pool reads, lists, and deletes are free.
How do I get an API key?
You can sign up via a POST request to the signup endpoint with your email. You will receive an API key once, which must be saved immediately.
What happens if a draw is denied?
A draw can be denied if it exceeds the burst limit, if the pool lacks sufficient units, or if the agent exceeds its per-agent cap within a rolling 60-minute window.