Alloy MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Alloy MCP Servercheck syntax of this Alloy model: sig A {}"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Alloy MCP Server
A local Model Context Protocol (MCP) server that provides a headless bridge between Claude Desktop and the Alloy Analyzer (Kodkod SAT solver). This allows Claude to write, compile, and execute formal verification models and read the raw mathematical graph structures directly back into its context window.
Features
Fast Syntax Checking: Validates Alloy grammar without booting the heavy SAT solver.
Targeted Execution: Isolate and test specific
runorcheckcommands.Raw Graph Extraction: Exposes the underlying atoms and relations (
ans.toString()) so the AI can reason about the counterexample structurally.Black Box Logging: Automatically saves all system outputs and Java errors to a local text file for manual debugging.
Related MCP server: Claude Code Starter Kit MCP
Prerequisites
To run this server locally, you must have the following installed:
Node.js (v18 or higher)
Java Development Kit (JDK) (v11 or higher)
Claude Desktop App
Installation & Setup
Clone the repository:
git clone (https://github.com/joel6603/alloy-mcp-server.git) cd alloy-mcp-serverInstall Node dependencies:
npm installDownload the Alloy Engine: Download the official Alloy 6 .jar file from AlloyTools. Rename the file to org.alloytools.alloy.dist.jar. Place it directly in the root folder of this project.
Compile the Java Backend
On Windows:
javac -cp "org.alloytools.alloy.dist.jar;." RunAlloy.java
On Mac/Linux:
javac -cp "org.alloytools.alloy.dist.jar:." RunAlloy.java
Connecting to Claude Desktop: Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the server to your configuration, ensuring the absolute path points to where you cloned this repository:
JSON { "mcpServers": { "alloy": { "command": "node", "args": [ "D:/path/to/your/repo/alloy-mcp-server/index.js" ] } } }
Restart Claude Desktop completely.
Available MCP Tools:
check_alloy_syntax: Accepts raw .als code and instantly returns line/column syntax errors.
run_alloy_model: Accepts raw .als code and an optional command_name. Executes the SAT solver and returns the resulting instances or counterexamples as formatted text.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joel6603/alloy-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server