laya
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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: decidealot
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。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A paid remote MCP for ZeroLang, built to return verdicts, receipts, usage logs, and audit-ready JSON
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables running Jev AI typed decisions from any MCP client, returning choices, scores, or yes/no with calibrated probabilities.311 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables local typed decision-making over MCP Streamable HTTP, running Laya and Von models to turn arbitrary state into choice, score, and yes/no answers with probabilities.3Do What The F*ck You Want To Public
- AlicenseAqualityBmaintenanceEnables coding agents to query a local Clef decision model for structured probability distributions over allowed answers, returning typed decisions for next actions, confidence scores, and yes/no questions through MCP stdio.1241 npm8Apache 2.0
- AlicenseNot gradedqualityBmaintenanceExposes local MCP tools for typed, calibrated LLM decisions — gating risky actions, yes/no judging, classification, ordinal rating, and multi-question decisions in one pass. Runs on the model Devin's CLI already provides via ACP (or a fully offline local backend), so agents get calibrated confidence with no extra API key, no Ollama, and no waitlist.52 PyPI6MIT