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

tlaplus-mcp

v1.0.0

Published

TLA+ model checking MCP server

Readme

tlaplus-mcp

A TLA+ model checking MCP server that provides syntax checking (SANY), PlusCal translation, and TLC model checking via the Model Context Protocol.

Requirements

  • Node.js >= 18
  • Java >= 17 (required to run tla2tools.jar)

Setup

npm install
npm run build

Development Commands

npm run dev        # Development mode (tsx watch)
npm run build      # TypeScript build
npm test           # Run tests
npm run pack:check # Check package contents

MCP Client Configuration

Local build:

{
  "mcpServers": {
    "tlaplus": {
      "command": "node",
      "args": ["/absolute/path/to/tlaplus-mcp/build/index.js"]
    }
  }
}

Via npx:

{
  "mcpServers": {
    "tlaplus": {
      "command": "npx",
      "args": ["-y", "tlaplus-mcp"]
    }
  }
}

Tools

sany_parse

Parse and syntax-check a TLA+ specification using SANY.

Parameters:

| Name | Type | Description | |------|------|-------------| | spec | string (required) | TLA+ specification source code |

Example input:

---- MODULE Counter ----
EXTENDS Naturals
VARIABLE count
Init == count = 0
Next == count' = count + 1
====

Example output:

{
  "valid": true,
  "errors": [],
  "rawOutput": "..."
}

pluscal_translate

Translate a PlusCal algorithm embedded in a TLA+ specification into TLA+.

Parameters:

| Name | Type | Description | |------|------|-------------| | spec | string (required) | TLA+ specification containing PlusCal algorithm |

Example input:

---- MODULE SimpleAlg ----
EXTENDS Integers
(* --algorithm SimpleAlg {
  variable x = 0;
  { start: x := x + 1; }
} *)
====

Example output:

{
  "success": true,
  "translated": "---- MODULE SimpleAlg ----\n...",
  "errors": [],
  "rawOutput": "..."
}

tlc_check

Run the TLC model checker on a TLA+ specification to verify invariants and temporal properties.

Parameters:

| Name | Type | Description | |------|------|-------------| | spec | string (required) | TLA+ specification source code | | config | object (required) | TLC model checking configuration | | config.init | string | Init predicate name (e.g. "Init") | | config.next | string | Next predicate name (e.g. "Next") | | config.specification | string | SPECIFICATION name (alternative to init/next) | | config.checkDeadlock | boolean | Whether to check for deadlock (default: true) | | config.invariants | string[] | Invariant names to check | | config.properties | string[] | Temporal property names to check | | config.constants | Record<string, string> | CONSTANT assignments (e.g. {"N": "3"}) | | config.symmetry | string | SYMMETRY set name | | config.stateConstraint | string | State constraint expression | | workers | number | Number of worker threads (default: 1) | | dumpTrace | boolean | Dump counterexample trace as JSON (default: false) |

Example output (success):

{
  "success": true,
  "states": { "found": 10, "distinct": 5, "depth": 4 },
  "violation": null,
  "trace": [],
  "rawOutput": "..."
}

Example output (violation):

{
  "success": false,
  "states": { "found": 8, "distinct": 4, "depth": 3 },
  "violation": { "type": "invariant", "name": "TypeOK" },
  "trace": [
    { "stateNum": 1, "label": "Initial predicate", "variables": { "x": "0" } },
    { "stateNum": 2, "label": "Next", "variables": { "x": "-1" } }
  ],
  "rawOutput": "..."
}

Prompts

  • create_tlaplus_spec — Guides creation of a TLA+ specification with state variables, init, next, and invariants.
  • create_pluscal_algorithm — Guides creation of a PlusCal algorithm for concurrent/distributed systems.

Resources

  • tlaplus://docs — TLA+ quick reference (operators, syntax, standard modules)
  • tlaplus://examples — Example TLA+ specifications (Counter, Mutex, Producer-Consumer, Dining Philosophers)
  • tlaplus://cfg-format — TLC configuration file (.cfg) format reference

License

MIT