Skip to main content
Glama

@fidacy/mcp

fidacy-mcp MCP server

Fidacy blocks a BEC lookalike-payee payment, then allows the legit one with a signed Ed25519 grant

The action firewall for AI agents. A drop-in MCP server that gates payment actions against a cryptographically signed mandate before money can move. Non-custodial: Fidacy authorizes and proves, it never holds funds.

Install once, works in any MCP-compatible agent: Claude Code, Claude Desktop, Hermes, OpenClaw, and anything else that speaks MCP.

npm license Works with: Claude Code · Claude Desktop · OpenClaw · Hermes · Brex CrabTrap

Your agent could be paying scammers right now. Prompt-injected into the wrong payee, an inflated amount, or the same invoice twice — and your logs aren't evidence. Fidacy blocks it before money moves, and hands back a signed verdict anyone can verify against public keys. You don't trust us — you check the signature.

Quick start (free, local-first, no account)

{
  "mcpServers": {
    "fidacy": { "command": "npx", "args": ["-y", "@fidacy/mcp"] }
  }
}

Runs on your machine, offline, deny-by-default. Add trusted payees + caps in ~/.fidacy/config.json. Verify any verdict yourself against the public keys at /.well-known/jwks.json.

Related MCP server: emilia-mcp-server

Why

An agent can hallucinate or be prompt-injected into a payment: wrong payee, wrong amount, fabricated invoice. Prompt-level guardrails are probabilistic and bypassable. @fidacy/mcp is a deterministic gate between the agent's intent and the executor: the action is dead on arrival unless it validates against a signed mandate, and every decision lands in an immutable hash-chained audit trail.

Enforcement model

  1. Register @fidacy/mcp as the agent's only payment-capable tool. Do not give the agent a raw payment tool. Tool inventory is the runtime firewall.

  2. The agent calls request_payment. Fidacy checks it against the mandate (payee allowlist, per-tx cap, total cap, currency, time window, revocation).

  3. ALLOW returns a short-lived Ed25519 grant. DENY returns no grant and the violated rule. The downstream executor MUST require the grant, so a denied action cannot proceed.

  4. Every decision is appended to a hash-chained log. get_audit_proof returns the portable, verifiable proof.

One install, two backends

@fidacy/mcp ships two complementary capabilities in a single install:

  • Verdict layer (advisory): assess_action calls the live Fidacy engine and returns a signed trust verdict. It moves no money; it returns a judgment whose proof (riskPayloadJws + signingKeyId) is verifiable by anyone via @fidacy/verify against the engine JWKS at /.well-known/jwks.json.

  • Payment firewall (enforcement): request_payment / verify_mandate / get_audit_proof gate and prove a payment against a signed mandate through the core, returning short-lived Ed25519 grants.

Mental model: assess_action -> engine (signed verdict); request_payment and friends -> core (payment firewall).

Tools

Tool

Backend

Purpose

assess_action

engine

Signed Fidacy trust verdict for a proposed action. Advisory.

request_payment

core

Authorize a payment action. ALLOW + grant, or DENY + rule.

verify_mandate

core

Read the mandate envelope + Fidacy public key.

get_audit_proof

core

Hash-chained proof for a decision id.

assess_action

Returns a signed Fidacy trust verdict from the live engine for a proposed action. The signed proof is riskPayloadJws + signingKeyId, verifiable by anyone via @fidacy/verify against {engineUrl}/.well-known/jwks.json.

Inputs:

  • kind (optional, default ap2_payment): one of ap2_payment, message_send, voice_call, custom, claim_document.

  • mandate (required): the action/mandate object for that kind.

  • mandateType, spendingMandate, idempotencyKey, a2a.task_id (optional).

Environment:

Var

Default

Purpose

FIDACY_ENGINE_URL

https://api.fidacy.com

Base URL of the Fidacy engine.

FIDACY_ENGINE_API_KEY

(none)

An fky_live_ / fky_test_ key with scope assess:write.

The server boots without FIDACY_ENGINE_API_KEY; the tool is always registered. Only calling assess_action without the key returns a helpful error telling you to set it. The key is never logged, echoed, or attached to any error.

Install

npm install -g @fidacy/mcp   # or run via npx, no install

Claude Code

claude mcp add fidacy -- npx -y @fidacy/mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "fidacy": { "command": "npx", "args": ["-y", "@fidacy/mcp"] }
  }
}

Hermes (config.yaml)

mcp_servers:
  fidacy:
    command: npx
    args: ["-y", "@fidacy/mcp"]

OpenClaw

Add the same server via the Tools panel, or the mcpServers block in your agent config. Any MCP-compatible host uses the same command.

Wiring the real core (production)

The MCP layer talks to your core through one interface (FidacyCore). Your repository stays private. Set FIDACY_MODE=http and implement three endpoints:

  • POST /v1/mandate/get -> Mandate

  • POST /v1/decide -> Decision (runs your Ed25519/AP2 verification + audit append)

  • POST /v1/audit/proof -> AuditProof

No change to the MCP layer is needed.

Dev

npm install
npm run build
npm start      # stdio server, in-memory demo mandate

Available Tools

12 tools
anchor_artifactAnchor Artifact (Bitcoin-anchored integrity proof)A

Prove an artifact existed exactly as-is at this moment, and make any later tampering detectable. Give a file path (hashed locally with SHA-256 — the file itself is NEVER uploaded) or a precomputed sha256. The hash is registered on Fidacy's tamper-evident audit chain, which is checkpointed to the Bitcoin blockchain, and you get a signed receipt (JWS) verifiable offline against the engine JWKS. Use it for contracts, invoices, medical prescriptions, insurance claims, images, audio, video. kind defaults to document; optional label is a short reference (an invoice number, a case id — no PII).

