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.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機閘道,位於 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 指定工具伺服器與工具對應。
安裝前請注意
閘道持有代理憑證,來自 ARCHYTAN_MCP_GATE_CALLER_TOKEN_PATH 指定的檔案;明文 http 僅允許回送位址。它會授權並轉送可能寫入或刪除資料的呼叫,因此政策範圍很重要:未納入資源 id 的參數不會縮小範圍。它只管控經由它的工具,擁有自身 shell 的代理仍可直接啟動伺服器。macOS 建置未經公證,可能需要清除隔離屬性。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Archytan Lite MCP gate,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

archytan-mcp-gate

[M8ven Score]

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:

  1. asks the Archytan Lite gate service to authorize the action the call maps to, on the resource the call names;
  2. 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;
  3. redeems the single-use capability that came with the ALLOW;
  4. 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:

sh
cosign verify-blob SHA256SUMS --bundle SHA256SUMS.cosign.bundle \  --certificate-identity-regexp '^https://github.com/High-ArchyTech-Solutions/archytan-mcp-gate/\.github/workflows/release\.yml@refs/tags/v' \  --certificate-oidc-issuer https://token.actions.githubusercontent.comsha256sum -c SHA256SUMS --ignore-missing

Or build it yourself with Go:

sh
go install github.com/high-archytech-solutions/archytan-mcp-gate/v2/cmd/archytan-mcp-gate@latest

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:

json
{  "version": 1,  "agent_uid": "agent-invoices",  "tools": {    "delete_invoice": { "action": "invoice.delete", "resource_type": "invoice", "resource_id_arg": "invoice_id" },    "read_invoice":   { "action": "invoice.read",   "resource_type": "invoice", "resource_id_arg": "invoice_id" }  }}

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:

json
{  "mcpServers": {    "invoices": {      "command": "archytan-mcp-gate",      "args": ["--config", "/etc/archytan/mcp-gate.json", "--", "node", "/opt/invoice-server/index.js"],      "env": {        "ARCHYTAN_MCP_GATE_URL": "https://gate.internal:8421",        "ARCHYTAN_MCP_GATE_CALLER_TOKEN_PATH": "/etc/archytan/agent-invoices.token",        "ARCHYTAN_MCP_GATE_PUBLIC_KEY_HEX": "<the gate service's receipt-signing public key>"      }    }  }}
VariableMeaning
ARCHYTAN_MCP_GATE_URLBase URL of the Archytan Lite gate service. Plain http is accepted only to loopback, because every request carries the agent's credential.
ARCHYTAN_MCP_GATE_CALLER_TOKEN_PATHFile holding the agent's caller token.
ARCHYTAN_MCP_GATE_PUBLIC_KEY_HEXThe service's Ed25519 receipt-signing public key, in hex. Receipts signed by any other key are refused.

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:

json
{  "version": 1,  "agent_uid": "agent-invoices",  "server": { "command": "node", "args": ["/opt/invoice-server/index.js"] },  "tools": {    "read_invoice": { "action": "invoice.read", "resource_type": "invoice", "resource_id_arg": "invoice_id" }  }}

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:

json
"get_file_contents": { "action": "repo.read", "resource_type": "repo", "resource_id_args": ["owner", "repo"] },"push_files": { "action": "repo.push", "resource_type": "repo_branch", "resource_id_args": ["owner", "repo"], "resource_id_path_arg": "branch" }

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:

json
{ "action": "repo.read", "grants": [{ "roles": ["repo_agent"], "resource_ids": ["acme/web-*"] }] },{ "action": "repo.push", "grants": [{ "roles": ["repo_agent"], "resource_ids": ["acme/web-*/feature/**"] }] }

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_args value must be a single name. A value containing / or \ is refused, because joined with the others it would name a different resource: owner a/b with repo c reads the same as owner a with repo b/c, and only the MCP gate knows which argument a segment came from.
  • resource_id_path_arg is 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, so feature/../main doesn't reach main.
  • Write patterns in the tool's own casing. Lite compares exact bytes and a grant only allows, so a variant such as ACME/web-shop is 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/list shows 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 initialize handshake and MCP 2026-07-28: server/discover, requests that carry their own capabilities, input_required round trips for elicitation and sampling, and subscriptions/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 isError set and a plain explanation the model can act on.
  • The agent's trace reaches the decision. A W3C traceparent in a tool call's params._meta is 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

Host or serverThrough the MCP gate
MCP TypeScript client SDK 2.3.1, initialize handshakeWorks
Same SDK, auto negotiationWorks. Reaches a server's MCP 2026-07-28 support, and falls back to initialize when the server predates it
Same SDK, pinned to 2026-07-28Works with a 2026-07-28 server. With an older server it fails at connect, as the SDK intends
Same SDK, reusing a cached discovery resultWorks, and the host's roots still don't reach the server
MCP TypeScript server SDK 2.3.1 (both protocol generations)Works with every client mode above
@modelcontextprotocol/server-filesystem 1.0.0 (initialize only)Works, and keeps its configured folder

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

sh
go 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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v2.8.0最新Oct 29, 2026
  2. v2.7.0Oct 21, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分