# io.github.smartpolicy-protocol/smartpolicy (npm · @smartpolicy/mcp)

Runtime authorization for AI agents and smart contracts via an immutable on-chain policy registry

- Trust score: 60/100 (medium)
- Change this week: +15
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@smartpolicy/mcp`: 60/100 (this document), [markdown](https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp.md), [page](https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp)

## Channel facts

- Registry: `npm`
- Package: `@smartpolicy/mcp`
- Version: `0.2.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (110 of 114), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (110 of 114), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (Apache-2.0).
  - Actively maintained (last published 22 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 54/100
  - AI-judged instruction clarity (fair).
  - Context-footprint check failed: tool/resource definitions use about 1000 tokens (~125/item across 8 items; 8 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **Tool Coverage**: 93/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 79% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### Claude

```bash
claude mcp add smartpolicy-protocol-smartpolicy -- npx -y @smartpolicy/mcp
```

### Codex

```bash
codex mcp add smartpolicy-protocol-smartpolicy -- npx -y @smartpolicy/mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "smartpolicy-protocol-smartpolicy": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@smartpolicy/mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add smartpolicy-protocol-smartpolicy --command npx --arg -y --arg @smartpolicy/mcp
```

### Hermes

```yaml
mcp_servers:
  smartpolicy-protocol-smartpolicy:
    command: "npx"
    args: ["-y", "@smartpolicy/mcp"]
```

### Other

```json
{
  "mcpServers": {
    "smartpolicy-protocol-smartpolicy": {
      "command": "npx",
      "args": [
        "-y",
        "@smartpolicy/mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 60, +40)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional regression] Security disclosure: unverified → fail
- [functional improvement] License: unverified → pass
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Schema quality: unverified → fair
- [functional] Licence: Apache-2.0

### 2026-08-02 (score 20, −5)

- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet.
- [functional regression] Security disclosure: fail → unverified
- [functional regression] Capabilities: pass → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional] First check of Schema quality: unverified

### 2026-08-01 (score 25, +5)

- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] MCP protocol: unverified → pass

### 2026-07-31 (score 20, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 27, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-27 (score 45)

First indexed and scored.

## MCP tools (8)

### `policy_check` (~125 tokens)

THE canonical SmartPolicy question: may `subject` perform `action` under policy `policyId`? Returns allowed (boolean) plus the reasons. Maps 1:1 to PolicyRegistry.isAllowed — a protected contract gives the identical answer on-chain. Free.

Input parameters:

- `action` (string, required): Action name (e.g. "withdraw") or 0x-prefixed bytes32. Names are keccak256-hashed, matching keccak256("withdraw") in the protected contract.
- `policyId` (required): Policy ID as decimal string or integer
- `subject` (string, required)

### `policy_get` (~45 tokens)

Read a policy: owner, expiry, active/locked state, membership mode, member count, metadata URI. Free.

Input parameters:

- `policyId` (required): Policy ID as decimal string or integer

### `grant_issue` (~276 tokens)

Issue a short-lived single-use EIP-712 grant authorizing `subject` to perform `action` under `policyId`, redeemable ONLY at the `target` contract. The subject must pass policy_check first; the policy must list this server's issuer address (grant_issuer_info) via addIssuer. Pass the result to target's PolicyGate.withGrant function. Verify with grant_verify before broadcasting.

Input parameters:

- `action` (string, required): Action name (e.g. "withdraw") or 0x-prefixed bytes32. Names are keccak256-hashed, matching keccak256("withdraw") in the protected contract.
- `context` (string): Optional bytes32 binding the gated call's parameters. Set to keccak256(abi.encode(...)) of the exact parameters the caller must use (e.g. the recipient and amount for a transfer); the on-chain gate r…
- `policyId` (required): Policy ID as decimal string or integer
- `subject` (string, required)
- `target` (required): the contract that will consume the grant (the integrator/gate); only it may redeem
- `ttlSeconds` (integer): Requested grant lifetime in seconds; clamped to the server's maxGrantTtlSeconds (see grant_issuer_info)

### `grant_issuer_info` (~30 tokens)

This server's grant-issuer address (authorize it on a policy via addIssuer) and limits.

### `policy_fees` (~49 tokens)

Current protocol fees in wei (read live). createPolicy needs exactly creationFee as msg.value; every other write needs exactly updateFee. Read this before building any write tx — wrong value reverts.

### `grant_verify` (~92 tokens)

Pre-flight a grant before broadcasting: checks the on-chain GrantVerifier for validity (signature, validity window, issuer authorization, policy active) and whether the nonce is already used. Returns {valid, nonceUsed}. Note: does NOT check subject==caller or target — the gate enforces those on redemption.

Input parameters:

- `grant` (object, required): the grant object exactly as returned by grant_issue
- `signature` (string, required)

### `policy_create` (~150 tokens)

Build the unsigned transaction that creates a new policy. Returns {to, value, data} for YOUR wallet to sign and submit — the submitting address becomes the policy owner. `value` is the protocol creation fee in wei.

Input parameters:

- `expiresAt` (integer): unix seconds; 0 = never expires
- `metadataHash` (string): optional keccak256 of the metadata document — on-chain tamper-evidence for the URI's content
- `metadataURI` (string): optional metadata pointer, informational only; prefer ipfs:// (content-immutable)
- `openMembership` (boolean): true: every address counts as a member
- `transferable` (boolean): true: ownership can be transferred later

### `policy_update` (~96 tokens)

Build the unsigned transaction for a policy rule change (submit from the owner or an admin wallet; `value` is the protocol update fee in wei). Operations: addMembers, removeMembers, setActionRule (UNSET|MEMBERS|ANYONE|NOBODY), addIssuer, removeIssuer, addAdmin, removeAdmin, setExpiry.

Input parameters:

- `operation` (required)
- `policyId` (required): Policy ID as decimal string or integer

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp#diagnostics

## Score history

- 2026-08-03: 60
- 2026-08-02: 20
- 2026-08-01: 25
- 2026-07-31: 20
- 2026-07-30: 27
- 2026-07-28: 45
- 2026-07-27: 45

## Links

- npm package: https://www.npmjs.com/package/@smartpolicy/mcp
- Socket report: https://socket.dev/npm/package/@smartpolicy/mcp
- Repository: https://github.com/smartpolicy-protocol/smartpolicy
- Website: https://smartpolicy.io/
- Changelog RSS feed: https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/smartpolicy-protocol-smartpolicy/smartpolicy-mcp
