トークンバケット方式を用いて、複数のAIエージェント向けの共有クォータプール管理およびレート制限の適用を行います。
別名 jdkabattles/forgingstack-ration, forgingstack-ration
- スター
- 0
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.1.0
- 最終コミット
- 2026年11月8日
- ライセンス
- MIT
ForgingStack Ration MCPとは
ForgingStack RationはMCPサーバーです。 トークンバケット方式を用いて、複数のAIエージェント向けの共有クォータプール管理およびレート制限の適用を行います。.
プロジェクトのREADMEから生成された概要
ForgingStack Ration MCP server について
ForgingStack Rationは、複数のAIエージェントに対して共有クォータプールを管理し、レート制限を適用するための集約的な手段を提供します。トークンバケット方式を採用しており、容量、補充レート、バースト制限、およびエージェントごとの上限を制御することで、リソースの超過を防ぎます。このMCP serverは、プライベートサービスに接続するパブリッククライアントとして機能し、動作にはAPIキーとクレジットが必要です。ユーザーは、プール作成およびdraw操作を有効にするために、サインアップ後にメールアドレスの認証を行う必要があります。
開発者は、create_pool、draw、get_pool、list_pools、topup_pool、delete_pool、get_credits、get_receiptなどのツールセットを通じてサービスを利用できます。システムは、ハッシュチェーンされたレシートを発行することで、許可されたものか拒否されたものかを問わず、すべてのdrawの試行を追跡します。サーバーは、FORGINGSTACK_API_KEY環境変数を設定した後、stdioを介してローカルで実行されます。コストはプールの作成とdrawコールに基づいて計算され、Stripeを通じて10ドルで1,000クレジットを利用できます。
できること
- 1エージェントごとの使用制限個々のエージェントが60分間のローリングウィンドウ内で特定の回数のdrawを超えないように制限します。
- 2急激なリソーススパイクの防止エージェントのアクティビティが、特定のプールに対して定義されたバースト制限を超えないようにします。
- 3エージェントの消費履歴の監査プールからユニットをdrawしようとしたすべての試行に対して、ハッシュチェーンされたレシートを取得し、アクティビティを検証します。
- 4共有トークンリソースの管理特定の容量と補充レートを持つプールを作成し、複数のエージェント間でユニットを分配します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
ForgingStack Ration MCPのインストール方法
フォーマット検証日 2026年11月10日Claude CodeにForgingStack Ration MCPをインストール
$ claude mcp add --env FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY> forgingstack-ration -- uvx forgingstack-rationCursorにForgingStack Ration MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}VS CodeにForgingStack Ration MCPをインストール
.vscode/mcp.json
{
"servers": {
"forgingstack-ration": {
"type": "stdio",
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}Claude DesktopにForgingStack Ration MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}CodexにForgingStack Ration MCPをインストール
~/.codex/config.toml
[mcp_servers.forgingstack-ration] command = "uvx" args = ["forgingstack-ration"] [mcp_servers.forgingstack-ration.env] FORGINGSTACK_API_KEY = "<YOUR_FORGINGSTACK_API_KEY>"
Gemini CLIにForgingStack Ration MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"forgingstack-ration": {
"command": "uvx",
"args": [
"forgingstack-ration"
],
"env": {
"FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
}
}
}
}設定
FORGINGSTACK_API_KEY必須シークレットAPI key for Ration. Sign up via POST /v1/signup (key shown once).
FORGINGSTACK_API_BASERation API base URL. Live default.
| 名前 | 説明 | 種類 |
|---|---|---|
| FORGINGSTACK_API_KEY | API key for Ration. Sign up via POST /v1/signup (key shown once). | 必須シークレット |
| FORGINGSTACK_API_BASE | Ration API base URL. Live default. |
自動チェック
実行日 2026年11月14日詳細レポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能jdkabattles/forgingstack-ration is public and reachablegithub.com/jdkabattles/forgingstack-ration ↗合格
- パッケージがこのリポジトリをソースとして示している未チェック
- ビルドの来歴(Sigstore 証明)No build attestation published for this release未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-08github.com/jdkabattles/forgingstack-ration ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from forgingstack-ration合格
- パッケージと依存関係に重大なアドバイザリがない1 resolved dependencies checked; no critical advisoryosv.dev ↗合格
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモート endpoint が MCP ハンドシェイクに応答する未チェック
README
GitHubで見るForgingStack 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のよくある質問
ForgingStack Ration MCPをClaude Codeに追加するには
ターミナルでclaude mcp add --env FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY> forgingstack-ration -- uvx forgingstack-rationを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
ForgingStack Ration MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
サービスの利用料金はいくらですか?
プール作成につき1クレジット、drawコールにつき1クレジットが必要です(drawが拒否された場合も同様です)。トップアップ、プールの読み取り、一覧表示、削除は無料です。
APIキーはどのように取得できますか?
signupエンドポイントへメールアドレスを含むPOSTリクエストを送信することで登録できます。APIキーは一度しか発行されないため、すぐに保存してください。
drawが拒否された場合はどうなりますか?
バースト制限を超えた場合、プール内のユニットが不足している場合、またはエージェントが60分間のローリングウィンドウ内でのエージェントごとの上限を超えた場合に、drawが拒否されることがあります。