mcpField
A
agent-spend-policy-mcp

agent-spend-policy-mcp

Local
github.com/DingDawgFinance0Updated 12w ago

About agent-spend-policy-mcp

agent-spend-policy-mcp is a local MCP server that deterministically checks proposed agent spending actions against a supplied policy. It returns a decision and stable reason code without handling payments or making network requests.

Key features

  1. 01Evaluate actions against a supplied policy
  2. 02Return ELIGIBLE, DENY, or STEP_UP
  3. 03Provide stable reason codes
  4. 04Accept integer micro-unit money strings
  5. 05Perform no side effects or network requests

Use cases

  1. 01Dry-run proposed agent spending actions
  2. 02Check whether an action matches local policy
  3. 03Produce local evidence for a spending decision

MCP support

Exposes the `evaluate_spend_policy` tool over local stdio MCP. It returns policy evaluation outcomes only; payment authorization and execution are not supported.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"dingdawg-agent-spend-policy": {
"command": "npx",
"args": [
"-y",
"@dingdawg/agent-spend-policy-mcp"
]
}
}
}
Run commandnpx -y @dingdawg/agent-spend-policy-mcp

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
npm@dingdawg/agent-spend-policy-mcp0.1.1

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
actionobjectYes
action.railanyYes
action.assetanyYes
action.agentIdanyYes
action.purposestringNo
action.expiresAtstringYes
action.recipientanyYes
action.authorityIdanyYes
action.payloadHashanyYes
action.principalIdanyYes
action.amountMicrosanyYes
action.idempotencyKeyanyYes
policyobjectYes
policy.allowedRailsarrayYes
policy.expectedAssetanyYes
policy.maxDailyMicrosanyYes
policy.requirePurposebooleanNo
policy.stepUpAtMicrosanyNo
policy.expectedAgentIdanyYes
policy.allowedRecipientsarrayYes
policy.maxPerActionMicrosstringYes
policy.expectedAuthorityIdanyYes
policy.expectedPayloadHashanyYes
policy.expectedPrincipalIdstringYes
policy.expectedIdempotencyKeyanyYes
evaluationTimestringYes
alreadySpentMicrosanyYes

Details

From the project README

DingDawg Agent Spend Policy MCP

A small, local MCP server that deterministically evaluates whether a proposed agent spend action matches a supplied policy.

It returns one of ELIGIBLE, DENY, or STEP_UP, with a stable reason code. ELIGIBLE is local policy evidence only. It is not payment authorization.

Safety boundary

This package does not hold funds, private keys, payment credentials, customer data, or settlement authority. It does not sign, send, settle, custody, or record payments. It makes no network requests.

A production payment adapter needs separate, independently verified controls for authenticated policy/action provenance, canonical payload hashing, durable atomic budget reservation and replay protection, customer-controlled signing, rail validation, and settlement reconciliation.

Install

npx -y @dingdawg/agent-spend-policy-mcp

Configure it as a local stdio MCP server:

{
  "mcpServers": {
    "dingdawg-agent-spend-policy": {
      "command": "npx",
      "args": ["-y", "@dingdawg/agent-spend-policy-mcp"]
    }
  }
}

Tool

evaluate_spend_policy accepts an evaluation time, a policy, a proposed action, and the already-spent amount. All money is passed as integer micro-unit strings, never JavaScript floating-point numbers.

The caller supplies the clock and already-spent value; therefore this tool is safe for dry runs and local evidence, not a replacement for a trusted payment or accounting system.

Agent contract

The versioned machine-readable contract is capabilities.json. It describes the only tool this package exposes, its required inputs, its three possible outcomes, and its non-negotiable safety boundary.

  • Transport: local stdio MCP
  • Tool: evaluate_spend_policy
  • Required inputs: evaluationTime, policy, action, and alreadySpentMicros
  • Outputs: ELIGIBLE, DENY, or STEP_UP, each with a stable reason code
  • Side effects: none
  • Credentials, payment execution, custody, signing, settlement, and network access: not supported

The manifest is package-source evidence for this release, not a promise of a hosted agent-discovery endpoint. ELIGIBLE remains local policy evidence only, not payment authorization.

Development

npm install
npm test
npm run pack:check

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.