MCP Catalogs
首页

chiasmus

by yogthos·178·综合分 50

Chiasmus 是一个 MCP 服务器,使用 Z3 和 Prolog 为语言模型提供形式化验证能力。

developer-toolssecurityai-llm
9
Forks
4
活跃 Issue
本月
最近提交
2 天前
收录于

概述

Chiasmus 是一个复杂的 MCP 服务器,将自然语言推理与形式化验证相结合。它集成了 Z3(SMT 求解器)和 SWI-Prolog 来验证代码正确性、检测安全策略冲突、分析代码可达性和执行死代码检测。该服务器使用 tree-sitter 进行代码分析,并包含基于模板的系统,将自然语言问题转换为形式化逻辑。 该服务器提供多种工具用于不同的验证任务,从直接的 SMT-LIB/Prolog 执行到高级分析,如调用图遍历、影响分析和代码审查自动化。它支持多种编程语言,并包含缓存以提高性能。创建自定义验证模板的独特能力使其对于专门用例具有高度可扩展性。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:验证前端和后端验证规则之间的一致性
:分析代码库中的调用图以了解数据流和可达性
:在重构前执行死代码检测和影响分析
:Chiasmus 支持哪些编程语言进行代码分析?
:Chiasmus 如何高效处理大型代码库?

什么时候选它

当你需要数学上确定地验证代码属性、安全漏洞或系统行为(超出测试范围)时,选择 Chiasmus。

什么时候不要选它

如果你的需求只需要基本代码分析,或者用例不需要形式化的数学验证能力,请避免使用。

此 server 暴露的工具

从 README 抽取出 11 个工具
  • chiasmus_verify

    Submit raw SMT-LIB or Prolog to get verified results from Z3 or SWI-Prolog solvers

  • chiasmus_graph

    Analyze source code call graphs via tree-sitter + Prolog for code structure, reachability, and impact

  • chiasmus_map

    Generate codebase outline showing exports, imports, and symbols without opening source files

  • chiasmus_skills

    Search the template library for formal verification patterns and examples

  • chiasmus_formalize

    Find the best verification template for a problem and get slot-filling instructions

  • chiasmus_solve

    End-to-end verification using templates, slot filling, and solver validation

  • chiasmus_craft

    Create new verification templates and add them to the skill library

  • chiasmus_review

    Generate a phased code review recipe with verification checks and analysis steps

  • chiasmus_search

    Semantic code search over files using embeddings to find functions by meaning

  • chiasmus_learn

    Extract reusable verification templates from successful solutions

  • chiasmus_lint

    Fast structural validation of specifications without running solvers

可对比工具

semgrep-mcptree-sitter-mcpsonar-mcpverifiable

安装

npm install -g chiasmus

对于 Claude Desktop:

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

FAQ

Chiasmus 支持哪些编程语言进行代码分析?
Chiasmus 内置支持 TypeScript、JavaScript、Python、Go 和 Clojure/ClojureScript。可以通过自定义适配器添加其他语言。
Chiasmus 如何高效处理大型代码库?
Chiasmus 使用内容哈希缓存系统,可以将未更改文件的解析时间减少 60 倍。它使用原生的 O(V+E) 图算法进行可扩展的分析。

chiasmus 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。