chiasmus
by yogthos·★ 178·Score 50
Chiasmus is an MCP server that provides LLMs with formal verification capabilities using Z3 and Prolog.
Overview
Chiasmus is a sophisticated MCP server that bridges natural language reasoning with formal verification. It integrates Z3 (SMT solver) and SWI-Prolog to verify code correctness, detect conflicts in security policies, analyze code reachability, and perform dead code detection. The server uses tree-sitter for code analysis and includes a template-based system to translate natural language problems into formal logic. The server offers multiple tools for different verification tasks, from direct SMT-LIB/Prolog execution to high-level analysis like call graph traversal, impact analysis, and code review automation. It supports multiple programming languages and includes caching for improved performance. The unique ability to create custom verification templates makes it highly extensible for specialized use cases.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose Chiasmus when you need mathematically certain verification of code properties, security vulnerabilities, or system behavior beyond testing.
When NOT to choose this
Avoid if you need only basic code analysis or if your use case doesn't require formal mathematical verification capabilities.
Tools this server exposes
11 tools extracted from the READMEchiasmus_verifySubmit raw SMT-LIB or Prolog to get verified results from Z3 or SWI-Prolog solvers
chiasmus_graphAnalyze source code call graphs via tree-sitter + Prolog for code structure, reachability, and impact
chiasmus_mapGenerate codebase outline showing exports, imports, and symbols without opening source files
chiasmus_skillsSearch the template library for formal verification patterns and examples
chiasmus_formalizeFind the best verification template for a problem and get slot-filling instructions
chiasmus_solveEnd-to-end verification using templates, slot filling, and solver validation
chiasmus_craftCreate new verification templates and add them to the skill library
chiasmus_reviewGenerate a phased code review recipe with verification checks and analysis steps
chiasmus_searchSemantic code search over files using embeddings to find functions by meaning
chiasmus_learnExtract reusable verification templates from successful solutions
chiasmus_lintFast structural validation of specifications without running solvers
Comparable tools
Installation
npm install -g chiasmusFor Claude Desktop:
{
"mcpServers": {
"chiasmus": {
"command": "npx",
"args": ["-y", "chiasmus"]
}
}
}FAQ
- What programming languages does Chiasmus support for code analysis?
- Chiasmus has built-in support for TypeScript, JavaScript, Python, Go, and Clojure/ClojureScript. Additional languages can be added via custom adapters.
- How does Chiasmus handle large codebases efficiently?
- Chiasmus uses a content-hash cache system that can reduce parsing time by 60x for unchanged files. It uses native O(V+E) graph algorithms for scalable analyses.
Compare chiasmus with
Last updated · Auto-generated from public README + GitHub signals.