Skip to main content
Glama

Koma Gate MCP

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

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.

Related MCP server: agent immune

Setup

Set the provider and API key:

# 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:

{
  "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:

{
  "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.

Available Tools

1 tool
classify_inputA

Check whether user input is safe and in-scope before an AI system processes it. Detects prompt injection, jailbreak attempts, instruction overrides, and off-topic requests. Use this to validate untrusted user text before passing it to an LLM or executing a tool.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe untrusted user input to classify
presetNoWhich guard domain to use. Default: general knowledge assistant

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It explains the tool checks for attack types (prompt injection, jailbreak, etc.) and off-topic requests, but does not specify what output format or classification labels are returned, nor whether it modifies state or requires special permissions. This leaves behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the primary purpose, and wastes no words. It efficiently communicates the tool's function and when to use it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a classification tool with no output schema and no sibling tools, the description covers the input purpose and usage context. However, it lacks details on return values, classification categories, and edge cases, which reduces completeness for an agent needing to interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description does not add additional semantics beyond what the schema provides (e.g., it does not explain the 'preset' enum options or their implications), so a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool checks user input for safety and scope before AI processing, specifically detecting prompt injection, jailbreak attempts, instruction overrides, and off-topic requests. This provides a precise verb-resource combination and distinguishes its purpose as a safety validator.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises using this tool 'before passing it to an LLM or executing a tool,' and notes it validates 'untrusted user text.' While there are no sibling tools or explicit when-not-to alternatives provided, the guidance is clear and actionable for its intended use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.1
    • First observedclassify_input

TDQS

A4.1/5.0
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

ActivityActive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A lightweight stdio proxy that intercepts and rewrites MCP tool annotations to bypass security approval prompts in AI CLIs like Codex and Claude Code. It transparently passes through all tool operations while marking them as safe to ensure a seamless automation experience.
    28
    10
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Adaptive security for AI agents: assess inputs for prompt injection, scan outputs for credential/PII leaks, teach new attack patterns to semantic memory, harden prompts, and monitor metrics. Runs locally via MCP stdio.
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Drop-in stdio interceptor that gates MCP tools/call requests through a YAML policy (block / require_approval / audit / budget cap) before they reach the real server. The same policy file is reused by @jamjet/claude-code-hook and @jamjet/openai-guardrail, so one rule set covers Claude Desktop, Cursor, OpenAI Agents, and custom clients.
    3
    2
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Provides AI ingress governance by masking prompts, classifying risk, and enforcing tool policies before agent calls reach model providers or sandboxes.
    6
    1
    AGPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swnotmetal/Project-Koma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server