Atlas Mcp

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

Pre-action authorization for AI agents: permit, deny or escalate against a signed delegation chain.

发布方自己的服务:Red Atlas Api

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

概览

AI 生成的概览

让助手在执行删除、部署或花钱等操作前申请预授权,返回 permit、deny 或 escalate 及签名回执。

可以做什么
Atlas 是面向 AI 智能体的行动前授权门禁。智能体在删除数据、部署或花钱之前,用 agent、principal、action、effects 和 delegation_chain 调用 atlas_authorize,得到 permit、deny 或 escalate 以及回执(R19)。执行后再用 atlas_commit_effect 报告实际发生的情况,回执未覆盖的效果会被标记为 violation(R20、R22)。atlas_receipt_status 报告回执状态,atlas_verify_audit 校验 SHA3-256 链与 ML-DSA-65 签名(R23、R24)。决策依据签名授权,链上只能逐级收窄,采用交集语义并默认拒绝(R29、R31、R33)。
适用场景
当智能体会执行可能删除数据、部署、发布或花钱的命令,而你希望留下可验证的授权记录时,值得安装。适合使用 Claude Code 并安装钩子、让检查在模型之外对每次受控工具调用生效的用户(R38、R39)。它是对抗误操作的速度缓冲和审计记录,而不是防范刻意隐瞒意图的智能体的防线(R59)。
运行要求
通过 npx 运行 npm 包 @corpussanctum/atlas-mcp 的本地 stdio 进程,需要 Node.js;全局安装可避免每次工具调用都启动 npx(R39)。未声明认证、环境变量或请求头。数据存放在 ATLAS_MCP_DATA_DIR,默认 ~/.atlas-mcp,包含 issuer.json 与 audit.jsonl(R82)。只有 Claude Code 提供钩子强制点(R68、R69)。
安装前请注意
签发密钥以未加密形式存放在 ~/.atlas-mcp/issuer.json(权限 0600),任何能读取它的人都能伪造授权(R74、R76)。审批仅限本地 shell 访问,v0.1 没有远程审批通道(R77、R78)。分类依赖模式匹配,未识别的命令会按 shell.exec 放行,环境由命令中的 prod 等词推断(R56、R57);效果按分类记录而非实际观测(R60)。钩子失败与权限模式需在升级后重新测试(R61、R63、R65)。它是门禁而非沙箱,仅支持 Claude Code(R68、R71)。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

atlas-mcp

Pre-action authorization for AI agents, as an MCP server.

Before an agent deletes data, deploys, or spends money, it asks Atlas. Atlas checks the request against a signed delegation chain and answers permit, deny or escalate, with a receipt. After acting, the agent reports what really happened with atlas_commit_effect. Every step lands in a hash-chained, ML-DSA-65-signed audit log.

$ npx -y @corpussanctum/atlas-mcp demo
  You (alice) delegate to claude: database work in STAGING only.
  Claude: delete rows in staging    -> PERMIT    rcpt_ec14…  authorized by 1-link delegation chain from user:alice
  Claude: delete rows in PRODUCTION    -> DENY      rcpt_876f…  effect targets environment 'production';                             delegated authority (grant grt_c9c8…) only permits staging
  Claude: write to staging (grant says writes need a human)    -> ESCALATE  rcpt_a8d7…  action 'db.write' requires human approval

Quickstart (5 minutes)

1. Register the server.

Claude Code:

bash
claude mcp add atlas -- npx -y @corpussanctum/atlas-mcp

Claude Desktop (claude_desktop_config.json), or any MCP client:

json
{ "mcpServers": { "atlas": { "command": "npx", "args": ["-y", "@corpussanctum/atlas-mcp"] } } }

Codex (~/.codex/config.toml):

toml
[mcp_servers.atlas]command = "npx"args = ["-y", "@corpussanctum/atlas-mcp"]

2. Delegate authority. You, the principal, issue a grant to the agent:

bash
npx -y @corpussanctum/atlas-mcp grant --principal user:alice --subject agent:claude \  --allow 'db.*' --env staging --escalate db.write --ttl-hours 8# prints the grant JSON; note its "id" (grt_…)

3. Tell the agent the rules. Add to CLAUDE.md / AGENTS.md (see examples/CLAUDE.md.snippet):

Before any destructive, production, deploy or spending action, call atlas_authorize with agent agent:claude, principal user:alice, delegation_chain ["grt_…"], the action and every effect. Proceed only on permit. Afterwards call atlas_commit_effect.

4. Approve escalations as the human. Approval is deliberately not an MCP tool, so an agent cannot approve itself:

bash
npx -y @corpussanctum/atlas-mcp resolve rcpt_a8d7… approvenpx -y @corpussanctum/atlas-mcp verify            # check the audit chain and signatures

Tools

ToolPurpose
atlas_authorize{agent, principal, requested_action, effects[], delegation_chain[]} → {decision, reason, scope, receipt_id}
atlas_commit_effectReport what actually happened under a receipt. One commit per receipt. Effects the receipt never covered are flagged as violation.
atlas_receipt_statusready, pending_approval, rejected, denied, committed, expired
atlas_verify_auditVerify the SHA3-256 chain and every ML-DSA-65 signature