Inputs: kind, path, label, sha256, +1 more.

assess_actionAssess Action (Signed Trust Verdict)A
Read-onlyIdempotent

Return a SIGNED Fidacy trust verdict from the live engine (default https://api.fidacy.com) for a proposed action. The signed proof is riskPayloadJws + signingKeyId, verifiable by anyone via @fidacy/verify against the engine JWKS at /.well-known/jwks.json. kind is one of ap2_payment, message_send, voice_call, custom, claim_document; mandate is the action/mandate object for that kind. This is the verdict (advisory) layer and moves no money; it complements the payment-firewall tools (request_payment et al.) in the same install.

Inputs: mandate (required), a2a, kind, mandateType, +2 more.

check_artifactCheck Artifact (was this hash anchored?)A
Read-onlyIdempotent

Check whether an artifact was anchored by this account and the state of its Bitcoin checkpoint. Give a file path (hashed locally, never uploaded) or a sha256. If the current hash of a file does NOT match any anchored record that you expected to match, the file changed since anchoring — that is exactly the tampering signal.

Inputs: path, sha256.

explain_decisionExplain a Decision (why was this allowed or blocked)A
Read-onlyIdempotent

Explain one decision in plain language: what was requested, what the mandate did about it, why, and the tamper-evident proof for it. Use when an operator asks why a specific payment was blocked.

Inputs: decisionId (required).

get_audit_proofGet Audit ProofA
Read-onlyIdempotent

Return the tamper-evident, hash-chained proof for a decision id, including whether the chain is intact and the public key it verifies against.

Inputs: decisionId (required).

list_decisionsList Recent Payment DecisionsA
Read-onlyIdempotent

List recent agent payment decisions, newest first, with payee, amount, the agent's stated reason, and for blocked ones the rule that stopped it. Filter by status to answer 'what got blocked' directly. Read-only, works offline.

Inputs: limit, status.

register_emailRegister operator email (opt-in)A
Idempotent

Register the operator's email so their agent's protection history can attach to a real Fidacy account and Fidacy can reach them. ONLY call this when the human operator has explicitly given their email and agreed to be contacted — it is consent-based. Does not create an account or move money.

Inputs: email (required). Returns: message, registered

request_paymentRequest Payment AuthorizationA
Idempotent

Authorize a payment action against the active Fidacy mandate. Returns an ALLOW with a signed grant, or a DENY with the violated rule. The downstream executor MUST require the grant. Call this before any payment; never pay without it.

Inputs: payee (required), amount (required), purpose (required), category (required), +3 more. Returns: grant, status, message, decisionId, +1 more

sentinel_alertsSentinel Alerts (allowed, but outside this agent's pattern)A
Read-onlyIdempotent

Predictive pattern alerts from the local audit chain: first-ever payee, amount spikes vs this agent's own history, velocity bursts, payments riding the mandate ceiling, and retries after a denial (the behavior our Model Watch benchmark measures). Deterministic and explainable, no model. Use to answer 'has anything unusual happened' before it becomes a loss.

Inputs: limit.

spend_summarySpend Summary (what my agents spent and what was blocked)A
Read-onlyIdempotent

Operator report over a time window: how many payment decisions were made, how much was paid and to whom, how much was blocked before executing, and which mandate rules did the blocking. Read-only, works offline against the local audit chain. Use this to answer questions like 'what did my agents spend this week' or 'has anything been blocked'.

Inputs: days.

upgradeUpgrade to a Fidacy accountA
Read-onlyIdempotent

Start upgrading this local install to a real Fidacy account (server-backed signed verdicts, anchored proof, higher volume). Returns a link to open; your anonymous usage is preserved and migrated to the new account.

Inputs: no named parameters.

verify_mandateVerify Active MandateA
Read-onlyIdempotent

Return the active mandate envelope (caps, allowed payees/categories, window, revocation) and Fidacy's Ed25519 public key for grant verification.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (e.g., request_payment vs assess_action vs anchor_artifact), but the read-only audit/reporting tools (spend_summary, list_decisions, explain_decision) overlap somewhat. Descriptions help differentiate them, but an agent could still mis-select between spend_summary and list_decisions.

    Naming Consistency4/5

    The dominant pattern is verb_noun (request_payment, verify_mandate, get_audit_proof, etc.). However, 'sentinel_alerts' is a noun phrase and 'upgrade' is a bare verb, breaking the otherwise consistent style.

    Tool Count5/5

    12 tools is well within the optimal 3-15 range. Each tool targets a specific aspect of the payment authorization, audit, artifact proofing, or account lifecycle, and none feel redundant or superfluous.

    Completeness4/5

    The main workflows are covered: payment authorization with mandates, audit trails, decision explanations, alerts, artifact anchoring/checking, and account upgrade/email registration. Slight gaps like no way to list all anchored artifacts or revoke an anchor are minor and likely beyond the server's intended scope.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Stop AI agents leaking your card or making hallucinated purchases. No SaaS, No login, Fully local. A runtime security layer that protects AI agents during online purchases. It sits between the agent and payment forms
      170 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      The accountability layer for AI agents — a named human's signed yes before an agent does anything irreversible (payment, record change, deploy), then an offline-verifiable Trust Receipt. Apache-2.0, formally verified.
      3
      550
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a three-layer payment firewall for AI agents, enabling identity verification, risk screening, and execution authorization with on-chain policy enforcement for secure and auditable transactions.
      130 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to propose wallet payments while a local, human-authored policy decides whether each transaction is approved, requires human confirmation, or is refused, and records every decision in a signed, append-only ledger.
      -