# l402-store-token

Store an L402 token (macaroon:preimage) obtained from a payment page. Use this when a user pastes back a token from a toll-booth payment page. The token is stored as a credential so subsequent l402-fetch calls are authenticated.

Agent View of the PolicyLayer registry record for `l402-store-token`. HTML page: https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-store-token

## Facts

- Tool: `l402-store-token`
- Server: 402 (`402-mcp`) — https://policylayer.com/tools/dev-forgesworn-402-mcp.md
- Install: `npx -y 402-mcp`
- Homepage: https://github.com/forgesworn/402-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "l402-store-token",
    "arguments": {}
  }
}
```

## Why l402-store-token is rated Medium

This tool writes/stores a credential token into local storage. It does not move money itself — the payment has already occurred externally — it merely persists the resulting token for future authenticated requests. This is a reversible write operation (credentials can be deleted/replaced).

From the tool's own definition: "'Store an L402 token (macaroon:preimage) obtained from a payment page' and 'The token is stored as a credential so subsequent l402-fetch calls are authenticated'"

## Use case

AI agents use l402-store-token to create or update resources in 402, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your 402 environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 402:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "l402-store-token": {
      "limits": [
        {
          "counter": "l402-store-token_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on 402 (9)

- `l402-buy-credits` — Financial — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-buy-credits.md
- `l402-pay` — Financial — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-pay.md
- `l402-redeem-cashu` — Financial — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-redeem-cashu.md
- `l402-balance` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-balance.md
- `l402-config` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-config.md
- `l402-credentials` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-credentials.md
- `l402-discover` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-discover.md
- `l402-fetch` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-fetch.md
- `l402-search` — Read — https://policylayer.com/tools/dev-forgesworn-402-mcp/l402-search.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dev-forgesworn-402-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dev-forgesworn-402-mcp
