# ForgingStack Mandate Check MCP server

> Verifies agent mandates by checking identity, principal alignment, expiry, and allowed actions before an agent performs a task.

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

## Install

### Claude Code

```sh
claude mcp add --env 'FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY>' forgingstack-mandate-check -- uvx forgingstack-mandate-check
```

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

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

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

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

### VS Code CLI

```sh
code --add-mcp '{"name":"forgingstack-mandate-check","type":"stdio","command":"uvx","args":["forgingstack-mandate-check"],"env":{"FORGINGSTACK_API_KEY":"<YOUR_FORGINGSTACK_API_KEY>"}}'
```

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

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

### Codex

```sh
codex mcp add forgingstack-mandate-check --env 'FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY>' -- uvx forgingstack-mandate-check
```

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

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

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

### Gemini CLI

```sh
gemini mcp add -s user -e 'FORGINGSTACK_API_KEY=<YOUR_FORGINGSTACK_API_KEY>' forgingstack-mandate-check uvx -- forgingstack-mandate-check
```

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

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

## Environment variables

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

## Tools (3)

- `check_mandate`: Check an agent action against its mandate. Returns a pass/fail decision and a receipt. Costs 1 credit per call; an idempotency key replay is free.
- `get_credits`: Remaining credit balance for the configured API key.
- `get_receipt`: Fetch a past mandate-check receipt by id.

## FAQ

### What specific criteria does the mandate check?

The service checks if the mandate agent matches the calling agent, if the principal matches, if the expiry is in the future, and if the action is allowed.

### How much does each check cost?

Each check call costs 1 credit, including failed decisions, though idempotent replays are free.

### Can I recover my API key if I lose it?

No, the API key is only shown once during signup and is stored only as a hash.
