Jev and Laya in Claude Code: Official Skill, MCP and Setup
Use Jev and Laya in Claude Code, Codex and other coding agents: install TypeSafe's official Jev skill, or run Laya locally for free through MCP.
Claude Code, Codex and other coding agents can use System One models as a fast decision layer: instead of spending LLM tokens on every small judgment (does this diff need tests? which file is relevant? is this task done?), the agent sends typed questions and gets probabilities back. This guide covers both options: the hosted Jev API with TypeSafe's official agent skill, and a local, free setup with Laya through MCP.
| Jev (TypeSafe) | Laya (local) | |
|---|---|---|
| How Claude Code gets it | Official agent skill (Claude Code plugin) | MCP server: laya-mcp-server or ollaya |
| Runs | Hosted API, needs an API key | On your machine, no key |
| Cost | $0.042 per million input tokens | Free (Apache 2.0) |
| Best for | Writing Jev integrations into your app; highest accuracy | Private, offline or high-volume checks inside the agent |
Use Jev in Claude Code: the official TypeSafe skill
TypeSafe publishes an MIT-licensed agent skill that teaches a coding agent how to build on Jev. Install it as a Claude Code plugin:
claude plugin marketplace add typesafe-ai/skills
claude plugin install typesafe@typesafe-ai
For Codex and other agents, run npx skills add typesafe-ai/skills --skill typesafe-ai and pick your agent. In Claude Code you can then invoke /typesafe:typesafe-ai or simply say "use the TypeSafe skill" in a prompt. TypeSafe suggests starting with a brainstorming prompt such as: "Using the TypeSafe skill, explore the project and find opportunities for using intelligent judgement to stand in for complex parsing or other fragile code."
Sources: TypeSafe agent skill docs and the typesafe-ai/skills repository.
What the skill changes
Left alone, coding agents tend to call Jev one question at a time and guess field names. The skill makes the agent work in a different order:
- Read the live docs first. The skill points the agent at TypeSafe's documentation index and the API or SDK reference before any code is written, instead of relying on memory.
- Start from the behavior. Decide what the application should show, select or hand off, then work backward to the judgments it needs. Rules, calculations and lookups stay in code.
- Design narrow judgments. One coherent judgment per question, with the context it needs in the state and a "no match" option when nothing may fit.
- Ask independent questions in one request. Questions over the same state run in parallel, so they belong in a single call.
- Let code decide. Use probabilities and confidence with thresholds tested on your own data; send uncertain cases to a person or a larger model.
Why one request matters
Each Jev request is billed on its input tokens, and the shared state is read once per request. In TypeSafe's parallel questions cookbook, asking 13 questions about one document in a single call was 12.2x cheaper and 10x faster than 13 separate calls, with the same answers.
Which question type to pick
| You need | Question type | Returns |
|---|---|---|
| One option from a defined set | choice | The option, a probability for each option, confidence |
| Whether a condition holds | noul | The probability that the answer is yes |
| A position on an ordered scale | score | The expected level, a probability for each level, confidence |
More on the three types and pricing: What is Jev?
Use Laya in Claude Code: local and free
Laya answers the same kinds of questions on your own hardware. Claude Code talks to it through MCP.
Option 1: the official Laya MCP server
The laya package ships an MCP server with four tools: laya_predict, laya_route, laya_preset and laya_status.
pip install "laya[mcp]"
claude mcp add laya -e LAYA_DEVICE=cpu -- laya-mcp-server
It preloads the English and multilingual checkpoints. Use LAYA_DEVICE=cuda or mps if you have a GPU or an Apple Silicon Mac. More options: Self-host Laya.
Option 2: ollaya
ollaya runs Laya and other open decision models the way Ollama runs LLMs, and exposes them over MCP:
curl -fsSL https://ollaya.dev/install.sh | sh
claude mcp add ollaya -- ollaya mcp
npx skills add ollaya-dev/ollaya --skill ollaya-decisions
The ollaya-decisions skill teaches the agent when and how to call the models.
Laya or Jev inside an agent?
- Choose Laya when the decisions are simple (a handful of options), the data must stay local, or the agent makes thousands of checks.
- Choose Jev when accuracy matters most, you need many options or non-English input, or you are building the integration into a product. In our System One benchmark, Jev was clearly more accurate out of the box, while Laya answered locally in 10 to 50 ms.
A Laya skill for coding agents
The yanng-laya-skill is an unofficial community agent skill (MIT) that does for Laya what TypeSafe's skill does for Jev: it teaches the agent when a judgment should go to Laya, how to write questions it answers well, how to gate on answer_confidence, and how to handle many labels and other languages. It was written by the author of this site and tested with Laya 0.3.20.
claude plugin marketplace add xiaoyanng/yanng-laya-skill
claude plugin install yanng-laya-skill@yanng-laya-skill
For other agents: npx skills add xiaoyanng/yanng-laya-skill --skill yanng-laya-skill. Pair it with the MCP server above so the agent can run Laya directly.
Community projects
| Project | What it does |
|---|---|
| quicksilver | Claude Code skill that hands bulk judgment calls to Jev; reports 86% fewer Claude tokens on its 12-task benchmark |
| claude-x-jev | Lets Claude Code use Jev through OpenRouter to sort, check, score and verify items |
| claude-jev | MCP server exposing Jev's choice, noul and score questions to Claude Code |
| omp-laya-judge | Local Laya judge (MCP server and skill) for the oh-my-pi coding agent |
Figures are the projects' own. See Laya integrations and Laya projects for more.
FAQ
Is there an official Jev skill for Claude Code?
Yes. TypeSafe publishes the typesafe-ai skill as a Claude Code plugin (claude plugin install typesafe@typesafe-ai). It also works with Codex and other agents through npx skills add.
Does the skill need an API key?
The skill itself does not; it teaches the agent how to write Jev code. The code it writes calls the Jev API, which needs a TypeSafe API key, or you can call Jev through OpenRouter or Vercel AI Gateway.
Can I use Laya with Claude Code for free?
Yes. Install laya[mcp] and register laya-mcp-server with claude mcp add, or use ollaya. Everything runs locally with no per-request cost.
Does Laya work with Cursor, Codex or Claude Desktop?
Yes, through MCP. Any MCP client can run laya-mcp-server or ollaya mcp; configure it the same way as any other stdio MCP server.
Related
- What is Jev?: pricing, API access and limits
- How to use Laya: write typed questions step by step
- Laya and Ollama: run Laya locally with ollaya
- Laya integrations: MCP, browser agents and developer tools
Last verified against TypeSafe's documentation and the linked repositories: September 27, 2026.