Skip to main content
MCP server CX Codex

Koma Gate MCP — Claude Code MCP server: what it does, how to install

Screens untrusted user prompts for jailbreaks and out-of-scope instructions before an agent executes tools.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env KOMA_PROVIDER=<KOMA_PROVIDER> --env KOMA_MODEL=<KOMA_MODEL> --env GEMINI_API_KEY=<GEMINI_API_KEY> --env OPENAI_API_KEY=<OPENAI_API_KEY> --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --transport stdio koma-gate-mcp -- npx -y koma-gate-mcp
Open on GitHub

What Koma Gate MCP does

The server provides a single tool called classify_input. It inspects incoming text to verify whether an input is permissible. The response contains safety status alongside a descriptive reason.

Classification accepts an optional preset: general, code, support, or reference. By default, it runs the general profile. Backend options include google, openai, anthropic, deepseek, and ollama, with google enabled by default.

Because this filter relies on an underlying language model, it provides heuristic screening rather than a cryptographic security perimeter. You must pass a valid API key for the chosen provider in the environment variables, or tool execution will fail.

What it helps with

  • screen untrusted user text for prompt injection attempts
  • validate code-related inputs using the code preset before running scripts
  • filter out off-topic requests before agents trigger sensitive actions

Example prompts for the agent

  • Use classify_input on this user prompt to confirm it is safe before continuing.
  • Check the ticket description with the support preset to spot jailbreak attempts.
  • Inspect the latest incoming payload to verify whether it stays in scope.

How to install Koma Gate MCP

Platform CLI

claude mcp add --env KOMA_PROVIDER=<KOMA_PROVIDER> --env KOMA_MODEL=<KOMA_MODEL> --env GEMINI_API_KEY=<GEMINI_API_KEY> --env OPENAI_API_KEY=<OPENAI_API_KEY> --env ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> --transport stdio koma-gate-mcp -- npx -y koma-gate-mcp

Replace <…> with your own values. 1 more environment variable is in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Koma Gate MCP

How to install Koma Gate MCP in Claude Code?

Run `claude mcp add koma-gate-mcp -e GEMINI_API_KEY=<GEMINI_API_KEY> -e OPENAI_API_KEY=<OPENAI_API_KEY> -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -e DEEPSEEK_API_KEY=<DEEPSEEK_API_KEY> -- npx -y koma-gate-mcp`. Replace the API key placeholder with your actual credential.

What does Koma Gate MCP do?

It equips the agent with classify_input to evaluate user submissions for prompt injections and scope violations. The tool returns verdict flags along with the model and reason.

What providers are supported by the classifier?

You can route classification through google, openai, anthropic, deepseek, or a local ollama instance. The default configuration targets google using GEMINI_API_KEY.

Similar MCP servers

All MCP servers for Security →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor