Back to all articles

AI Agents

Jev MCP Server Guide: Adding a System One Decision Layer to Claude Code & Cursor

Step-by-step guide to building and registering a Jev MCP server for Claude Code, Cursor, and Codex. Add typed guardrails, model routing, context compaction, and completion checks.

By Jev AINov 30, 20265 min read
Jev MCP Server Guide: Adding a System One Decision Layer to Claude Code & Cursor

To connect Jev AI to Claude Code, Cursor, or Codex via MCP, wrap POST https://thejevai.com/v1/systemone in a lightweight stdio Model Context Protocol (MCP) server exposing a jev_decide tool, then register it in your editor’s mcpServers config. Your coding agent keeps full control over planning and writing code, while delegating fast binary gates, model routing, and quality checks to TypeSafe’s Jev 1.14 decision model.

Coding agents make dozens of hidden micro-decisions in every session: Should I run this destructive shell command or ask first? Does this subtask need a frontier reasoning model or a fast model? Which tool outputs from 30 turns ago still matter during context compaction? Did my patch actually satisfy every acceptance criterion?

Asking the same generative LLM to judge its own actions is slow and prone to confirmation bias. This guide walks through wiring Jev MCP into your daily coding-agent stack—with complete TypeScript server code, client configuration files, and risk-tiered confidence policies.

Table of contents

Why coding agents need a System One MCP tool

Modern coding agents are remarkably capable at synthesizing code, yet fragile at bounded operational judgment:

  • Over-eager tool execution: An agent trying to fix a test failure may run git reset --hard, drop a local database, or deploy to production without pausing.
  • Wasted reasoning tokens: Routing trivial formatting or lookup tasks to the heaviest reasoning model burns budget and stalls developer flow.
  • Noisy context compaction: Summarizing long sessions blindly drops exact error codes or schema constraints.

Pairing your generative agent with the Jev System One model separates writing from judging. Jev returns strict choice, score, and noul probabilities in hundreds of milliseconds—giving your MCP host an independent, calibrated second opinion before it acts.

How a Jev MCP tool call works end to end

When an MCP host invokes jev_decide, the decision passes through five clean stages:

Sequence diagram showing Agent Host calling Jev MCP Server, POST /v1/systemone API, calibrated probabilities, and Policy Check gate branching to Run Tool or Pause for User

  1. Agent Host proposes an action or inspects a state (e.g., a pending shell command and the user’s original request).
  2. Jev MCP Server validates the inputs with Zod and forwards them over HTTPS to POST https://thejevai.com/v1/systemone.
  3. Jev AI API runs typesafe/jev-1.14 across all questions in parallel.
  4. Calibrated Probabilities return cleanly typed (noul, choice, score, confidence).
  5. Policy Check lets deterministic rules decide whether to execute automatically, log, or pause for human confirmation.

Build a production Jev MCP server in TypeScript

Install the official MCP SDK and Zod in a small Node/TypeScript project:

npm install @modelcontextprotocol/sdk zod
npm install -D tsx typescript

Then create jev-mcp-server.ts exposing both a general jev_decide tool and a purpose-built jev_guard_action guardrail tool:

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const API_URL = "https://thejevai.com/v1/systemone";
const API_KEY = process.env.JEV_API_KEY;

if (!API_KEY) {
  console.error("Missing JEV_API_KEY environment variable.");
  process.exit(1);
}

async function callJev(payload: Record<string, unknown>) {
  const res = await fetch(API_URL, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(payload),
  });
  if (!res.ok) {
    throw new Error(`Jev API returned HTTP ${res.status}`);
  }
  return res.json();
}

const server = new McpServer({
  name: "jev-mcp",
  version: "1.0.0",
});

server.tool(
  "jev_decide",
  "Evaluate a state against parallel typed Jev questions (choice, score, noul).",
  {
    state: z.union([z.string(), z.record(z.any()), z.array(z.string())]),
    questions: z.record(z.any()),
    model: z.string().default("typesafe/jev-1.14"),
  },
  async ({ state, questions, model }) => {
    const data = await callJev({ model, state, questions });
    return {
      content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    };
  }
);

