Skip to main content
Glama
jiawei686

jev-domain-mcp

by jiawei686
README.md
# jev-domain-mcp

> ⚠️ **Superseded by single-purpose servers.** This aggregated "two tools in one
> server" repo is kept only as a *reference example* of the bundled approach.
> The recommended layout is **one MCP = one function**. Use these instead:
> - [`jev-review-mcp`](https://github.com/jiawei686/jev-review-mcp) — code-review gate (`review_patch`)
> - [`jev-screen-mcp`](https://github.com/jiawei686/jev-screen-mcp) — content-moderation gate (`screen_content`)

Domain-specific MCP tools powered by [TypeSafe Jev](https://typesafe.ai) — the
System One decision model. The agent gets **typed decisions, not prose**:
each tool pre-builds the Jev questions (candidate sets, rubric, thresholds), so
the host never needs to know Jev's API.

This fills the gap identified in the Jev ecosystem: the *generic* Jev MCP layer
is already crowded (`burnigtm/jev-mcp`, `hangarbay/jev.mcp`, `mcp-typesafe`),
but the *domain* apps in the gallery are standalone CLIs — none expose their
decision function as an MCP tool. This server wraps two of them.

## Tools

| Tool | Domain | What it decides |
|------|--------|----------------|
| `review_patch` | Dev workflow | Patch verdict (approve / request_changes / needs_discussion), safety probability, severity, **auto_merge vs human_review** |
| `screen_content` | Content safety | Spam & toxicity probabilities, category, severity, **allow / review / block** |

Both return a `confidence` (calibration concentration, **not** truth) and an
`action` the agent can branch on directly.

## Install

```bash
npm install
npm run build
```

Set your key (optional — without it the server runs in deterministic **mock**
mode, no network):

```bash
export TYPESAFE_API_KEY=ts_xxx      # live Jev calls
# or
export JEV_MCP_MOCK=1               # force deterministic mock (no key needed)
```

Diagnostics:

```bash
node dist/index.js doctor
node dist/index.js doctor --json
```

## Use

Register the server with any MCP client (Cursor, Codex, Claude Code, WorkBuddy):

```json
{
  "mcpServers": {
    "jev-domain": {
      "command": "node",
      "args": ["/absolute/path/to/jev-domain-mcp/dist/index.js"],
      "env": { "TYPESAFE_API_KEY": "ts_xxx" }
    }
  }
}
```

Then the agent can call `review_patch` and `screen_content` like any other tool.

## How a tool works

```
state (diff / text) ──► Jev: one request, parallel typed questions ──► structured result
```

- `Noul` → 0..1 probability (is it safe? is it spam?)
- `Choice` → pick from a fixed candidate set (verdict, category)
- `Score` → ordinal rubric (severity)

The result includes `probabilities` + `confidence`, and an `action` derived
from a simple confidence gate. **Low confidence always routes to a human /
stronger model** — that is the whole point of a calibrated decision model.

## Constraints (from Jev)

- Pure text input: no image / audio / video.
- State + all questions must fit ~64k tokens total; a single question ≤ 32k.
- Do arithmetic / date math in host code, not in Jev.
- Output is **free**; you pay only for input tokens.

## License

MIT

TDQS

A4.1/5.0

Scored across 2 tools

Disambiguation5/5

review_patch and screen_content operate on entirely different inputs (git diffs vs. text) and produce different domain-specific verdicts. There is no realistic ambiguity about which tool to select for a given task.

Naming Consistency5/5

Both tool names follow the same lowercase verb_noun pattern: review_patch and screen_content. The naming is concise, predictable, and clearly conveys the action being performed.

Tool Count3/5

Two tools is at the low end of acceptable for an MCP server. Each tool is substantive, but the server feels thin for something labeled a 'domain' MCP and would benefit from additional related decision gates.

Completeness3/5

The two exposed gates are self-contained for their specific inputs, but the broader Jev decision-model domain is not fully mapped. There are no tools for configuration, audit feedback, or other content types, which could be notable gaps depending on the intended use.

Maintenance

ActivityMaintained
ResponsivenessNo issues