npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

laya-mcp

v0.1.5

Published

MCP server for Laya typed decisions (noul / choice / score): a warm model sidecar, token-budget preflight, and honest confidence. Node entry point for the Python package.

Downloads

1,255

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 · हिन्दी

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:

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:

# name it outright
set LAYA_MCP_PYTHON=C:\path\to\python.exe        # Windows
export 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

laya-mcp serve      # warm HTTP sidecar on 127.0.0.1:8787 (loads the model once)
laya-mcp mcp        # MCP over stdio
laya-mcp doctor     # what is installed, and whether the GPU really works
laya-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.