Metadata-Version: 2.4
Name: agent-spend-mandate-budget-ledger-verifier-mcp
Version: 0.2.0
Summary: Licensed local MCP server. Verify supplied agent spend mandates and transactions against merchant, category, currency, time and budget limits.
Author: PracticalBizToolsUS
License-Expression: LicenseRef-Proprietary
Project-URL: Documentation, https://github.com/wunan8850-hash/agent-spend-mandate-budget-ledger-verifier-mcp
Project-URL: Source, https://github.com/wunan8850-hash/agent-spend-mandate-budget-ledger-verifier-mcp
Requires-Python: <3.15,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: mcp==2.2.0
Requires-Dist: mcp-marketplace-license==1.1.0
Provides-Extra: dev
Requires-Dist: pytest<10,>=8.4; extra == "dev"
Dynamic: license-file

# Agent Spend Mandate & Budget Ledger Verifier MCP

A local evidence verifier that binds supplied transactions to exact mandate IDs, compares merchant, category and currency, enforces validity windows and amount caps, detects duplicate transaction identities and computes deterministic budget usage.

## What it creates

- `result.json`
- `transaction-binding.csv`
- `budget-usage.csv`
- `issues.jsonl`
- `SPEND_MANDATE_REVIEW.md`
- `evidence-receipt.json`

## Requirements

- Windows 11
- Python 3.11–3.14
- An MCP-compatible client
- `MCP_LICENSE_KEY` from the MCP Marketplace purchase
- Internet access for initial and periodic license verification

License verification sends only the license key and public product slug. Buyer evidence paths, contents and generated reports remain local.

## Install from a purchased source checkout

```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install .
```

## MCP client configuration

```json
{
  "mcpServers": {
    "spend-mandate": {
      "command": "spend-mandate-mcp",
      "env": {"MCP_LICENSE_KEY": "PASTE_THE_KEY_FROM_YOUR_PURCHASE"}
    }
  }
}
```

Run the client from the folder containing buyer-authorized evidence. All supplied paths must be relative to that folder.

## Tool

`build_spend_mandate_packet`

- `mandates`: Spend-mandate JSONL
- `transactions`: Transaction JSONL
- `policy`: Spend-ledger policy JSON
- `output_directory`: new output directory

The tool returns structured JSON. `ERROR` means the request could not be processed.

## CLI

The diagnostic command is unlicensed:

```powershell
spend-mandate --json doctor
```

Protected commands verify the marketplace license before reading buyer files:

```powershell
spend-mandate --json analyze --mandates examples/sample-input/mandates.jsonl --transactions examples/sample-input/transactions.jsonl --policy examples/sample-input/policy.json --out packet
spend-mandate --json show packet/result.json
spend-mandate --json verify packet/evidence-receipt.json
```

## Product boundary

It does not verify signatures or identity, issue mandates, grant approvals, access cards or wallets, execute payments, refund transactions, handle disputes, enforce policy or attest legal compliance. All accepted evidence stays local. Apart from license verification, the package performs no network activity and has no telemetry.
