mcpField
F
figuard-mcp

figuard-mcp

Local
figuard.ioFinance2Updated 19w ago

About figuard-mcp

figuard-mcp connects FiGuard spending controls to AI assistants, for teams that want to authorize agent expenses without writing SDK code. Its tools cover budget setup, pre-flight authorization, settlement, and delegation-token management.

Key features

  1. 01Create and manage spending budgets
  2. 02Authorize spend with a reasoned decision
  3. 03Confirm, fail, or void reservations
  4. 04Inspect budgets and filtered ledgers
  5. 05Manage scoped delegation tokens

Use cases

  1. 01Create a budget for an agent's trip expenses
  2. 02Check a proposed purchase before payment
  3. 03Reconcile actual charges or release failed reservations
  4. 04Set per-agent spending caps with delegation tokens

MCP support

figuard-mcp exposes 14 FiGuard tools to MCP clients, including budget, authorization, ledger, and delegation operations. It connects to a running FiGuard server using configured API key and base URL.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"figuard-figuard": {
"command": "npx",
"args": [
"-y",
"figuard-mcp"
],
"env": {
"FIGUARD_API_KEY": "<FIGUARD_API_KEY>",
"FIGUARD_BASE_URL": "<FIGUARD_BASE_URL>",
"FIGUARD_DATABASE": "<FIGUARD_DATABASE>",
"FIGUARD_MODE": "<FIGUARD_MODE>"
}
}
}
}
Run commandnpx -y figuard-mcp
Environment variables to set
FIGUARD_API_KEYSecretFiGuard API key — set this (with FIGUARD_BASE_URL) to use a self-hosted FiGuard server. Leave unset to run embedded: in-process enforcement against a local SQLite file, no account or server needed.
FIGUARD_BASE_URLSelf-hosted FiGuard server URL. Leave unset to run embedded against a local SQLite file.
FIGUARD_DATABASEPath to the embedded SQLite file (default ~/.figuard/figuard.db). Embedded is the default backend — no server required.
FIGUARD_MODEBackend mode: embedded | server | sandbox. Defaults to embedded when nothing else is configured.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmfiguard-mcp1.2.0

Tools

16

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
unitstringNoResource unit label (e.g. 'tokens', 'api_calls'). Required for resource budgets. Omit for monetary budgets.
user_idstringYesIdentifier for the user or agent session this budget belongs to.
currencystringNoISO 4217 currency code (e.g. 'USD', 'EUR'). Required for monetary budgets. Omit for resource budgets.
expires_instringNoHow long the budget is valid. Accepts '24h', '7d', '30m', or a number of seconds. Defaults to '24h'.
allocationsarrayNoOptional category-level caps. Each allocation is an independent maximum — flights capped at $300 means flights can never exceed $300, regardless of what other categories spend. Allocation limits must not exceed total_limit but do not need to sum to it — the remainder is a shared pool. Example: total_limit=1000, allocations=[{flights: 500}, {hotels: 200}] — valid, $300 remains as unallocated headroom.
total_limitnumberYesMaximum total amount the agent is allowed to spend. For USD budgets this is dollars, not cents.
intent_contextstringNoOptional human-readable description of what this budget is for (e.g. 'Book travel to NYC for user_123').
external_referencestringNoOptional stable identifier for this budget (e.g. 'run-abc-123', 'order-456'). When provided, re-calling figuard_create_budget with the same external_reference returns the existing live budget instead of creating a duplicate — safe for orchestrator restarts.
velocity_max_per_daynumberNoMax authorize attempts per rolling 24-hour window.
auto_pause_on_anomalybooleanNoControls anomaly response mode. When true (default), an anomalous request pauses the budget — no further spend until a human resumes it. When false (advisory mode), the anomalous request is still denied and ANOMALY_DETECTED webhook fires, but the budget stays ACTIVE. Use false for high-throughput agents where a single spike should not halt the entire fleet.
velocity_max_per_minutenumberNoMax authorize attempts per rolling 1-minute window. Denied with VELOCITY_LIMIT_EXCEEDED when exceeded.
anomaly_detection_enabledbooleanNoWhen true, FiGuard monitors spend requests for statistical anomalies. Recommended for production.
velocity_max_amount_per_hournumberNoMax total requestedQuantity per rolling 1-hour window.

Details

From the project README

figuard-mcp

FiGuard MCP server — use FiGuard directly from Claude Code, Cursor, or Claude Desktop without writing any SDK code.

What this does

Adds 14 FiGuard tools to your AI assistant. Instead of writing SDK code, you just talk to Claude:

"Create a $500 travel budget with $300 for flights and $200 for hotels" → Claude calls figuard_create_budget

"Authorize a $149 economy flight from this budget" → Claude calls figuard_authorize → returns AUTHORIZED or DENIED

"The flight ended up costing $147 — confirm the actual amount" → Claude calls figuard_confirm

Requirements

  • Node.js 18+
  • A running FiGuard server (local or sandbox)

Setup

Claude Code
claude mcp add figuard-mcp \
  --env FIGUARD_API_KEY=fg_live_... \
  --env FIGUARD_BASE_URL=http://localhost:8080

Or add to ~/.claude/claude_desktop_config.json manually:

{
  "mcpServers": {
    "figuard": {
      "command": "npx",
      "args": ["figuard-mcp"],
      "env": {
        "FIGUARD_API_KEY": "fg_live_...",
        "FIGUARD_BASE_URL": "http://localhost:8080"
      }
    }
  }
}
Cursor

Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "figuard": {
      "command": "npx",
      "args": ["figuard-mcp"],
      "env": {
        "FIGUARD_API_KEY": "fg_live_...",
        "FIGUARD_BASE_URL": "http://localhost:8080"
      }
    }
  }
}
Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "figuard": {
      "command": "npx",
      "args": ["figuard-mcp"],
      "env": {
        "FIGUARD_API_KEY": "fg_live_...",
        "FIGUARD_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Using the sandbox (no Docker required)

Point FIGUARD_BASE_URL at the hosted sandbox to try FiGuard without running a local server:

{
  "FIGUARD_API_KEY": "sb_live_demo",
  "FIGUARD_BASE_URL": "https://figuard-sandbox-g1ha.onrender.com"
}

Available tools

ToolWhat it does
figuard_create_budgetCreate a spending envelope; returns session_token
figuard_authorizePre-flight check — AUTHORIZED or DENIED with reason
figuard_confirmClose a reservation with the actual amount after success
figuard_failRelease a reservation when the action fails
figuard_voidCancel an unused reservation
figuard_get_budgetCheck budget status, spent, reserved, available
figuard_get_ledgerList all spend events with filtering
figuard_resume_budgetUnfreeze a budget paused by anomaly detection
figuard_extend_budgetExtend a budget's expiry time
figuard_cancel_batchCancel up to 100 budgets in one call
figuard_fund_budgetAdjust a budget's total limit (CREDIT / DEBIT / RESET / RESET_SPENT)
figuard_create_delegation_tokenCreate a scoped per-agent token against a fleet budget
figuard_revoke_delegation_tokenRevoke a delegation token (idempotent)
figuard_get_delegation_tokenCheck delegation token state and cap usage

Security note

FIGUARD_API_KEY is configured as an environment variable, not a tool argument. Tool arguments appear in LLM context windows — API keys must never be passed as tool parameters.

Session tokens returned by figuard_create_budget are short-lived (they expire with the budget) and are safe to use as tool arguments within a session.

Running FiGuard locally

git clone https://github.com/figuard/figuard-core
cd figuard-core
docker compose up -d

FiGuard will be available at http://localhost:8080.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.