typesafe-mcp
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., "@typesafe-mcpGiven our current state, should we accept this new client?"
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.
typesafe-mcp
Deterministic decisions for AI agents — powered by TypeSafe AI's Jev.
npm · Documentation · Issues · Releases
An MCP server that wraps Jev, TypeSafe AI's System One decision model, so any agent can ask typed questions and get structured, auditable answers back — probabilities, confidence, and a threshold-gated act / review / abstain verdict. No generated text, no vibes.
bunx typesafe-mcp # stdio server — add to any MCP host config, doneflowchart LR
A[Agent] -->|tool call| M[typesafe-mcp]
M -->|state + typed questions| J[TypeSafe Jev API]
J --> M
M -->|probability · certainty · decision| AJev — TypeSafe AI's hosted decision model (
jev-latest/jev-1.13.0). Evaluates astateplus typed questions (Noul / Choice / Score) and returns structured answers. It does not generate text, code, or explanations.TypeSafe — the company and API (
api.typesafe.ai/v1/systemone) plus official JS/Python SDKs.This server — a type-safe MCP wrapper.
decisionis computed in code by this server, never Jev's own opinion about whether you may proceed.
Install
Add to any MCP host config — Cursor, Claude Desktop, Claude Code, Windsurf, Cline, or a custom stdio client:
{
"mcpServers": {
"jev": {
"command": "bunx",
"args": ["typesafe-mcp"],
"env": {
"TYPESAFE_API_KEY": "<paste-your-key-here>",
"TYPESAFE_DEFAULT_MODEL": "jev-latest"
}
}
}
}Requires Bun on PATH. That's it — the host spawns a bundled single-file build over stdio. Without a key the server still connects and lists tools; calls return a CONFIG: error telling you where to put it.
git clone https://github.com/MarkChu-git/typesafe-mcp.git && cd typesafe-mcp
bun install
bun run start # stdio server — exits immediately if stdin closesPoint the host at the repo path instead — see examples/stdio.mcp.json and replace /ABSOLUTE/PATH/TO/typesafe-mcp (cursor.mcp.json / claude-desktop.json are the same shape for their respective hosts).
Related MCP server: jev-judge-mcp
What it looks like
// jev_check — "Does this ticket convey urgency?"
// state: "Help! My payouts have been failing for 3 days."
{
"type": "noul",
"probability": 0.95,
"answer": true,
"certainty": 0.9, // |0.95 − 0.5| × 2
"decision": "act", // 0.9 ≥ act_above 0.8
"thresholds": { "act_above": 0.8, "review_above": 0.5 },
"model": "jev-1.13.0",
"usage": { "input_tokens": 307, "output_tokens": 20 }
}Tools
Tool | Question type | Input | Returns |
| — | — |
|
| Noul |
|
|
| Choice |
|
|
| Score |
|
|
| Mixed |
|
|
Every answer also carries certainty, decision, thresholds, model, and usage.
Decision gating
Field | Meaning |
| Noul: |
|
|
| Defaults |
Pin model to a versioned id (e.g. jev-1.13.0) once thresholds are tuned — jev-latest can drift under a calibrated gate.
中文提示:question/state 支持中文,官方建议英文——Jev 按字面理解,中文问题准确率略低。decision/certainty/thresholds 语义与语言无关。
Errors
Every failure returns isError: true with a category prefix:
Category | Cause |
|
|
| Bad arguments — names the offending field |
| API rejected the key |
| Throttled — hint: batch questions through |
| API-side 5xx after retries |
| Exceeded |
| API rejected the payload (422) — includes field path |
Keys are redacted from error text; diagnostics go to stderr, never stdout.
Development
Bun only — no Node/npm/pnpm/yarn/npx.
bun test # unit + in-process MCP tests (no key needed)
bun run test:integration # live API — skips entirely without TYPESAFE_API_KEY
bun run typecheck # tsc --noEmit
bun run lint # oxlint
bun run inspect # MCP Inspector over stdio
bun run scripts/record-fixture.ts # re-record tests/fixtures from the real API (needs key)CI: tsc + oxlint + bun test on Ubuntu (required) and macOS/Windows, CodeQL, dependency review, actionlint, zizmor. Releases publish via OIDC trusted publishing with --provenance — no long-lived npm token. See CONTRIBUTING.md.
Roadmap
Not implemented yet:
Streamable HTTP transport (
createMcpHandler+ Hono/Bun.serve) for remote/shared deploymentsObject-shaped
instructionson questions (structured prompts referencingstatefields)Opinionated tools (
jev_gate/jev_screen/jev_match) — pending the first business-scenario decision
License
MIT · Research notes: docs/research-jev-typesafe-mcp.md · Plan: docs/plan-build-jev-mcp.md
This server cannot be deployed
Maintenance
Related MCP Connectors
- DatagoatOAuthio.datagoat
Governed decision engine: yes/no, score, choice and rank answers about cases, from past outcomes.
Give any AI agent a way to ask a person — for approval, a decision, an answer or a review.
Decision intelligence for AI agents: due diligence, risk, property, documents, finance and more.
Jev-powered decisions, web search, PDF/web to Markdown, summarize. From $0.001, no API key.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides coding agents and CI with a typed decision layer that sends bounded state and questions to Jev, then returns deterministic actions for review, risk assessment, requirement checks, and verification.91,141 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to consult TypeSafe's Jev through a judge tool, answering narrow typed questions with calibrated probabilities instead of prose.597 npm1MIT
- AlicenseAqualityCmaintenanceEnables coding or reasoning agents to request structured judgments from TypeSafe's Jev model at decision points, including choices, scores, claim verification, and code reviews, with probabilities and confidence returned as data.5173 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable agents to query the NanoJev decision service in natural language for boolean, choice, and score evaluations across decision-loop stages such as feasibility checks, action selection, risk assessment, and look-ahead planning.MIT