jev-cognitive-mcp
This MCP server provides advisory, deterministic-first cognitive hierarchy tools for coding agents to screen risky commands, route tasks, arbitrate escalation, verify completions, rerank candidates, benchmark Layer-0 rules, and guard Chrome CDP automation.
Screen shell commands for credential leaks and destructive patterns with Layer-0 deterministic rules and optional System-1 probabilistic checks (
jev_guard).Arbitrate whether to use reflex, intuition, deep reasoning, or a human gate using offline 5-factor scoring (
jev_arbitrate).Recommend FAST, STANDARD, or DEEP_REASONING model tiers for coding tasks (
jev_route).Review caller-supplied task specs, change summaries, and test logs for acceptance issues without running tests or reading git (
jev_verify).Rank up to 96 supplied text candidates in deterministic batches (
jev_rerank).Run an offline Layer-0 JSONL replay benchmark and return accuracy/timing metrics (
jev_benchmark).Zero-config autopilot selection of model tier, reasoning effort, and context tier (
jev_autopilot).Discover Chrome M144+ DevToolsActivePort without popups and pre-screen CDP actions for DLP/SSRF risks (
jev_chrome_guard).Work fully offline for Layer-0 screening, arbitration, benchmark, autopilot, and init tooling; other tools require a configured JevBridge runtime and fail closed if unavailable.
Provides advisory cognitive-hierarchy tools for OpenAI Codex CLI coding agents over MCP: pre-execution command risk screening (DLP/destructive pattern guards), 5-factor escalation arbitration, task routing across OpenAI model tiers (codex-mini-latest, gpt-4o-mini, gpt-4.1, gpt-4o, o3, codex-1), completion verification, and candidate reranking. Includes jev-kit init-codex for generating the Codex config.toml/JSON MCP wiring.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jev-cognitive-mcp screen this command for credential leaks: export TOKEN=ghp_abc123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jev-cognitive-mcp
English · 简体中文
Advisory 3+1 Cognitive Hierarchy Toolkit & Model Context Protocol (MCP) Server for Coding Agents (OpenAI Codex CLI, Claude Code, Cursor, Antigravity).
jev-cognitive-mcp provides deterministic Layer-0 DLP/destructive command pre-screening, 5-factor Meta-Controller escalation arbitration, and optional System-1 probabilistic triage (guard, route, verify, rerank) over stdio MCP. All verdicts and routing signals are advisory—the host agent remains responsible for enforcing command blocking, sandboxing, and human-in-the-loop approval gates.
Architecture: The 3+1 Cognitive Hierarchy
flowchart LR
A["Incoming Agent Action / Task"] --> L0["Layer 0: Deterministic Reflex<br/>(0 network / 0 token cost)<br/>DLP regex & destructive pattern screen"]
L0 -->|Blocked / Matched| OUT0["Immediate Advisory Verdict"]
L0 -->|Needs Semantic Triage| S1["System 1: Probabilistic Intuition (JEV)<br/>(Requires external JevBridge)<br/>Guard / Route / Rerank / Verify"]
S1 --> MC{"Meta-Controller<br/>5-Factor Arbitration"}
MC -->|High Confidence & Two-Way Door| OUT1["Advisory Fast Path"]
MC -->|Low Confidence / High Risk| S2["System 2: Host Frontier LLM<br/>(Codex / o3 / Sonnet Thinking)"]
MC -->|One-Way Door & High Risk| HG["Explicit Human Gate Required"]Layer | Role | Execution Mode | Responsibility |
Layer 0 (Reflex) | Deterministic Code | Local offline ( | Pre-egress regex DLP credential screening ( |
System 1 (Intuition) | Probabilistic JEV | External | Multi-head |
System 2 (Reasoning) | Host Frontier LLM | Host agent runtime | Complex causal reasoning, multi-file architecture design, subtle debugging |
Meta-Controller | Control Plane | Local offline ( | Arbitrates escalation using 5 quantitative signals: Confidence, Risk, Reversibility, Expected Value, and Cost Pressure |
Related MCP server: ToolBastion
Core Modules & MCP Tools
jev_guard(jev_kit.guard) — Advisory Pre-Tool Command Risk ScreenEvaluates shell commands before execution and returns an advisory action (
ALLOW,INSPECT,ESCALATE_HUMAN, orBLOCK).Layer 0 (
reflex_only=trueor pre-screen): Blocks literal credential egress (SENSITIVE_INPUT_REJECTED) and known destructive shell/PowerShell patterns locally with zero network calls.System 1 (when
reflex_only=false): Evaluatesis_destructive,is_rce_or_exfil, andis_secret_leakprobabilities viaJevBridge.
jev_arbitrate(jev_kit.controller) — Offline 5-Factor Meta-ControllerPurely deterministic calculation of expected escalation utility from
(confidence, risk, reversible, expected_value, cost_pressure). Recommendshuman_gateon irreversible high-risk actions. Works completely offline.
jev_route(jev_kit.router) — Advisory Task & Model Tier RouterClassifies incoming coding prompts into
FAST(codex-mini-latest,gpt-4o-mini),STANDARD(gpt-4.1,gpt-4o), orDEEP_REASONING(o3,codex-1) tiers while estimating architectural scope.
jev_verify(jev_kit.verifier) — Caller-Supplied Completion & Acceptance ReviewReviews caller-supplied
task_spec,implemented_changessummary, andtest_resultslogs to returnPASS,ADVISORY, orNEEDS_REVISION. Does not inspect git repositories or run test suites directly.
jev_rerank(jev_kit.reranker) — Bounded Semantic Candidate RerankerRanks up to 96 caller-supplied code snippets or issue candidates in deterministic batches of 12 while preserving full provenance and failing closed on partial batch errors.
Offline Deterministic Mode vs. External JevBridge Requirement
Works 100% Offline (Zero External Dependencies):
jev_arbitrate(5-factor Meta-Controller)jev_guardwithreflex_only=true(jev-kit guard "<cmd>" --reflex-only)jev-kit init-codex(configuration generator for OpenAI Codex CLI and MCP clients)Pre-egress credential DLP screening inside
call_jev()(blocks sensitive tokens before any bridge lookup)
Requires External
JevBridgeRuntime:jev_guard(whenreflex_only=falseand Layer 0 does not match),jev_route,jev_verify, andjev_rerankinvokejev_cli.pyfrom the localJevBridgeruntime directory.Set
JEV_BRIDGE_DIR=/path/to/JevBridge/runtime(defaults to%LOCALAPPDATA%\JevBridge\runtimeon Windows or~/.local/share/JevBridge/runtimeon Linux/macOS). If the bridge runtime is not installed, these tools fail closed withJevIntegrationError(code="BRIDGE_MISSING").
Quick Start
1. Installation
git clone https://github.com/17671454333/jev-cognitive-mcp.git
cd jev-cognitive-mcp
pip install -e ".[dev]"2. Wire into OpenAI Codex CLI (~/.codex/config.toml)
Generate the exact TOML snippet with jev-kit init-codex --format toml and add it to ~/.codex/config.toml:
[mcp_servers.jev_cognitive]
command = "jev-mcp"
args = []3. Wire into JSON MCP Clients (Claude Code, Cursor, Antigravity)
Generate with jev-kit init-codex --format json:
{
"mcpServers": {
"jev-cognitive": {
"command": "jev-mcp",
"args": []
}
}
}4. CLI Usage & Verification
# Generate OpenAI Codex CLI config.toml snippet
jev-kit init-codex --format toml
# Layer-0 deterministic reflex screen (offline, 0 tokens)
jev-kit guard "rm -rf -- /" --reflex-only
# 5-factor Meta-Controller arbitration (offline, 0 tokens)
jev-kit arbitrate --confidence 0.62 --risk 0.75 --irreversible --value 0.85
# Run deterministic unit test suite
python -m unittest discover -s tests -vSecurity & Reliability Boundaries
Pre-Egress Credential DLP Chokepoint: Both
local_reflex_screen()andcall_jev()screen serialized inputs for literal secrets (sk-*,ghp_*,glpat-*,AKIA*,sntrys_*,s.*,PMAK-*,glsa_*,Bearer,password=,secret=,api_key=,token=, PEM private keys, and URL userinfo credentials) and raiseSENSITIVE_INPUT_REJECTEDbefore_invoke_bridge()can be called.Zero Direct Credential Arguments:
call_jev()rejects explicitapi_key,token, orsecretkeyword arguments (DIRECT_CREDENTIALS_DISABLED).Advisory Boundary: Outputs from
jev-cognitive-mcpare advisory structured signals; host agents must enforce execution blocking and human approval gates.No Silent Fallbacks: Timeouts, missing bridge runtimes (
BRIDGE_MISSING), or malformed responses raiseJevIntegrationErrorwith explicitbilling_uncertaintracking rather than defaulting toALLOWorPASS.
License
Released under the MIT License.
Zero-Popup Chrome M144+ Live CDP Guard (jev_chrome_guard)
Modern Chrome (M144+) exposes %LOCALAPPDATA%\Google\Chrome\User Data\DevToolsActivePort via chrome://inspect/#remote-debugging, triggering a native modal prompt on every transient WebSocket handshake. jev_chrome_guard provides:
Zero-Popup
DevToolsActivePortDiscovery: Parses live port and browser WebSocket UUID across Windows, macOS, and Linux without opening transient WebSockets.Layer-0 CDP DLP & SSRF Pre-Screen: Blocks accidental
.env/ SSH key /.kube/config/.aws/credentials/.docker/config.json/terraform.tfstate/ ChromeLocal Statefile uploads inDOM.setFileInputFiles, blocksdocument.cookie/cookieStore.getAll(),localStorage/sessionStorage/indexedDB/caches.open()network exfiltration,navigator.clipboard.readText(),navigator.credentials.get()harvesting, File System Access API (showDirectoryPicker/navigator.storage.getDirectory), and persistentnavigator.serviceWorker.register()injection across bothRuntime.evaluateandRuntime.callFunctionOn, blocks bulkDOMStorage/IndexedDB/CacheStorage/cookie dumps, silentBrowser.grantPermissions/Page.setBypassCSPoverrides, persistentPage.addScriptToEvaluateOnNewDocument/Runtime.addBindingbackdoors, TLS downgrade (Security.setIgnoreCertificateErrors), MITMFetch.enable/Network.setCookieoverrides, sensitiveBrowser.setDownloadBehaviorpath traversal, andCookie/Proxy-Authorizationheader overrides, blocksjavascript:pseudo-URLs,file://browser profile vault reads, and cloud metadata SSRF (169.254.169.254,[fd00:ec2::254],[::ffff:169.254.169.254],100.100.100.200) acrossPage.navigateandTarget.createTarget, and enforcesuserGesture: trueon safe evaluations to prevent popup blockers.
Open-Core Pro & Commercial Ecosystem
Capability | Community Core ( | Studio Pro Suite (Commercial / Sponsors) |
Layer-0 Shell & CDP Guardrails | ✅ Included (85-case JSONL benchmark, 0 tokens) | ✅ + Custom Enterprise Policy Packs |
5-Factor Meta-Controller & Autopilot | ✅ Included ( | ✅ + Multi-Key Quota Balancer |
Chrome M144+ Zero-Popup CDP Guard | ✅ Endpoint Discovery + Layer-0 CDP Screen | ✅ + Persistent Multi-Tab Daemon & Windows UIA Auto-Consent |
8-Platform Matrix Auto-Publisher | — | 🚀 Pro Exclusive: One-click zero-login publishing to YouTube, TikTok, Bilibili, Xiaohongshu, Douyin, WeChat Channels & Kuaishou |
AI Short-Drama & WebGame Studio | 🚀 Pro Exclusive: Cross-shot face-locking, Seedance 85%-credit-saver pipeline, CapCut draft exporter & 6-target WebGame packager |
Available Tools
8 toolsjev_arbitrateB
Run the offline deterministic 5-factor Meta-Controller to recommend Layer-0 Reflex, System-1 Intuition, System-2 Deep Reasoning, or Human Gate.
Inputs: risk (required), confidence (required), reversible (required), cost_pressure, +3 more.
jev_autopilotB
Zero-config offline autopilot selector that recommends model tier, reasoning_effort (low/medium/high), and context tier without manual grouping.
Inputs: task_description (required), context_chars.
jev_benchmarkA
Run the offline deterministic Layer-0 JSONL replay benchmark suite and return accuracy and timing metrics.
Inputs: input_path.
jev_chrome_guardC
Zero-popup Chrome M144+ DevToolsActivePort discovery and Layer-0 DLP/SSRF pre-screening for live browser CDP automation.
Inputs: method, params, target_url, custom_port_file.
jev_guardA
Provide advisory risk screening for a shell command using Layer-0 deterministic regex rules and (unless reflex_only=true) System-1 probabilistic evaluation. Does not intercept host execution.
Inputs: command (required), context, reflex_only.
jev_rerankA
Rank up to 96 candidate text items against a query in batches of 12 (requires JevBridge runtime).
Inputs: items (required), query (required), top_k.
jev_routeB
Provide advisory task complexity and model tier recommendation (requires configured JevBridge runtime).
Inputs: task_description (required), context.
jev_verifyB
Review caller-supplied task specification, change summary, and test logs for potential evidence gaps (does not run tests or read git diffs directly; requires JevBridge runtime).
Inputs: task_spec (required), implemented_changes (required), test_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
The tools are mostly distinct, but jev_autopilot, jev_route, and jev_arbitrate all relate to model/reasoning selection and could be confused. Their descriptions differentiate offline vs. runtime and tier vs. reasoning mode, but an agent may still misselect among them.
All tool names use a consistent jev_ snake_case prefix, making them easy to recognize as a set. However, some names are verbs (verify, rerank, route) while others are nouns or compound nouns (autopilot, chrome_guard, benchmark), so the verb_noun pattern is not strict.
Eight tools is a well-scoped count for this cognitive/advisory toolkit. Each tool has a distinct high-level function, and there is no obvious filler or redundancy.
The surface covers benchmarking, routing, arbitration, guarding, verification, and reranking, which appears complete for the stated advisory domain. Minor gaps exist around runtime status/configuration checks and explicit cognitive state management, but agents can likely work around them.
Maintenance
Related MCP Connectors
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRuntime safety guardrails for AI coding agents. Checks file access, validates shell commands, and scores your repo's AI safety — all via MCP.9 npm8MIT
- AlicenseNot gradedqualityCmaintenanceA zero-trust security gateway for MCP tool calls, inspecting tool identity, arguments, execution decisions, and returned content before risk reaches your coding agent.Apache 2.0
- AlicenseAqualityCmaintenanceProvides advisory AI-governance checks for MCP hosts and coding agents, enabling policy verdicts, PII masking, and audit traces before executing tool calls.382 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to make structured local decisions, choose bounded browser actions with approvals, and run coding workflows such as file relevance, context pruning, diff screening, and completion checks through MCP or CLI.Apache 2.0