Laya Typed Decisions

io.github.PerryLinkPublished by GitHub account PerryLinkv0.1.5Updated Oct 24, 2026

Typed noul / choice / score judgments from a local Laya model, with token-budget preflight.

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

Local MCP server exposing a Laya PyTorch model for typed yes/no, choice and score judgments, with token-budget preflight and honest confidence reporting.

What you can do
  • Ask the local Laya model typed decisions: yes/no (noul), multiple-choice (choice) and numeric scoring (score)
  • Run a preflight that reports what input would be truncated before a question is sent
  • Receive structured errors naming the offending question, plus a health surface that admits CPU demotion
  • Use a warm HTTP sidecar on localhost so the model loads once instead of per session
  • Register the server with common agent harnesses and check what is installed and whether the GPU works
When to use it
When you want an assistant to get small, local, typed judgments from a Laya model rather than a hosted LLM, and you care about knowing when input was truncated or confidence is unreliable. Suitable for experimentation, not for decisions where accuracy matters.
Requirements
Runs as a local process over stdio. The npm package is only a launcher: you also need Python with the laya-mcp[mcp] package installed, plus PyTorch (about 2 GB) and a model checkpoint (about 650 MB). The launcher must find a working Python interpreter; set LAYA_MCP_PYTHON or activate a virtualenv (VIRTUAL_ENV is honoured, LAYACORE_PYTHON still read). Desktop only.
Before you install
Version 0.1.5 is work in progress and interfaces may change before 1.0. The README states the base checkpoints are near chance on typed decisions, score is the weakest primitive, and confidence is not accuracy, so results should not be trusted for consequential choices. The launcher does not install Python dependencies for you.

Installation

In SourceWeft

  1. Open Laya Typed Decisions in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

laya-mcp

MCP server for Laya typed decisions — noul (yes/no), choice, score — wrapped so it survives contact with a server.

English · 简体中文 · Español · Português · हिन्दी

bash
npx -y laya-mcp --help

Registered as io.github.PerryLink/laya-mcp in the official MCP Registry.

This npm package is a launcher, not an implementation. Laya is a PyTorch model, so the server itself is Python. Installing this package gets you the Node entry point and nothing else; you also need the Python side:

bash
pip install "laya-mcp[mcp]"

npx laya-mcp finds that interpreter, hands stdio to it, and passes the MCP stream through untouched. It does not install anything for you — fetching torch (~2 GB) and a checkpoint (~650 MB) as a side effect of running a command is not something a launcher should do.

If it cannot find your Python

On Windows, python on PATH is often the Microsoft Store execution alias, which is a stub: it cannot import anything, and it sits ahead of your real interpreter. The launcher therefore reports what it tried rather than claiming the package is missing. Point it at the right interpreter either way:

bash
# name it outrightset LAYA_MCP_PYTHON=C:\path\to\python.exe        # Windowsexport LAYA_MCP_PYTHON=/path/to/python           # macOS, Linux
# or just activate the virtualenv you installed into — VIRTUAL_ENV is honoured

LAYACORE_PYTHON is still read. 0.1.0 and 0.1.1 printed that name in the error message, and a launcher that stopped honouring the variable its own previous version told you to set would be worse than one carrying the alias.

Status: 0.1.5, work in progress. The Python core is implemented and covered by CI. The launcher itself is covered by ten checks over interpreter discovery, which is where it has been wrong before. Interfaces may move before 1.0.


Why it exists

Laya truncates things silently and reports none of it:

  • It cuts the state from the end. A long document loses its tail — for a contract or an email thread, often where the answer was — and the model answers about the surviving prefix at full confidence.
  • It shortens options until labels are indistinguishable. Options share a fixed per-question token budget; past a point every label gets ~4 tokens. This is the documented cause of its collapse on high-cardinality choices.
  • Its confidence is not accuracy. It is a normalised entropy, low whenever probability is spread out even when the top option is right, and high on a confident wrong answer.
  • It demotes itself to CPU on a CUDA OOM, permanently, with no flag set — roughly 10-15x slower, and nothing in the response says so.

This package adds a preflight that reports what would be cut, structured errors that name the offending question, an honest confidence contract, and a health surface that admits a demotion.

Usage

bash
laya-mcp serve      # warm HTTP sidecar on 127.0.0.1:8787 (loads the model once)laya-mcp mcp        # MCP over stdiolaya-mcp doctor     # what is installed, and whether the GPU really workslaya-mcp install    # register with whichever agent harness you have

install handles the fact that there is no portable way to register an MCP server: Claude Code (mcpServers), Codex ([mcp_servers.<name>]), opencode (mcp, with an array command), OpenClaw (mcp.servers) and Hermes (mcp_servers) each get the right shape written to the right file, merged and backed up rather than overwritten. pi has no native MCP support and is reported as unsupported.

Prefer serve plus --sidecar over hosting the model in each stdio process: a harness spawns one server per session, and loading a 650 MB checkpoint per session is the main reason a Python-backed MCP server feels slow.

Honest limits

Upstream's own numbers, repeated because an integration that implies otherwise is lying to you: the base checkpoints are near chance zero-shot on typed decisions (0.362 against a 0.461 majority-class baseline); score is the weakest primitive (35% vs 70% in independent measurement); raw calibration error is 0.466 before temperature fitting; and one fixture run answered "A" on 46 of 50 multiple-choice items.

Calibration makes a probability honest; it cannot make a model right.

Licence

Apache-2.0. Laya is Apache-2.0 by Convai Innovations. This is an independent integration, not affiliated with or endorsed by that project.

Source: README.md at commit 6525f30

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

3
  1. v0.1.5LatestSep 22, 2026
  2. v0.1.4Sep 22, 2026
  3. v0.1.3Sep 21, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts