Koma Gate MCP

io.github.swnotmetalPublished by GitHub account swnotmetalv0.1.1Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlySecurity & MonitoringAI & ML

Overview

AI-generated overview

A local MCP server that exposes Koma Gate's LLM-based classifier so an assistant can check untrusted input for prompt injection, jailbreaks and scope before it.

What you can do
Classify untrusted text: call classify_input with the user input and an optional preset (general, code, support or reference) to get a verdict back, including whether the input is allowed, whether it is in scope, a reason, the preset used and the model that judged it.
When to use it
Useful when an agent handles untrusted user text and wants a pre-check before acting on it, for example in support, coding or reference workflows where a preset can be chosen. It is a heuristic gate, not a guarantee, so pair it with other safeguards.
Requirements
Runs locally over stdio, typically via npx with the npm package. Needs an LLM provider selected with KOMA_PROVIDER (openai, anthropic, google, deepseek or ollama; default google) and the matching API key: GEMINI_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY or DEEPSEEK_API_KEY. KOMA_MODEL optionally overrides the model. Network access to the chosen provider is required.
Before you install
The untrusted text you submit is sent to the selected third-party LLM provider for classification, so consider data sensitivity. API keys for the provider are read from environment variables and may incur usage costs. The README states this is an LLM-based scope classifier, not a cryptographic prompt-injection defense, so do not rely on it alone.

Installation

In SourceWeft

  1. Open Koma Gate MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: packages/koma-gate-mcp/README.md at commit d31b9f6

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts