koma-gate-mcp
by swnotmetal
README.md
# 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=google
export 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](../koma-gate/README.md) for the full security boundary and [BENCHMARKS.md](../../BENCHMARKS.md) for evaluation results.
TDQS
A4.1/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there are no possible ambiguities. The single tool 'classify_input' has a clear, distinct purpose.
Naming Consistency5/5
The single tool name 'classify_input' follows a consistent verb_noun pattern (verb 'classify' + noun 'input'), which is clear and predictable.
Tool Count4/5
One tool is minimal but appropriate for a narrowly scoped server focused on a single classification task. It's not trivial—it serves a specific, valuable function as a gatekeeper.
Completeness4/5
The tool covers the core purpose of input safety classification. Minor gaps might include configuration options or status reporting, but the essential functionality is present.
Maintenance
ActivitySlowing
ResponsivenessNo recent community issues