TypeSafe MCP
This server provides nine read-only, idempotent MCP tools that turn free-form state into typed, probabilistic decisions for AI agents, powered by TypeSafe Jev.
evaluate: Run custom typed Jev question sets (noul, choice, or score) and get raw answers with usage.
classify: Pick exactly one label from an unordered set, returning the choice and probability distribution.
score: Rate state against two or more ordered rubric levels, returning a weighted score and distribution.
check: Get a yes/no probability for a single bounded proposition.
verify: Check multiple named claims independently against supplied evidence in one request.
gate: Combine multiple checks with pass/review/fail thresholds to produce a decision signal.
route: Choose one next action from a closed set of actions without executing it.
review: Perform a holistic quality/risk review of a whole artifact (diff, plan, release, report) with pass/review/fail output.
health: Inspect local Arbitype configuration and optionally run an explicit live provider check.
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 MCP Classify this support ticket: "Payment was charged twice" as billing, technical, or other."
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.
Arbitype
What is Arbitype?
Arbitype is an MCP-native typed decision layer for AI agents, powered by TypeSafe Jev. It turns probabilistic judgments into structured decision primitives that an agent or program can consume directly.
Arbitype is available on PyPI and the official MCP Registry.
Arbitype is an independent open-source project. It is not an official TypeSafe AI product or an official integration for any particular agent host.
Related MCP server: jev-mcp
Quick Start
The fastest way to connect an MCP host is a local STDIO server launched by uvx:
export TYPESAFE_API_KEY="your-key"
uvx arbitypeFor a pinned, reproducible launch:
uvx --from 'arbitype==0.7.0' arbitypeOr install the package into the current environment:
python -m pip install arbitype
arbitypeThe API key stays in the process environment. It is not an MCP argument and is never printed to standard output.
Host setup
Inspect detected hosts before writing anything:
arbitype setup --detect --dry-runThen apply a reviewed plan:
arbitype setup codex
arbitype doctor --jsonThe setup flow is plan → unified diff → confirmation → backup → apply. Use claude, cursor, or vscode in place of codex. Detailed host formats, secret forwarding, --yes, --remove, ownership, and non-interactive behavior are documented in docs/HOST_SETUP.md.
Configuration
At minimum, set TYPESAFE_API_KEY. To select a model explicitly:
export TYPESAFE_API_KEY="your-key"
export TYPESAFE_MODEL="jev-latest"See the full configuration reference for endpoints, timeouts, retries, and request/response limits.
Compatibility
arbitype is the canonical distribution, Python package, and CLI. Existing TypeSafe MCP users should migrate to Arbitype; see docs/REGISTRY_MIGRATION.md.
For the safe migration from the historical distribution:
python -m pip uninstall typesafe-mcp
python -m pip install arbitypeSurface | Canonical | Legacy compatibility |
PyPI / CLI | arbitype | typesafe-mcp, typesafe-codex-mcp |
Python imports | arbitype | typesafe_mcp, typesafe_codex_mcp |
MCP tools | route, review | codex_route, codex_review |
Why Arbitype?
Arbitype is designed around contracts and bounded decisions rather than free-form prose:
Principle | What it means |
Contract-first | Requests and provider responses are validated before they reach the agent. |
Safe by default | Credentials stay out of MCP tool arguments and generated host configuration. |
Agent-oriented | Purpose-built classify, verify, gate, route, review, and score primitives. |
Portable | Zero third-party runtime dependencies and standard MCP STDIO. |
Measured | Public tool-selection and decision-stability evaluation assets. |
The decision flow is:
free-form state
↓
TypeSafe Jev
↓
probabilistic judgment
↓
Arbitype
↓
typed decision + probability
↓
agent / code branchReal Use Cases
Start with one of the small, runnable fixtures:
Scenario | Tool | What it demonstrates |
route | Choose one next action without executing it. | |
verify | Check several claims independently. | |
review / gate | Separate holistic review from thresholded checks. | |
route | Keep the next workflow action bounded. |
The example outputs are illustrative fixtures. They are not live model results, accuracy claims, or authorization decisions.
Tools
Arbitype advertises nine read-only, idempotent MCP tools:
Tool | Use when | Result |
evaluate | You need a custom typed Jev question set. | Raw typed Jev response. |
classify | You need one choice from unordered labels. | Choice and probability distribution. |
score | You need one ordered rating or level. | Weighted score and distribution. |
check | You need a probability for one bounded criterion. | Noul yes/no probability. |
verify | You need several named claims checked independently. | Noul answer per claim. |
gate | You need checks and thresholds transformed into a signal. | pass, review, or fail. |
route | You need one suggested next action. | One action; no action execution. |
review | You need a holistic quality or risk assessment. | Review decision and evidence. |
health | You need local diagnostics or an explicit live check. | Configuration and optional provider health. |
Tool Selection Guide
Need | Use | Do not substitute |
One unordered label | classify | route, which selects an action |
One ordered rating | score | classify, which has no order |
One bounded proposition | check | verify, which handles multiple claims |
Several named claims | verify | review, which assesses a whole object |
Checks plus thresholds | gate | review, which is holistic |
One next action | route | classify, which returns a category |
Whole diff, plan, release, or report | review | verify, which answers claim by claim |
Tool descriptions also state USE WHEN and DO NOT USE WHEN boundaries so hosts can select a primitive without hidden prompt conventions.
Probabilities and confidence are model signals, not proof. gate and review are advisory decision transformations, not authorization systems, security boundaries, or approval engines.
Architecture
flowchart LR
host["AI Agent / MCP Host<br/>Codex · Claude · Cursor · VS Code"]
arbitype["Arbitype<br/>Typed decision tools"]
jev["TypeSafe Jev<br/>System One Model"]
env["TYPESAFE_API_KEY<br/>process environment"]
host -->|MCP| arbitype
arbitype -->|validated HTTPS| jev
jev -->|typed probabilistic judgment| arbitype
arbitype -->|structured decision| host
env -. credential .-> arbitypeThe public product is Arbitype; TypeSafe Jev is the current provider. Provider configuration intentionally keeps the TYPESAFE_* names because the credential and endpoint belong to TypeSafe.
Benchmark Snapshot
Recorded on the public 120-case Jev-mediated tool-selection evaluation:
Metric | Result |
Tool-selection accuracy | 96.67% |
Invalid-tool rate | 0% |
Schema-valid rate | 100% |
This is a Jev-mediated evaluation over Arbitype's advertised MCP tool catalog. It is not a Codex, Claude, or Cursor host benchmark and is not a general model-performance guarantee.
Details and reproducible assets:
Security Boundaries
Arbitype is a local MCP adapter and typed decision layer. It is not:
a sandbox for untrusted code;
an authorization or identity system;
a prompt-injection firewall;
a security approval boundary; or
an official TypeSafe AI product.
It does not execute actions suggested by route, edit files, run shell commands, or treat model probabilities as proof. Read SECURITY.md before using live credentials.
Documentation
Glama listing (indexing and metadata refresh may lag publication)
Development
The test suite uses local fakes and does not need an API key:
python3 -m unittest discover -s tests -v
python3 -m compileall -q .
make check
make release-checkThe official MCP Python SDK interoperability smoke test is in scripts/official_sdk_smoke.py. A live Jev check is opt-in and paid:
TYPESAFE_API_KEY="your-key" arbitype doctor --liveNormal CI does not call the provider or run paid benchmarks.
Available Tools
9 toolscheckARead-onlyIdempotent
USE WHEN you need one bounded yes/no proposition and its probability. DO NOT USE WHEN you need to verify multiple named claims (use verify), combine checks with thresholds (use gate), or assess an entire object or review package (use review).
Inputs: state (required), instructions (required), model, true_criteria, +1 more. Returns: type, model, usage, answer, +1 more
classifyARead-onlyIdempotent
USE WHEN you need exactly one label from a closed, unordered set and its probability distribution. DO NOT USE WHEN labels are ordered levels (use score), options are next actions (use route), or inputs are claims (use verify).
Inputs: state (required), labels (required), instructions (required), model. Returns: type, model, usage, answer, +1 more
evaluateARead-onlyIdempotent
USE WHEN you need raw typed Jev answers for one or more bounded noul, choice, or score questions. DO NOT USE WHEN you need prose, code generation, arithmetic, dates, or a specialized primitive such as route or gate.
Inputs: state (required), questions (required), model. Returns: model, usage, answers
gateARead-onlyIdempotent
USE WHEN you need to combine multiple bounded checks and thresholds into pass/review/fail. DO NOT USE WHEN you need claim-by-claim evidence checking (use verify) or whole-object quality/risk assessment (use review). This is not authorization or a security boundary.
Inputs: state (required), checks (required), model, pass_at, +1 more. Returns: type, checks, policy, decision, +1 more
healthARead-onlyIdempotent
USE WHEN you need local Arbitype configuration or an explicitly requested live provider check. DO NOT USE WHEN you need a business decision; health does not evaluate state and does not make a network request unless live=true is explicit.
Inputs: live. Returns: live, type, model, server, +6 more
reviewARead-onlyIdempotent
USE WHEN you need an overall quality or risk review of a whole-object artifact such as a diff, plan, release, or test report against multiple checks. DO NOT USE WHEN you need claim-by-claim verification (use verify), a single proposition (use check), or next-action selection (use route). It returns signals and never edits files.
Inputs: state (required), checks (required), model, pass_at, +1 more. Returns: type, checks, policy, decision, +1 more
routeARead-onlyIdempotent
USE WHEN you need exactly one next action from a closed set of actions. DO NOT USE WHEN you need a topic/category label (use classify), an ordered rating (use score), or action execution. This suggests an action; it never executes it.
Inputs: state (required), actions (required), model, instructions. Returns: type, model, route, usage, +2 more
scoreARead-onlyIdempotent
USE WHEN you need a weighted rating over two or more ordered rubric levels. DO NOT USE WHEN choices are unordered categories (use classify), next actions (use route), or thresholded checks (use gate).
Inputs: state (required), levels (required), instructions (required), model. Returns: type, model, usage, answer, +1 more
verifyARead-onlyIdempotent
USE WHEN you need to check multiple named claims against supplied evidence in one request. DO NOT USE WHEN you need one proposition (use check), an overall quality/risk review (use review), or a pass/review/fail threshold (use gate). Results are signals, not proof.
Inputs: state (required), claims (required), model, true_criteria, +1 more. Returns: type, answers, evaluation
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose, reinforced by explicit DO NOT USE cross-references that map boundary cases to the correct tool. Even the broadest tool, evaluate, is positioned as the raw-answer fallback rather than a competitor to the specialized distribution, threshold, or routing tools.
The tools all follow a consistent lowercase single-word imperative style, which is easy to predict and read. The only minor deviation is health, which is a noun rather than a verb, so the pattern is not perfectly uniform.
Nine tools is a well-scoped count for a typed evaluation and decision primitive library. Each tool represents a distinct decision mode, and none feel redundant, superficial, or missing.
The surface covers raw typed evaluation, classification, scoring, whole-object review, single and multi-claim verification, threshold gating, routing, and health checks. For the apparent purpose of safe, typed decision primitives, there are no significant gaps or dead ends.
Maintenance
Related MCP Connectors
Human-input bridge for AI agents with voice-first answer links, MCP tools, and HTTP APIs.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
16 Bitcoin, business, data, text, and developer tools for AI agents over one MCP endpoint.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable agents to run TypeSafe's Jev judgment model as typed yes/no, choice, and score tools, with calibrated probabilities, confidence thresholds, escalation for uncertain or non-judgment tasks, and an optional action gate that fails open.1MIT
- AlicenseNot gradedqualityBmaintenanceExposes bounded TypeSafe Jev/System One decision primitives as MCP tools, enabling agents to make choices, scores, yes/no judgments, and batched decisions over remote HTTPS with shared state.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agent harnesses to make fast, confidence-aware tool selections using Jev, with planner fallback, hierarchical routing, and optional MCTS lookahead, exposed natively over MCP stdio.24MIT
- AlicenseNot gradedqualityAmaintenanceExposes three stdio tools (jev_ask, jev_rank, jev_check) that return typed judgments—yes/no, choice, and score answers with calibrated probabilities—instead of prose. It runs on an offline mock by default, resolving a live TypeSafe or OpenRouter credential only when configured, and reports all egress on stderr.66 npmApache 2.0