How decisions work

  • A grant says: grantor → subject may do allow actions (minus deny), only in environments, only on resources, with escalate actions needing a human. Grants are signed by the local issuer key and recorded in the audit log.
  • A chain runs principal → agent → sub-agent. It must be unbroken, unexpired, unrevoked, and may only narrow from link to link. A child grant that widens its parent is rejected.
  • Intersection semantics: every link must independently allow the action and each effect. Revoking any link kills everything below it.
  • Fail closed: unknown grants, bad signatures, missing environments under an environment-restricted grant, and malformed requests all deny. The server trusts its own recorded copy of a grant, never the caller's.
  • Receipts expire after 15 minutes. A permit/approval covers the stated effects only.

Enforce it: the Claude Code hook

The MCP tools are a gate the agent chooses to call. The hook makes the check unskippable for Claude Code: it runs outside the model on every gated tool call, so the agent cannot forget, or talk its way past, a deny.

bash
npm i -g @corpussanctum/atlas-mcp       # a global install avoids npx startup cost on every tool callatlas-mcp hook init --principal user:alice

hook init writes ~/.atlas-mcp/hook.json, issues a starter grant (30 days; environments dev and staging; shell.deploy and shell.delete ask first), and prints the settings.json block to paste into ~/.claude/settings.json.

What happens on each tool call

Claude Code tool callAtlas actionResult
npm test in devshell.execno opinion: Claude Code's normal permissions apply
psql … productionshell.exec @ productiondeny: the delegated authority only permits dev, staging
rm -rf dist, git push --force, drop tableshell.deleteask: Claude Code prompts you; acceptance is recorded as the approval
kubectl apply, terraform apply, npm publishshell.deployask
Write / Edit / MultiEditfile.writeby grant
mcp__server__toolmcp.server.toolby grant
Read, Grep, Glob, Atlas's own toolsnot gated

The PostToolUse hook then commits the receipt (success or failure) to the signed audit log. Check it any time with atlas-mcp verify.

Tuning

Edit ~/.atlas-mcp/hook.json:

json
{  "agent": "agent:claude-code",  "principal": "user:alice",  "delegation_chain": ["grt_…"],  "default_environment": "dev",  "environments": [{ "match": "\\b(prod|production|live)\\b", "environment": "production" }],  "rules": [{ "tool": "^Bash$", "match": "^make release", "action": "shell.deploy", "effect_type": "deploy" }],  "on_permit": "defer"}

on_permit: "allow" lets an Atlas permit skip Claude Code's own prompt. The default, defer, keeps Claude Code's prompts as a second layer.

What it does not do (read this)

  • Classification is pattern matching. A command Atlas doesn't recognise is plain shell.exec, and environment is inferred from words in the command (prod, production, staging). ./deploy.sh or a connection string with no environment word passes as dev. Add rules and environments for your own tooling. This is a speed bump against mistakes and a record for audit, not a defence against an agent actively hiding its intent.
  • Effects are as classified, not observed. The audit log records what Atlas judged the call would do, not what the process really did.
  • Hook failures. The hook answers deny when it can catch its own error (missing config, bad grant). A hard crash or timeout is not blocked by Claude Code unless your build supports "onFailure": "block" on the hook handler (documented for recent versions); add it to both hook entries if yours does.
  • Permission modes. Claude Code's docs don't say whether a hook deny survives --permission-mode bypassPermissions. We tested it on Claude Code 2.1.296 (Claude Code): a denied command did not run under bypassPermissions (the control command ran and was committed). Retest after upgrading Claude Code.
  • Self-protection is partial. Edits to ~/.atlas-mcp and commands that name it are refused, but a shell can reach a file by many routes. Run agents as a different OS user from the one that owns the data directory if that matters to you.
  • Claude Code only. Other clients need their own enforcement point.

Read this before you rely on it

  • This is a gate the agent consults, not a sandbox. On its own, an MCP tool cannot stop an agent that decides not to call it, or that lies about its effects. v0.1 gives you a signed, verifiable record and a decision to enforce with: for Claude Code, use the hook above to make it binding; elsewhere pair it with a tool proxy or network/credential isolation. atlas_commit_effect catches and records the mismatches it is told about.
  • The issuer key sits unencrypted in ~/.atlas-mcp/issuer.json (mode 0600). Protect the directory like an SSH key. Anyone who can read it can forge grants.
  • Local operator approval = local shell access. There is no remote approval channel in v0.1.
  • Not a compliance certification. Cryptographic choices follow the parent project's assumptions; no external audit has been done.

Data and config

ATLAS_MCP_DATA_DIR (default ~/.atlas-mcp) holds issuer.json and audit.jsonl. Nothing leaves the machine.

Docker

bash
docker build -t atlas-mcp .docker run -i --rm -v atlas-data:/data atlas-mcp

Relationship to Atlas Protocol

atlas-protocol is the full governance gatekeeper (Telegram operator relay, 96-rule policy engine, agent identity registry, behavioral baselines, proximity). atlas-mcp is its smallest useful piece, extracted so you can install it in one line.

Development

bash
npm install && npm test

Apache-2.0.

来源:README.md,提交 8ce9168

工具

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

版本历史

1
  1. v0.1.1最新Oct 14, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Atlas 集成