laya
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., "@layaScore these options with laya_predict: approve, reject, escalate — return top choice and confidence."
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.
laya-mcp — Laya × MiMo Desktop
English | 中文
Bridge Laya typed-decision engine into MiMo Desktop. The LLM decides whether to engage Laya (skill rules + tool descriptions); when it does, a local stdio MCP server runs one forward pass and returns choice / score / noul answers with calibrated confidence — no text generation, no hallucination.
Architecture
MiMo Desktop (LLM)
├─ skill: ~/.config/mimocode/skills/laya-mcp/ when to use / not use
└─ MCP stdio: laya_mcp/server.py 4 tools
└─ laya.Router (english + multilingual)Tools: laya_predict · laya_route · laya_preset · laya_status. Contracts: docs/compose/spec/laya-mcp-integration.md.
Related MCP server: jev
Cold-start install
cd <this-repo>
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# RTX 50-series (sm_120) needs the CUDA 12.8 wheel; otherwise CPU-only torch
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt
python scripts\download_models.py # pre-download weights
python -m pytest tests -q # unit tests (no model download)
python scripts\smoke.py # integration smoke (real model)Register the MCP server
Edit C:\Users\<you>\.config\mimocode\mimocode.json — only the top-level mcp section:
{
"mcp": {
"laya": {
"type": "local",
"command": ["cmd", "/c", "C:\\...\\.venv\\Scripts\\python.exe", "C:\\...\\laya_mcp\\server.py"],
"environment": { "LAYA_DEVICE": "cuda", "LAYA_PRELOAD": "1" },
"enabled": true
}
}
}Restart the MiMo Desktop engine (or open a new session) for changes to take effect.
Environment variables
Variable | Default | Description |
| auto | Force |
|
| Preload english+multilingual at startup |
|
| Load Router in the server process (vs first tool call) |
Confidence gating
≥0.85 auto-execute · 0.60–0.85 LLM review · <0.60 escalate / fallback.
Troubleshooting
Symptom | Fix |
| Install the CUDA wheel; otherwise fall back to |
First tool call is very slow | Run |
>20-option choice accuracy drops | Raise |
MCP tools not listed | Validate JSON, use absolute paths, restart the engine |
Poor Chinese / non-Latin results | Use |
Development
Unit tests: tests/ (mocked laya, no network) · Smoke: scripts/smoke.py · Spec: docs/compose/spec/laya-mcp-integration.md
License
MIT — see LICENSE.
中文
把 Laya typed-decision 引擎接进 MiMo Desktop。由 LLM 自行判断是否调用 Laya(skill 判据 + 工具 description 双保险);调用时本地 stdio MCP 做一次前向,返回带校准置信度的 choice / score / noul —— 无文本生成、无幻觉。
架构
MiMo Desktop (LLM)
├─ skill: ~/.config/mimocode/skills/laya-mcp/ 何时该用 / 不该用
└─ MCP stdio: laya_mcp/server.py 4 个工具
└─ laya.Router(english + multilingual)工具:laya_predict · laya_route · laya_preset · laya_status。契约见 docs/compose/spec/laya-mcp-integration.md。
冷启动安装
cd <本仓库>
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# RTX 50 系(sm_120)必须用 CUDA 12.8 wheel,否则会装成 CPU 版
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt
python scripts\download_models.py # 预下载权重
python -m pytest tests -q # 单测(不下载模型)
python scripts\smoke.py # 集成冒烟(真实模型)注册 MCP
编辑 C:\Users\<你>\.config\mimocode\mimocode.json,只改顶层 mcp 段:
{
"mcp": {
"laya": {
"type": "local",
"command": ["cmd", "/c", "C:\\...\\.venv\\Scripts\\python.exe", "C:\\...\\laya_mcp\\server.py"],
"environment": { "LAYA_DEVICE": "cuda", "LAYA_PRELOAD": "1" },
"enabled": true
}
}
}重启 MiMo Desktop 引擎(或新开会话)后生效。
环境变量
变量 | 默认 | 说明 |
| 自动 | 强制 |
|
| 启动时预加载 english+multilingual |
|
| 在 server 进程启动即加载(而非首次工具调用) |
置信度门控
≥0.85 自动执行 · 0.60–0.85 LLM 复核 · <0.60 转人工。
排障
现象 | 处理 |
| 装 CUDA wheel;否则降级 |
首次工具调用极慢 | 执行 |
>20 选项 choice 准确率掉 | 调大 |
MCP 工具没出现 | 检查 JSON、绝对路径,重启引擎 |
中文等非拉丁文结果差 | 用 |
开发
单测:tests/(mock laya,无网络)· 冒烟:scripts/smoke.py · 设计文档:docs/compose/spec/laya-mcp-integration.md
许可证
MIT — 见 LICENSE。
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for ZeroLang, built to return verdicts, receipts, usage logs, and audit-ready JSON
A paid remote MCP for Equibles, built to return verdicts, receipts, usage logs, and audit-ready JSON
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a locally running Kev decision model through MCP tools, returning calibrated probabilities for typed questions such as yes/no, choice, and score.Apache 2.0
- AlicenseAqualityCmaintenanceEnables structured yes/no, choice, and score decisions through MCP, a terminal, or HTTP using a self-hosted DiffusionGemma backend.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to offload quick judgment calls like shipping readiness, file triage, and claim verification to a fast local MCP server with calibrated confidence and safe fallbacks.3MIT
- FlicenseAqualityCmaintenanceEnables running Jev AI typed decisions from any MCP client, returning choices, scores, or yes/no with calibrated probabilities.3-