Local
The server runs over stdio inside the repo checkout with zero network, zero database, zero credentials, and nothing recorded.
Every AI action asks permission before it executes. @decionis/mcp is a local stdio MCP server that lets AI coding agents read a repository's DECIONIS_POLICY.md and evaluate candidate actions through the real Decionis evaluator before they commit, deploy, or migrate anything.
The package puts the Decionis policy gate inside the agent loop for Claude Code, Codex, Cursor, and any MCP-compatible client, without sending anything off the machine.
The server runs over stdio inside the repo checkout with zero network, zero database, zero credentials, and nothing recorded.
decionis_evaluate boots the actual @decionis/protocol service in-process, so the verdict an agent sees locally is the verdict the platform would produce.
MCP tools are the discovery and explanation surface. The native PreToolUse hook is the binding enforcement surface that intercepts tool calls outside the model's discretion.
Point any MCP client at npx. Each client keeps its own config file; the server block is the same.
Add the server to .mcp.json at the repo root.
{
"mcpServers": {
"decionis": {
"command": "npx",
"args": ["-y", "@decionis/mcp"]
}
}
}Add the stdio server to ~/.codex/config.toml or a trusted project's .codex/config.toml.
[mcp_servers.decionis]
command = "npx"
args = ["-y", "@decionis/mcp"]
required = trueUse the same server block as Claude Code in .cursor/mcp.json.
{
"mcpServers": {
"decionis": {
"command": "npx",
"args": ["-y", "@decionis/mcp"]
}
}
}Install globally so decionis-agent-hook is on PATH for the native PreToolUse hook templates.
npm install -g @decionis/mcp@decionis/mcp is published to npm through the repository's package-publish workflow. If the package is not yet resolvable from your registry, use a source checkout instead: run "pnpm --filter @decionis/mcp build" and point the client at the built server with "command": "node" and args ["/path/to/Decionis/apps/mcp/dist/index.js"]. The config shape is otherwise identical.
Three tools cover reading the policy, evaluating a candidate action, and understanding the verdict vocabulary.
| Tool | Purpose |
|---|---|
| decionis_read_policy | Path, sha256, and compiled rules (or compile errors) of the repo's DECIONIS_POLICY.md. |
| decionis_evaluate | Evaluates a candidate action payload against the policy through the real evaluator and returns the verdict plus the matched rule. |
| decionis_verdict_help | The verdict vocabulary, the rules-block grammar, and how an agent should behave on each verdict. |
The policy file resolves from the tool's path argument, then $DECIONIS_POLICY_PATH, then ./DECIONIS_POLICY.md in the working directory.
This package is the local, offline complement to the hosted Decionis Protocol MCP surface for org-connected agents. Use both: local for repo checkouts, hosted when the decision must be recorded.
| Dimension | Local @decionis/mcp | Hosted Decionis Protocol MCP |
|---|---|---|
| Transport | stdio in the repo checkout | streamable_http at https://protocol.decionis.com/v1/protocol/mcp |
| Auth | None. Zero credentials. | Org-authenticated. |
| Policy source | The repo's DECIONIS_POLICY.md. | The org's full Policy Decision Graph. |
| Record | Nothing recorded. No signed Decision Dossier is minted. | Governed decisions with signed Decision Dossiers. |
| Best for | Repo checkouts and offline agent loops. | Org-connected agents that need verifiable proof. |
Local evaluations mint no signed Decision Dossier. CI runs through decionis/govern and the hosted surfaces produce the verifiable record.
MCP tools rely on the model choosing to ask. The native hook intercepts every supported tool call outside the model's discretion: Codex, GitHub Copilot, and Claude Code all normalize into one AgentToolCall contract.
decionis-agent-hook <codex|copilot|claude>| Host | Template shipped in the package | Native location |
|---|---|---|
| Codex | templates/CodexHooks.json | .codex/hooks.json |
| Claude Code | templates/ClaudeSettings.json | .claude/settings.json |
| GitHub Copilot CLI/cloud agent/VS Code | templates/CopilotHooks.json | .github/hooks/Decionis.json |
The hook loads DECIONIS_POLICY.md, publishes it into the real in-process protocol evaluator, and enforces the result without network access or credentials. For a source checkout, replace the template's decionis-agent-hook command with node apps/mcp/dist/AgentHookCli.js plus the provider name.
Set the full variable block to evaluate through the enterprise policy graph and signed decision pipeline. Partial remote configuration is rejected.
DECIONIS_AGENT_GATE_MODE=remote
DECIONIS_AGENT_GATE_URL=https://protocol.decionis.com/v1/protocol/evaluate-decision
DECIONIS_API_KEY=<org-scoped-key>
DECIONIS_ORG_ID=<org-uuid>| Result | Host behavior |
|---|---|
| APPROVE | No permission override is returned; the host's normal sandbox and user approval flow still applies. |
| REJECT | The tool call stops with a native deny response. |
| REVIEW / ESCALATE | The tool call stops and stays blocked until a human resolves it through the policy workflow. |
| Failure | Network errors, invalid hook input, missing policy, and evaluator failures all deny. The gate fails closed. |
Pair this page with /docs/protocol-hooks for workflow-surface gates, /docs/decision-evaluation for the canonical evaluate-decision contract, and /docs/policy-encoding for the policy bundle format the evaluator ingests.