Client files

Everything, downloadable from here

No package to install and no repo to clone: every file below is served by this service, stdlib only, and works with python file.py. Set JEV_GATE_KEY and go.

jev_gate_mcp.py — MCP server and guard

The gate as one MCP tool (python jev_gate_mcp.py) and the wrappers you call from your own code (from jev_gate_mcp import guarded).

curl -sO https://jev-gate.fly.dev/client/jev_gate_mcp.py

claude_code_hook.py — Claude Code PreToolUse hook

Every tool call passes the gate first. Exit 2 blocks the call and feeds the rule back to the model; if the gate cannot answer, the hook blocks rather than guessing.

curl -sO https://jev-gate.fly.dev/client/claude_code_hook.py

langchain_callback.py — LangChain on_tool_start

A callback that raises before the tool body runs, so a hold or escalate aborts the chain.

curl -sO https://jev-gate.fly.dev/client/langchain_callback.py

guard_tool_calls.py — any tool dispatcher

The smallest useful integration: wrap your dispatcher once, and every call asks the gate before it runs.

curl -sO https://jev-gate.fly.dev/client/guard_tool_calls.py

API reference

POST /v1/gate with {{"transcript": "...", "tool_calls": [...]}} and branch on action. Errors fail closed: 401 rotate the key, 402 reopen billing, 429 back off.