smartpolicy

v0.2.0
io.github.smartpolicy-protocol/smartpolicy Checked 18 hours ago Published 4 months ago

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

Values you need

VariableWhat it is
SMARTPOLICY_REGISTRYoptional PolicyRegistry contract address (omit for the public Sepolia default)
SMARTPOLICY_VERIFIERoptional GrantVerifier contract address (omit for the public Sepolia default)
SMARTPOLICY_RPC_URLoptional EVM RPC endpoint (omit for the public Sepolia default)
SMARTPOLICY_ISSUER_KEYoptional secret Optional grant-issuer private key; enables the grant_issue tool

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add smartpolicy -- npx -y --package=@smartpolicy/mcp@0.2.0 smartpolicy-mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "smartpolicy": {
      "args": [
        "-y",
        "--package=@smartpolicy/mcp@0.2.0",
        "smartpolicy-mcp"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "smartpolicy": {
      "args": [
        "-y",
        "--package=@smartpolicy/mcp@0.2.0",
        "smartpolicy-mcp"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "smartpolicy": {
      "args": [
        "-y",
        "--package=@smartpolicy/mcp@0.2.0",
        "smartpolicy-mcp"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.smartpolicy]
command = "npx"
args = ["-y", "--package=@smartpolicy/mcp@0.2.0", "smartpolicy-mcp"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: policy_check, policy_get, grant_issue, grant_issuer_info, policy_fees, grant_verify, policy_create, policy_update.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json