Skip to content
VS Code

smartpolicy for VS Code

io.github.smartpolicy-protocol/smartpolicy

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

client:VS Code transport:stdio runtime:npm

Install smartpolicy in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "smartpolicy-registry",
      "description": "SMARTPOLICY_REGISTRY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "smartpolicy-verifier",
      "description": "SMARTPOLICY_VERIFIER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "smartpolicy-rpc-url",
      "description": "SMARTPOLICY_RPC_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "smartpolicy-issuer-key",
      "description": "SMARTPOLICY_ISSUER_KEY",
      "password": true
    }
  ],
  "servers": {
    "smartpolicy": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@smartpolicy/mcp"
      ],
      "env": {
        "SMARTPOLICY_REGISTRY": "${input:smartpolicy-registry}",
        "SMARTPOLICY_VERIFIER": "${input:smartpolicy-verifier}",
        "SMARTPOLICY_RPC_URL": "${input:smartpolicy-rpc-url}",
        "SMARTPOLICY_ISSUER_KEY": "${input:smartpolicy-issuer-key}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

smartpolicy in other clients