
Archytan Lite MCP gate
io.github.High-ArchyTech-Solutions由 GitHub 账号 High-ArchyTech-Solutions 发布v2.8.0更新于 Oct 29, 2026
Puts an MCP tool server behind Archytan Lite: each tool call is authorized and spent before it runs.
概览
一个本地网关,位于 MCP 主机与工具服务器之间,在转发每次工具调用前先完成授权并消耗一次性能力凭证。
- 可以做什么
- 授权并转发工具调用:每次 tools/call 先由 Archytan Lite 策略判定,校验签名回执并兑换一次性能力凭证后才转发给工具服务器
- 隐藏并拒绝未映射的工具:tools/list 只显示配置中映射的工具,其他名称的调用以及 resources、prompts、completion、tasks 一律拒绝
- 把工具映射到策略动作:配置文件为每个工具指定动作、资源类型和标识资源的参数,支持用斜杠拼接多个参数
- 阻止主机扩大范围:移除主机声明的 roots,服务器保留其命令中给定的目录
- 中继两代 MCP 协议,包括 elicitation 与 sampling 往返,并在每一步遵守取消
- 适用场景
- 当希望智能体只能通过一套策略访问工具服务器、由策略决定其可对哪些资源执行哪些动作时使用;也适合希望被拒绝的调用以模型可读的工具错误返回的场景。主要面向已经运行 Archytan Lite 网关服务、并希望该网关成为智能体与工具之间唯一通道的部署。
- 运行要求
- 需要本地二进制或 MCP 捆绑包(macOS、Linux、Windows amd64),或用 Go 自行构建。需要运行中的 Archytan Lite 网关服务且已开启 capabilities,需要由该服务 callergen 生成的凭据绑定调用方令牌文件,以及服务的 Ed25519 回执签名公钥。通过 ARCHYTAN_MCP_GATE_URL、ARCHYTAN_MCP_GATE_CALLER_TOKEN_PATH 和 ARCHYTAN_MCP_GATE_PUBLIC_KEY_HEX 配置,另需 mcp-gate.json 指定工具服务器与工具映射。
安装
在 SourceWeft 中
- 打开 控制台中的 Archytan Lite MCP gate,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
archytan-mcp-gate
archytan-mcp-gate sits between an MCP host (Claude Code, Claude Desktop,
an IDE agent, your own agent) and an MCP tool server. Before any tool call
reaches the server, an Archytan Lite gate
service has to authorize it. The MCP gate checks the signed receipt for that
decision and spends a single-use capability, and only then forwards the call.
A call the policy doesn't allow comes back to the agent as a tool error it
can read, and never reaches the server.
This repository is the MCP gate's source, under the Apache License 2.0. The Archytan Lite gate service it talks to is a separate product, distributed as a signed container image; its quickstart is in archytan-lite-community.
How it works
The host launches the MCP gate in place of the tool server, and the MCP gate
launches the server itself, so it becomes the only path between the agent
and its tools. For every tools/call it:
- asks the Archytan Lite gate service to authorize the action the call maps to, on the resource the call names;
- verifies the receipt the service returns: its fields must hash to the signed intent hash, the signature must be the service's key, and the receipt must describe exactly this call;
- redeems the single-use capability that came with the ALLOW;
- forwards the call to the tool server.
If any step fails, the call is refused and the server never sees it. The agent never holds anything that could skip these steps: the MCP gate holds the agent's credential, and the agent only ever speaks MCP.
Requirements
- An Archytan Lite gate service with capabilities on
(
ARCHYTAN_LITE_CAPABILITIES=on). The tests run against version 2.7.0, the first whose policy can scope a role to named resources. - A credential-bound caller for the agent, made with the service's
callergen. The MCP gate never sends a role; the agent's role is whatever its credential holds.
Install
Download the binary for your platform from this repository's
releases.
SHA256SUMS covers every binary and is signed by the workflow that built
them, with cosign keyless signing:
Or build it yourself with Go:
Each release also attaches archytan-mcp-gate.mcpb, an
MCP bundle for hosts that
install them, and lists it in the
MCP Registry as
io.github.High-ArchyTech-Solutions/archytan-mcp-gate. The host asks for
four things: an mcp-gate.json that names the tool server in its
server field (see Configure), the gate service's URL, the
agent's token file and the service's public key. The bundle carries the
builds for macOS and Linux on amd64 and arm64, and for Windows on amd64,
which Windows on Arm runs under emulation. SHA256SUMS covers it too.
The macOS builds aren't notarized by Apple, so macOS may refuse to run
one that arrived through a browser until you clear its quarantine
(xattr -d com.apple.quarantine <file>).
Configure
Map each tool you want the agent to have to a policy action in
mcp-gate.json. resource_id_arg names the argument that identifies the
resource the call acts on:
Then point the host at the MCP gate instead of the tool server. The same
mcpServers entry works in Claude Desktop's claude_desktop_config.json
and a project's .mcp.json:
The tool server can be named in mcp-gate.json instead of after --,
which suits a host or bundle that only lets you pass a config file:
The host's entry is then "args": ["--config", "/etc/archytan/mcp-gate.json"].
The command runs exactly as written and inherits the MCP gate's
environment, the same as after --. Name the server in one place: with a
server in the config and a command after --, the MCP gate refuses to
start rather than pick one.
mcp-gate.json is read as strictly as host messages are. An unknown
field, a key that repeats or differs only in case at any depth, and text
that isn't valid UTF-8 or escapes an unpaired surrogate all stop the MCP
gate at startup, so a second server can't quietly decide which program
runs.
A resource named by several arguments
Some tool servers name the resource a call acts on with more than one
argument. GitHub's MCP server takes owner and repo separately, and its
write tools add a branch. List them in resource_id_args instead of
resource_id_arg, and the MCP gate joins their values with / into the
resource id it sends:
A push_files call with owner acme, repo web-shop and branch
feature/login is authorized as acme/web-shop/feature/login. With
Archytan Lite 2.7.0's grants, the policy can then scope the agent's role:
The agent can read the acme/web-* repositories and push to their
feature/ branches. A push to main, or to another owner's repository, is
refused.
- Each
resource_id_argsvalue must be a single name. A value containing/or\is refused, because joined with the others it would name a different resource: ownera/bwith repocreads the same as ownerawith repob/c, and only the MCP gate knows which argument a segment came from. resource_id_path_argis joined last and may span several segments, like a branch name. There's at most one, since two values with separators in them could be split more than one way.- Every listed argument must be there as a non-empty string. A missing one is refused, never left out of the id: a tool that fills in a default, such as the default branch, would act on a resource the id doesn't name. Numbers and other types are refused too.
- The joined id is then Archytan Lite's to judge. Under a rule scoped by
resource it refuses
.., empty segments and characters outside its grammar before any grant is matched, sofeature/../maindoesn't reachmain. - Write patterns in the tool's own casing. Lite compares exact bytes and a
grant only allows, so a variant such as
ACME/web-shopis refused.
Scope each tool at the level its id actually names. An argument left out of
the id doesn't narrow anything: push_files takes a files array, so scope
it by repository and branch, never by file path, and get_file_contents
takes an optional ref and a sha that overrides it, so scope reads by
repository. Branch scoping covers only the tools that take a branch; merging
a pull request into main is merge_pull_request, which names a pull
request number, so give it an action of its own.
An MCP gate older than 2.8.0 refuses to start with a config that uses
resource_id_args, rather than ignore it.
What it does on the wire
- Tools the policy doesn't cover are hidden and refused.
tools/listshows the agent only mapped tools, and a call to any other name is refused without reaching the service or the server.resources/*,prompts/*,completion/*,tasks/*and unknown methods are refused, and those capabilities are removed from what the server advertises. - The host can't widen the server's scope. MCP roots let a host tell a server which folders to work in, and servers that honour them (the reference filesystem server, for one) swap their configured folders for the host's list. Behind the MCP gate, the folders you give the server in its command are the ones it keeps: the gate removes roots from what the host declares, answers or refuses a server's request for roots, and drops roots change notifications.
- Both protocol generations pass. The MCP gate relays the
initializehandshake and MCP 2026-07-28:server/discover, requests that carry their own capabilities,input_requiredround trips for elicitation and sampling, andsubscriptions/listen, narrowed to tool list changes. Each round of a call that stops to ask the user something is authorized and spent on its own, since each is a call the server may act on. - A message that reads two ways is refused. JSON parsers disagree on an object whose keys repeat or differ only in case, and on text that isn't valid UTF-8 or escapes an unpaired surrogate. A host message like that is refused before anything is authorized or forwarded, so the MCP gate and the server always agree on the call that was decided.
- Refusals read as tool results. A refused call comes back as a tool
result with
isErrorset and a plain explanation the model can act on. - The agent's trace reaches the decision. A W3C
traceparentin a tool call'sparams._metais passed to the service, so its log lines and version 2 receipt carry the agent's trace id. Trace context never changes a decision. - Calls run in the order the agent issued them, while pings, notifications and cancellations are never held up behind them.
- Cancellation is honoured at every step. Cancelled before the capability is redeemed: nothing is spent or executed. Cancelled after forwarding: the cancellation is relayed to the server, the only party that can still stop it.
- The tool server doesn't outlive the MCP gate. When the gate exits it closes the server's input, then asks the server to stop, then forces it. On Windows the server also runs in a job object, so it's stopped even if the gate itself is killed. Elsewhere a killed gate leaves the server to exit at the end of its input, as MCP stdio servers do.
Tested with
What it doesn't cover
- It protects what the agent reaches through it. Make it the only path: list the tool server only through the MCP gate's entry, and give the server's own credentials to that entry alone. An agent with a general-purpose shell can still start the server by hand, and Claude Code and Claude Desktop give Claude a shell and file tools of their own. For them, locked-workspace makes a workspace where the MCP gate's tools are the only way to the paths you protect.
- The policy decides which actions the agent may take on which resources. Within an allowed action, the server's own arguments and configuration set its reach, including any argument the resource id doesn't name.
- It governs tools. Resources, prompts and completions don't pass.
Security
Report vulnerabilities privately, as SECURITY.md describes. Past advisories are listed there, including GHSA-9ff5-c4g4-rx92, fixed in 2.5.1 and 2.6.0.
Build and test
The tests in testing/mcpgate drive the real binary between a scripted
host, a fixture tool server and a real Archytan Lite gate service. By
default they run the published, signed service image with Docker. To use
local binaries instead, set ARCHYTAN_LITE_BIN and
ARCHYTAN_LITE_KEYGEN_BIN. Without either, they skip and say why; CI sets
ARCHYTAN_MCP_GATE_E2E_REQUIRED=1 so they can't pass by skipping.
Contributions are welcome; see CONTRIBUTING.md.
License
Apache License 2.0; see LICENSE and NOTICE. The Archytan Lite gate service is licensed separately.
来源:README.md,提交 1527d1a
工具
0版本历史
2- v2.8.0最新Oct 29, 2026
- v2.7.0Oct 21, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分