Back to MCP Servers

Decide

Deterministic refund eligibility notary MCP server. Returns ALLOWED / DENIED / UNKNOWN for subscription refunds (Adobe, Spotify, etc.) via a stateless rules engine.

finance-fintech
By decidefyi
13Updated 1 day agoJavaScript

Installation

npx -y decide

Configuration

{
  "mcpServers": {
    "decide": {
      "command": "npx",
      "args": ["-y", "decide"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

decide.fyi Decision API

Deterministic Decision API engine powering workflow applications, stable MCP notary remotes, decision memo packets, and execution gates

Version MCP Vendors

Positioning: Decide is the API engine and compatibility surface. Krafthaus workflow apps, Policy MCP Notaries, decision memo packets, and execution gates are application surfaces that reuse the same verdict, request ID, and evidence contract.

Production Determinism Boundary

Binding production verdicts should use a versioned declarative rulebook:

Runtime architecture: see docs/RULEBOOK_RUNTIME_ARCHITECTURE.md. Machine-readable schema: https://api.decide.fyi/schemas/rulebook-v1.schema.json. Active runtime manifest: https://api.decide.fyi/manifests/rulebook-runtime-v1.json. Downstream application binding: decide_application_binding_v1.

The production core is hybrid_declarative_rulebook_with_trusted_adapters: direct declarative rulebooks are supported, registered first-party trusted adapters may supply bounded facts, and customer executable rulebooks are rejected. In both supported binding modes, Rulebook v1 remains the only binding verdict selector.

{
  "mode": "rulebook",
  "rulebook": {
    "schema_version": "rulebook_v1",
    "rulebook_id": "pricing_exception",
    "version": "2026-06-11",
    "input_schema": {
      "required": ["discount_percent"],
      "properties": {
        "discount_percent": { "type": "number" }
      }
    },
    "rules": [
      {
        "rule_id": "approve_standard_discount",
        "priority": 50,
        "condition": {
          "field": "discount_percent",
          "operator": "lte",
          "value": 15
        },
        "outcome": {
          "decision": "yes",
          "verdict": "APPROVE",
          "action": "approve_discount",
          "reason_code": "WITHIN_STANDARD_LIMIT"
        }
      }
    ],
    "default_outcome": {
      "decision": "review",
      "verdict": "REVIEW",
      "action": "route_to_owner",
      "reason_code": "NO_RULE_MATCHED"
    }
  },
  "context": {
    "inputs": {
      "discount_percent": 10
    }
  }
}

mode: "rulebook" does not call an LLM. It validates the request rulebook against the published JSON Schema, hashes the rulebook, evaluates bounded conditions, and returns yes, no, or review alongside the application verdict, action, reason code, matched rule, and evaluator_version. Responses also include rulebook_contract with the enforced schema URL/hash, runtime_binding with the direct or trusted-adapter binding mode, input_hash, a SHA-256 hash of the canonical inputs or adapter facts consumed by the declarative evaluator, plus a rulebook_attestation_v1 bundle hash over the deterministic execution tuple. Production deployments can sign that bundle hash with a rulebook_attestation_signature_v1 Ed25519 envelope; verification keys are published at /.well-known/rulebook-attestation-keys.json. Set DECIDE_RULEBOOK_ATTESTATION_SIGNATURE_REQUIRED=true in production to fail closed instead of returning unsigned Rulebook decisions. Publish retired public verification keys with DECIDE_RULEBOOK_ATTESTATION_KEY_HISTORY_JSON so older Decision Records remain verifiable after rotation.

Rulebook requests cannot preload Decide-generated Decision Record material. Fields such as runtime_binding, trusted_adapter, adapter_facts, rulebook_attestation, application_verdict, and action are response-only at the request body, context.inputs, and adapter-facts boundaries; attempts return RULEBOOK_OUTPUT_MATERIAL_FORBIDDEN.

Legacy single, multi, and runtime requests remain available for AI-assisted exploration, but they are not binding production verdicts. Those responses include decision_contract with authority: "advisory_only" and production_verdict: false, plus production_binding_required: true and the supported production binding modes; callers that need deterministic execution must use mode: "rulebook" and capture rulebook_contract, runtime_binding, and the Rulebook attestation material.

At the public Decision Record boundary, successful evaluations are registered as immutable tenant-scoped snapshots. Historical replay restores the original canonical input and stored rulebook snapshot rather than trusting a caller override or the current application deployment.

Rulebook v1 also supports registered first-party trusted adapters for bounded fact normalization. Adapter requests pin an exact semantic version and manifest hash; responses attest the bundled implementation source hash plus canonical input/output hashes and the enforced execution contract. Each invocation runs once in an empty-environment worker with hard time/resource limits and denied common ambient capabilities. The declarative rulebook remains the only binding verdict selector. See docs/TRUSTED_ADAPTERS_V1.md.

The current reference applications prove both production patterns: Solana Execution Gate, Decision Memo Readiness Gate, and Krafthaus Workflow Readiness Binding use trusted adapters before Rulebook v1, while the Refund, Trial, Cancel, and Return Policy MCP notaries supply normalized facts directly to Rulebook v1 and expose the signed rulebook result through their stable REST and MCP surfaces.

Before evaluator, adapter, or rulebook changes ship, run the local historical replay gate:

npm run rulebook:migration-dry-run -- --json

Use --candidate-rulebook, --candidate-adapter, and --candidate-evaluator-version to compare proposed migrations against the golden replay corpus before production routing changes.

For release gates, prefer a rulebook_migration_v1 manifest so candidate artifacts, expected drift, and approval status are reviewed together:

npm run rulebook:migration-dry-run -- --migration path/to/migration.json --json

The manifest schema is published at https://api.decide.fyi/schemas/rulebook-migration-v1.schema.json, and the dry run validates manifests against that closed schema before replay.

After production routing or runtime-contract changes ship, run the production runtime smoke:

npm run smoke:rulebook-runtime

This hits https://api.decide.fyi from outside the runtime and always verifies the published hybrid_declarative_rulebook_with_trusted_adapters manifest, closed Rulebook v1 schema, attestation key endpoint, and protected Decision API edge. Supply DECIDE_RULEBOOK_RUNTIME_SMOKE_API_KEY to also exercise live declarative evaluation, rejection behavior, and advisory-only legacy metadata. GitHub Actions runs the public boundary checks as the scheduled/manual Rulebook Runtime Production Smoke workflow and runs the authenticated checks when its optional smoke credential is configured.

The legacy single, multi, and runtime modes are AI-assisted surfaces. They are not the production determinism boundary for loosely defined business judgment.

Architecture:

JavaScript SDK and CLI

The public @decide-fyi/sdk client covers Decision API calls, Decision Record and Decision Packet verification, Rulebook conformance, replay, execution receipts, and outcome reporting.

npm install @decide-fyi/sdk

The canonical package source is sdk/, licensed under Apache-2.0. Package release requirements and source mapping are documented in sdk/SOURCE_PROVENANCE.md.

One-Click Install

Add to Cursor Install in VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

Buttons install the canonical four-tool Decide Policy Notaries server. Existing specialist endpoints remain supported for compatibility.

Stable MCP Remotes

ServerDomainToolVerdicts
Policy Notariespolicy.decide.fyiAll 4 tools belowPolicy-specific verdicts
Refund Notaryrefund.decide.fyirefund_eligibilityALLOWED / DENIED / UNKNOWN
Cancel Notarycancel.decide.fyicancellation_penaltyFREE_CANCEL / PENALTY / LOCKED / UNKNOWN
Return Notaryreturn.decide.fyireturn_eligibilityRETURNABLE / EXPIRED / NON_RETURNABLE / UNKNOWN
Trial Notarytrial.decide.fyitrial_termsTRIAL_AVAILABLE / NO_TRIAL / UNKNOWN

All servers: 100 vendor identifiers, US region, individual plans, stateless, no auth, 100 req/min. Results fail closed to UNKNOWN when the available facts cannot support an automated verdict.

Quick Start

Connect via MCP (Claude Desktop / Windsurf / other clients)

{
  "mcpServers": {
    "decide-policy-notaries": { "url": "https://policy.decide.fyi/api/mcp" }
  }
}

Specialist compatibility configuration

Existing installations can keep using the specialist remotes. They expose the same tool names and response contracts as the canonical suite:

{
  "mcpServers": {
    "refund-decide": { "url": "https://refund.decide.fyi/api/mcp" },
    "cancel-decide": { "url": "https://cancel.decide.fyi/api/mcp" },
    "return-decide": { "url": "https://return.decide.fyi/api/mcp" },
    "trial-decide": { "url": "https://trial.decide.fyi/api/mcp" }
  }
}

REST API

# Refund eligibility
curl -X POST https://refund.decide.fyi/api/v1/refund/eligibility \
  -H "Content-Type: application/json" \
  -d '{"vendor":"adobe","days_since_purchase":12,"region":"US","plan":"individual","qualifying_conditions_met":true}'

# Cancellation penalty
curl -X POST https://cancel.decide.fyi/api/v1/cancel/penalty \
  -H "Content-Type: application/json" \
  -d '{"vendor":"adobe","region":"US","plan":"individual","billing_cadence":"annual"}'

# Return eligibility
curl -X POST https://return.decide.fyi/api/v1/return/eligibility \
  -H "Content-Type: application/json" \
  -d '{"vendor":"adobe","days_since_purchase":12,"region":"US","plan":"individual","qualifying_conditions_met":true}'

# Trial terms
curl -X POST https://trial.decide.fyi/api/v1/trial/terms \
  -H "Content-Type: application/json" \
  -d '{"vendor":"ad

…
View source on GitHub