Koma Gate MCP

io.github.swnotmetal由 GitHub 帳號 swnotmetal 發布v0.1.1更新於 Oct 24, 2026

Classifies prompt injection, jailbreaks, and out-of-scope user input before agents act on it.

已驗證STDIO僅桌面安全與監控AI 與機器學習

概覽

AI 產生的概覽

一個本機 MCP 伺服器,把 Koma Gate 以大型語言模型為基礎的分類器提供給助理,在採取行動前檢查不可信輸入是否含提示注入、越獄或超出範圍。

可以做什麼
分類不可信文字:呼叫 classify_input,傳入使用者輸入與可選預設(general、code、support 或 reference),取得判定結果,包括是否允許、是否在範圍內、原因、所用預設,以及做出判斷的模型。
適用情境
適合助理處理不可信使用者文字、並希望在據此行動前先做檢查的情境,例如可選擇預設的客服、程式開發或參考資料工作流程。它只是啟發式把关,並非萬無一失,應搭配其他防護措施使用。
執行需求
透過 stdio 在本機執行,通常以 npx 啟動該 npm 套件。需以 KOMA_PROVIDER 選擇大型語言模型供應商(openai、anthropic、google、deepseek 或 ollama,預設 google),並提供對應金鑰:GEMINI_API_KEY、OPENAI_API_KEY、ANTHROPIC_API_KEY 或 DEEPSEEK_API_KEY。KOMA_MODEL 可覆寫模型。需要能連線至所選供應商的網路。
安裝前請注意
送出的不可信文字會傳送給所選第三方大型語言模型供應商進行分類,請留意資料敏感性。供應商金鑰從環境變數讀取,可能產生呼叫費用。README 說明這是大型語言模型式的範圍分類器,並非密碼學上的提示注入防禦,不應單獨依賴它。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Koma Gate MCP

Expose Koma Gate's prompt-injection classification as an MCP tool for AI agents.

bash
npm install koma-gate-mcp

What it does

Provides a single tool, classify_input, that an AI agent can call to check whether untrusted user text is safe and in-scope before acting on it.

Setup

Set the provider and API key:

bash
# Provider: openai | anthropic | google | deepseek | ollama (default: google)export KOMA_PROVIDER=googleexport GEMINI_API_KEY=sk-...

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "koma-gate": {      "command": "npx",      "args": ["-y", "koma-gate-mcp"]    }  }}

Tool: classify_input

  • text (required) — the untrusted user input to classify
  • preset (optional) — general | code | support | reference (default: general)

Returns:

json
{  "allowed": true,  "in_scope": true,  "reason": "in scope",  "preset": "general",  "model": "gemini-2.5-flash"}

Security Boundary

This is an LLM-based scope classifier, not a cryptographic prompt-injection defense. See koma-gate's README for the full security boundary and BENCHMARKS.md for evaluation results.

來源:packages/koma-gate-mcp/README.md,提交 d31b9f6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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