# ForgingStack Ration MCP server

> Manages shared quota pools and enforces rate limits for multiple AI agents using a token bucket system.

- Repository: https://github.com/jdkabattles/forgingstack-ration
- Page: https://hostedmcp.org/servers/jdkabattles/forgingstack-ration
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.1.0

## Install

### Claude Code

```sh
claude mcp add --env FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY> forgingstack-ration -- uvx forgingstack-ration
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "forgingstack-ration": {
      "command": "uvx",
      "args": [
        "forgingstack-ration"
      ],
      "env": {
        "FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "forgingstack-ration": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "forgingstack-ration"
      ],
      "env": {
        "FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "forgingstack-ration": {
      "command": "uvx",
      "args": [
        "forgingstack-ration"
      ],
      "env": {
        "FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.forgingstack-ration]
command = "uvx"
args = ["forgingstack-ration"]

[mcp_servers.forgingstack-ration.env]
FORGINGSTACK_API_KEY = "<YOUR_FORGINGSTACK_API_KEY>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "forgingstack-ration": {
      "command": "uvx",
      "args": [
        "forgingstack-ration"
      ],
      "env": {
        "FORGINGSTACK_API_KEY": "<YOUR_FORGINGSTACK_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `FORGINGSTACK_API_KEY` | yes | yes | API key for Ration. Sign up via POST /v1/signup (key shown once). |
| `FORGINGSTACK_API_BASE` | no | no | Ration API base URL. Live default. |

## FAQ

### 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.
