Legalithm Mcp Server

io.github.PedramMadani由 GitHub 账号 PedramMadani 发布v0.2.1更新于 Oct 24, 2026

EU AI Act risk classification, obligations and Article 50 disclosures. Offline, no API key.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

一个离线 MCP 服务器,可按欧盟人工智能法案对 AI 功能做风险分级、解释义务并生成第 50 条披露内容。

可以做什么
提供四个工具:classify、explain_obligation、generate_disclosure 和 check_record。前三个完全离线运行,返回风险等级以及引用的条款和附件、义务标题、适用期限、命中的规则、语料日期和置信度分数。低于弃权阈值时会设置 reviewRequired,建议交由人工复核而不是猜测。check_record 会读取一个公开 API。
适用场景
适合在开发或审查可能面向欧盟用户的 AI 功能时使用,可在编辑器内获得关于风险等级和透明度义务的带引用起点。也适合起草第 50 条内容标注披露,或在 CI 中检查已提交的合规记录。
运行要求
通过 stdio 在本地运行,通常使用 npx legalithm-mcp-server;未声明需要 API 密钥或环境变量。可选的命令行内容标注功能需要全局安装 npm 包,并依赖可选原生依赖 c2pa-node 和 sharp。合规记录命令(init、check)以及 GitHub Action 需要免费 API 密钥,示例中通过 LEGALITHM_API_KEY 密钥传入。
安装前请注意
输出只是带引用的起点,不构成法律意见或认证,且可能被标记为需要人工复核。内容标注示例使用测试证书签名,证书有效但未列入信任列表。记录命令和 GitHub Action 会把数据发送到托管服务并需要 API 密钥;离线工具则不会。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Legalithm Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Legalithm — EU AI Act compliance in your coding loop

[npm version] [Add to Cursor]

Shipping an AI feature to EU users? Article 50 transparency duties have applied since 2 August 2026. Content marking for systems placed before that date is due 2 December 2026, and Annex III high-risk obligations follow on 2 December 2027. Catch it where you code, in seconds.

[Source code on the left, connected by four branching lines to a sealed legal document on the right.]

This image is AI-generated, and it is marked as such with our own tool: legalithm mark --watermark added a C2PA content credential and a pixel watermark, which is what Article 50(2) asks for. Download it and run legalithm verify on it. The credential is signed with the CLI's test certificate, so it is valid but not trust-listed.

Quickstart

Install the offline server in your editor. No API key, and nothing leaves your machine.

bash
claude plugin marketplace add legalithm-org/legalithmclaude plugin install legalithm@legalithm

Codex:

bash
codex plugin marketplace add legalithm-org/legalithmcodex plugin add legalithm@legalithm

Cursor: use the Add to Cursor badge above.

Then ask your agent "does the EU AI Act apply to this feature, and what tier?"

What comes back (real output, CV screening as the provider)
json
{  "risk": "high",  "confidence": "high",  "rationale": "This AI system is classified as high-risk under Article 6(2) as it falls into the category of Employment, Workers Management and Access to Self-employment as specified in Annex III...",  "citations": [    {      "article": "6(2)",      "annex": "III",      "label": "Article 6(2) & Annex III - High-Risk AI Systems",      "url": "https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=OJ:L_202401689#article-6",      "asOf": "2026-08-03",      "appliesFrom": "2027-12-02"    }  ],  "matchedRules": ["high_risk_employment", "high_risk_domain_selected"],  "applicableDeadline": "2027-12-02",  "obligationsHint": {    "count": 10,    "topTitles": [      "Quality Management System (Article 17)",      "Data Governance (Article 10)",      "Technical Documentation (Article 11)",      "Human Oversight (Article 14)"    ]  },  "confidenceScore": 0.72,  "reviewRequired": false}

Note matchedRules, asOf and confidenceScore. You can see which rule fired, how old the corpus is, and how sure the engine was. Below the abstention threshold it sets reviewRequired and tells you to get a human instead of guessing.

Content marking for Article 50(2), also no key:

bash
npm i -g legalithmlegalithm mark ./out.png --watermark   # writes out.signed.pnglegalithm verify ./out.signed.png      # detect both layers

Install it rather than using npx for these two: C2PA and the watermark come from c2pa-node and sharp, which are optional native dependencies that npx does not reliably fetch. Without them mark warns and marks nothing. Everything else in this README works fine under npx.

The compliance record (needs a free key)

bash
npx legalithm setup   # wires hooks, editor rule and MCP confignpx legalithm init    # writes a dated, cited compliance/legalithm.jsonnpx legalithm check   # re-verify; non-zero exit on drift (for CI)

init and check talk to the hosted record service, so they need a free API key. Everything above this line does not.

Three surfaces

  1. Editor — an offline MCP server (legalithm-mcp-server) exposing 4 tools (classify, explain_obligation, generate_disclosure, check_record). No API key. The first three run fully offline; check_record reads a public API.
  2. Repo — legalithm init writes a dated, cited compliance/legalithm.json that records your AI system's risk tier and the obligations behind it.
  3. CI — legalithm check and the GitHub Action fail the build when the committed record drifts — because your app changed or the law changed under you.

MCP config

Add the offline server to Claude Code, Cursor or Codex manually:

json
{  "mcpServers": {    "legalithm": {      "command": "npx",      "args": ["-y", "legalithm-mcp-server"]    }  }}

GitHub Action

yaml
# .github/workflows/ai-act.ymlname: AI Acton: [pull_request]jobs:  ai-act:    runs-on: ubuntu-latest    steps:      - uses: actions/checkout@v4      - uses: legalithm-org/legalithm/packages/action@v1        with:          api-key: ${{ secrets.LEGALITHM_API_KEY }}

Honest framing

A cited starting point that tells you when to get a human — not legal advice. When unsure, it flags the result for review instead of guessing. Every output is checked against Regulation (EU) 2024/1689; it is not a certification.

Links

License

MIT

来源:README.md,提交 4c5717e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分