tlaplus-mcp
Exposes the TLA+ toolchain (TLC, SANY, PlusCal, TLATeX) as structured JSON tools via the Model Context Protocol, enabling AI assistants to parse, check, simulate, and typeset TLA+ specifications.
README
tlaplus-mcp
MCP server that exposes the TLA+ toolchain (TLC, SANY, PlusCal, TLATeX) as structured JSON tools over the Model Context Protocol.
Any MCP client tlaplus-mcp TLA+ toolchain
┌────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Claude Code│ │ tla_parse │ │ TLC (checker) │
│ Cursor │───MCP────▶│ tlc_check │───Java───▶│ SANY (parser) │
│ custom app │ (stdio) │ tlc_simulate │ │ PlusCal │
└────────────┘ │ tla_evaluate │ │ TLATeX │
│ pcal_translate │ └──────────────────┘
│ tlc_coverage │
│ tla_state_graph │
│ tlc_trace_spec │
│ tla_tex │
│ │
│ tla://specs │
│ tla://spec/{f} │
│ tla://output │
└──────────────────┘
Installation
npx -y @richashworth/tlaplus-mcp
Configure in Claude Code
Add to your MCP server config (.claude/settings.json or per-project .mcp.json):
{
"mcpServers": {
"tlaplus": {
"command": "npx",
"args": ["-y", "@richashworth/tlaplus-mcp"]
}
}
}
The server auto-downloads tla2tools.jar to ~/.tlaplus-mcp/lib/ on first use. Set TLC_JAR_PATH to override.
Prerequisites
- Node.js 18+
- Java 11+ on
PATH(runs TLC and SANY) - LaTeX (optional, for
tla_texonly)
Tools
| Tool | Description |
|---|---|
tla_parse |
Syntax-check a TLA+ module with SANY |
tlc_check |
Run TLC model checker (exhaustive) |
tlc_simulate |
Run TLC in random simulation mode |
tla_evaluate |
Evaluate a constant TLA+ expression |
pcal_translate |
Translate PlusCal to TLA+ |
tlc_generate_trace_spec |
Generate a trace exploration spec from a counterexample |
tlc_coverage |
Run TLC with action coverage reporting |
tla_tex |
Typeset a spec as PDF via TLATeX |
tla_state_graph |
Parse a TLC DOT state graph into structured JSON |
All tools return structured JSON with a raw_output field for fallback. Errors are returned as isError responses so the LLM can adapt.
Resources
| URI | Description |
|---|---|
tla://specs |
List .tla and .cfg files in the workspace |
tla://spec/{filename} |
Read a specific spec file |
tla://output/latest |
Read the most recent TLC output log |
Configuration
| Environment variable | Description | Default |
|---|---|---|
TLC_JAR_PATH |
Path to tla2tools.jar |
Auto-download to ~/.tlaplus-mcp/lib/ |
TLC_JAVA_OPTS |
JVM options | -Xmx4g -XX:+UseParallelGC |
TLC_TIMEOUT |
Max seconds per TLC run | 300 |
TLC_WORKSPACE |
Base directory for specs | Current working directory |
Development
npm run dev # Watch mode (recompile on change)
npm test # Run all tests (unit + integration)
npm run build # Production build
npm run lint # Run ESLint
npm run format:check # Check Prettier formatting
A pre-commit hook (husky + lint-staged) runs ESLint and Prettier on staged files automatically. CI also gates on both.
Testing
The project has two layers of tests:
Unit tests (src/**/*.test.ts alongside source files) — test individual parsers and tool handlers in isolation with mocked Java/filesystem calls.
Integration tests (src/integration.test.ts) — use the MCP SDK's Client + InMemoryTransport to exercise the full protocol round-trip (client → transport → server → tool handler → response) without needing Java installed. These verify tool registration, schema validation, and response shapes.
npm test # Run everything
npx vitest run src/integration.test.ts # Integration tests only
npx vitest run src/parsers/ # Parser unit tests only
npx vitest run src/tools/ # Tool handler unit tests only
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.