
Product
Socket Now Protects the Firefox Extension Ecosystem
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.
@decionis/mcp
Advanced tools
Decionis MCP policy tools and native Codex, Copilot, and Claude execution hooks.
A stdio Model Context Protocol server that lets AI coding
agents (Claude Code, Cursor, Codex, OpenHands, …) read a repository's DECIONIS_POLICY.md
and evaluate candidate actions before they commit, deploy, or migrate anything.
It is not a re-implementation: decionis_evaluate boots the real @decionis/protocol
service in-process with an in-memory store, publishes the repo policy through the
protocol's own schema-validated bundle ingestion, and evaluates through
POST /v1/protocol/evaluate-decision via fastify inject(). The verdict an agent sees
locally is the verdict the platform would produce — with zero network, zero database,
zero credentials, and nothing recorded.
(The protocol service separately exposes a remote, authenticated MCP surface for org-connected agents; this package is the local, offline complement for repo checkouts.)
The package now exposes two complementary surfaces:
PreToolUse hooks intercept every supported tool call outside the model's
discretion. Codex, GitHub Copilot, and Claude Code all normalize into one
AgentToolCall contract and one AgentGateEvaluator interface.MCP is the discovery and explanation surface. The native hook is the binding enforcement surface.
| Tool | Purpose |
|---|---|
decionis_read_policy | Path, sha256, and compiled rules (or compile errors) of the repo's DECIONIS_POLICY.md. |
decionis_evaluate | Evaluate a candidate action payload against the policy through the real evaluator; returns the verdict + matched rule. |
decionis_verdict_help | The verdict vocabulary, 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.
npm install -g @decionis/mcp
Or skip the install entirely — every client config below can launch the server
through npx -y @decionis/mcp.
Claude Code — .mcp.json at the repo root:
{
"mcpServers": {
"decionis": {
"command": "npx",
"args": ["-y", "@decionis/mcp"]
}
}
}
Codex — 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 = true
Cursor — use the Claude server block in .cursor/mcp.json. During development,
"command": "pnpm", "args": ["--filter", "@decionis/mcp", "dev"] also works.
Source checkout — build once (pnpm --filter @decionis/mcp build) and point the
client at the bin directly: "command": "node", "args": ["<repo>/apps/mcp/dist/index.js"].
Install the package globally so decionis-agent-hook (and the other bins) land on the
host's PATH:
npm install -g @decionis/mcp
Copy the provider template to its native repository location:
| Host | Template | 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 |
For a source checkout, replace the template's decionis-agent-hook … command with:
node "$(git rev-parse --show-toplevel)/apps/mcp/dist/AgentHookCli.js" <provider>
where <provider> is codex, copilot, or claude.
The hook defaults to local mode. It loads DECIONIS_POLICY.md, publishes it into the
real in-process protocol evaluator, and enforces the result without network access or
credentials.
Set these variables to use the enterprise policy graph and signed decision pipeline:
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>
DECIONIS_AGENT_GATE_TIMEOUT_MS optionally changes the remote request timeout (default:
4 seconds). Partial remote configuration is rejected; network errors, invalid hook input,
missing policy, and evaluator failures all produce a native deny response.
An APPROVE result returns no permission override, so the host's normal sandbox and user
approval flow still applies. REJECT, REVIEW, and ESCALATE all stop the tool call;
the latter two remain blocked until a human resolves them through the policy workflow.
Other runtimes can import the same contracts and orchestration layer:
import {
AgentHookRunner,
type AgentGateEvaluator,
type AgentHostAdapter,
type AgentToolCall,
} from "@decionis/mcp/agent";
A new provider implements only AgentHostAdapter; a new decision backend implements only
AgentGateEvaluator. Neither needs to understand the other provider formats.
For pre-prompt enforcement, @decionis/sdk-node exposes the complementary
DecionisAgentTaskGateway interface. It reserves the model budget before an OpenAI or
Anthropic proxy call, verifies sandbox egress, consumes the same bound grant at the proxy,
and reconciles provider usage. Copilot embeddings use the same reserve/egress/reconcile
contract when model transport itself is not replaceable.
See
docs/integrations/agents/AgentBoundaryGateway.md
for the provider SDK configuration and four-boundary deployment model.
Device-management templates are under templates/managed:
CodexRequirements.toml pins the managed PreToolUse hook in
requirements.toml.CopilotPolicyHooks.json is the root-owned Copilot CLI policy hook; cloud agent
continues to use the repository template.ClaudeManagedSettings.json is the organization-controlled Claude Code settings
fragment.AgentPolicyBundle.json is a fail-closed, source-dated policy-graph skeleton. It
contains explicit official list-price cards retrieved on 2026-07-27. Negotiated rates
are stored separately under the organization policy's
agentExecution.providerContracts; a contract overrides the public baseline only while
it is effective and independently maker-checker approved.AgentGateConfig.example.json documents the protected, org-scoped runtime
configuration. The package never embeds its API key.Build the deterministic deployment ZIP with:
pnpm --filter @decionis/mcp package:managed
The ZIP contains Linux, macOS, and Windows payload trees, the bundled managed runner,
native policy files, the organization policy template, an install manifest, and
SHA256SUMS. Codex executes the runner from its declared managed hook directory. Render
the example runtime configuration at the manifest destination, protect it with
administrator-only permissions, and distribute the matching payload through the
organization's package or device-management system.
PreToolUse happens after the host has already spent tokens choosing a tool. It prevents
the side effect, but it cannot prevent the model cost incurred before that point. Put the
Decionis API/network gateway in front of model traffic when pre-prompt token and cost
reservation is required.apply_patch, MCP calls, and supported local
function tools. Hosted tools that do not traverse the local hook path need a separate
gateway boundary..github/hooks/*.json template, emits the PascalCase-compatible snake-case payload,
and receives the nested native denial shape from the adapter.userPromptSubmitted event is observational and cannot block prompt
processing. Copilot pre-prompt spend enforcement therefore belongs at the enterprise
proxy/API boundary, not in a repository hook.pnpm --filter @decionis/mcp test # vitest (includes the real evaluator)
pnpm --filter @decionis/mcp typecheck
pnpm --filter @decionis/mcp build # self-contained dist/index.js (shebang bin)
pnpm --filter @decionis/mcp package:managed
Smoke test over stdio:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"decionis_evaluate","arguments":{"payload":{"action":"production-deploy","change_freeze":true}}}}' \
| node dist/index.js
apps/api/src/services/policyEncoding/decionisRulesBlock.ts and must stay in lockstep
(local difference: JSON-only block bodies; the platform also accepts YAML)."domain": "*" are filtered by the platform's decision-domain match —
the evaluate tool detects this and tells the agent how to fix the policy.decionis/govern produce the verifiable record.FAQs
Decionis MCP policy tools and native Codex, Copilot, and Claude execution hooks.
The npm package @decionis/mcp receives a total of 374 weekly downloads. As such, @decionis/mcp popularity was classified as not popular.
We found that @decionis/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.

Research
/Security News
Socket uncovered 77 linked Firefox extensions, including 40 that steal wallet secrets or credentials and 37 deceptive sports-score shells.