server.tool(
  "jev_guard_action",
  "Check whether a proposed shell command or tool call is safe or requires user approval.",
  {
    userRequest: z.string(),
    proposedAction: z.string(),
  },
  async ({ userRequest, proposedAction }) => {
    const data = await callJev({
      model: "typesafe/jev-1.14",
      state: { user_request: userRequest, proposed_action: proposedAction },
      questions: {
        destructive: {
          type: "noul",
          instructions:
            "Could proposed_action delete data, overwrite uncommitted work, or mutate production state?",
        },
        explicitly_authorized: {
          type: "noul",
          instructions:
            "Did user_request explicitly ask for proposed_action?",
        },
        risk_level: {
          type: "score",
          instructions: "Rate operational blast radius.",
          criteria: ["Read-only", "Local reversible edit", "Irreversible or production impact"],
        },
      },
    });
    return {
      content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
    };
  }
);

await server.connect(new StdioServerTransport());

Before wiring the key into your editor, you can test any guardrail or routing schema in the free online Jev Playground, then sign in to generate a Bearer key under Settings → API Keys.

Register Jev MCP in Claude Code, Claude Desktop, and Cursor

Add the server block to .cursor/mcp.json (Cursor) or claude_desktop_config.json (Claude Desktop):

{
  "mcpServers": {
    "jev": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/jev-mcp-server.ts"],
      "env": {
        "JEV_API_KEY": "jev_live_your_api_key"
      }
    }
  }
}

For Claude Code CLI, register the same stdio server directly:

claude mcp add jev -e JEV_API_KEY=jev_live_your_api_key -- npx tsx /absolute/path/to/jev-mcp-server.ts

Always store JEV_API_KEY in local environment config—never commit .cursor/mcp.json with a live key to Git.

Four high-leverage agent patterns with Jev MCP

Once connected, four concrete patterns deliver immediate value across engineering workflows:

Four-quadrant schematic showing Jev MCP agent patterns: Tool Guardrail, Model Routing, Context Compaction, and Done Verifier

  1. Pre-tool Safety Guardrail: Invoke jev_guard_action before database migrations, rm -rf, git push --force, or cloud deploys. Pause whenever destructive.noul > 0.3 and explicitly_authorized.noul < 0.85.
  2. Subtask Model Routing: Classify incoming user tasks (trivial_edit, standard_feature, deep_architecture) so orchestrators dispatch simple work to fast models and reserve expensive reasoning models for genuinely hard problems.
  3. Context Compaction Filter: Before compacting a 60-turn coding session, score past tool outputs on still_relevant so stack traces, file paths, and API contracts survive while verbose logs are pruned.
  4. Acceptance Criteria Done-Check: Before the agent declares “Done”, pass the user’s checklist and the git diff into state and ask one noul per requirement to catch skipped edge cases.

Risk-tiered confidence thresholds for safe autonomy

Not every action deserves the same approval threshold. Map Jev’s calibrated probabilities to explicit risk tiers in your harness:

Chart of risk-tiered confidence thresholds for AI agents: 0.65 for read-only, 0.80 for code edits, and 0.95 plus human approval for delete, deploy, or billing actions

Risk Tier Example Agent Actions Suggested Safety Threshold Policy
Low Risk File search, read docs, run unit tests 0.65 Auto-execute
Medium Risk Edit source files, install dev dependency 0.80 Execute + audit log
High Risk Delete data, DB migration, production deploy, billing API 0.95 Require explicit human approval

Remember: Jev judges; your deterministic code enforces. Never let an unverified probability override a hard permission boundary.

Jev MCP vs Jev Agent Skill: which should you pick?

  • Use Jev MCP when you want structured, discoverable tools (jev_decide, jev_guard_action) shared across Claude Code, Cursor, Claude Desktop, and custom MCP hosts with strict Zod input validation.
  • Use the Jev Agent Skill when you want zero-server-process onboarding via skill instructions and direct REST calls from agents that already have shell/HTTP access.

New to Jev’s request format? Walk through our 5-minute How to Use Jev AI guide or explore the full Jev API documentation.

Frequently asked questions

Does Jev MCP work with models besides Jev 1.14?

Yes. Because the MCP server calls https://thejevai.com/v1/systemone, you can pass typesafe/jev-1.14, ~typesafe/jev-latest, cloudflare/clef, or cloudflare/clef-flash in the model parameter without changing your MCP tool contract. See Jev vs Cloudflare Clef for trade-offs.

How fast is a Jev MCP guardrail check?

Typified System One evaluations typically complete in a few hundred milliseconds, making them fast enough to run inline before sensitive tool calls without breaking developer flow.

Do I need a paid plan to test my Jev MCP setup?

You can design and test every question schema for free in the Jev AI Playground with no waitlist. For live MCP server calls via API key, sign in to your workspace and manage keys in Settings → API Keys.

© 2026 Jev AI JournalBack home