MCP server
Local-only stdio server that protects your IDE buffer in real time.
Overview
The MCP server runs locally over stdio. It receives your IDE buffer on every keystroke, scans it sub-50ms, and returns findings inline. No network in deterministic mode. No persistence.
The command ekmire mcp start is meant to be launched by your IDE as a subprocess — not run manually in a terminal. The companion command ekmire mcp audit scans all MCP config files on your system for misconfigurations and can be run manually.
Supported IDEs
Cursor, Claude Code, Continue.dev, Zed. Setup is a single line in your IDE's MCP config file.
// Cursor: ~/.cursor/mcp.json
// Claude Code: ~/.claude/settings.json (under mcpServers)
{
"mcpServers": {
"ekmire": { "command": "ekmire", "args": ["mcp", "start"] }
}
}
See IDE integration for Continue.dev and Zed configs.
Exposed tool: audit_code_buffer
The MCP server exposes one tool: audit_code_buffer. Your IDE calls it automatically; you don't invoke it directly.
| PARAMETER | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| content | string | yes | File content to analyse. |
| filename | string | no | Filename for context (e.g. auth.py). Helps the regex engine match file-type patterns. |
| mode | string | no | deterministic (default) · ai · full. See modes below. |
Modes
- deterministic (default) — regex rules + Python AST only. Sub-50ms. No network. Safe for every keystroke.
- ai — LLM analysis only. Requires authentication and a configured LLM provider.
- full — deterministic first, then LLM. Use for on-save rather than on-keystroke to control token cost.
To enable AI mode, pass --mode=full as an arg in your IDE config:
{
"mcpServers": {
"ekmire": { "command": "ekmire", "args": ["mcp", "start", "--mode=full"] }
}
}
--mode flag sets the default for all calls the IDE makes. The IDE can still override it per-call via the mode parameter in audit_code_buffer.How the IDE flow works
When you add ekmire to your MCP config, your IDE:
- Launches
ekmire mcp startas a subprocess on IDE startup. - Sends an MCP
initializehandshake — ekmire responds with its protocol version and capabilities. - Calls
tools/list— ekmire returns theaudit_code_buffertool schema. - On every buffer change (or on save in full mode), calls
tools/callwithaudit_code_bufferand the current file content. - ekmire returns a JSON array of findings — the IDE renders them as inline annotations.
The process is entirely local. JSON-RPC messages travel over stdin/stdout between the IDE and the ekmire subprocess. Nothing leaves your machine in deterministic mode.
Response shape:
{
"findings": [
{
"severity": "critical",
"rule_id": "HARDCODED_AWS_KEY",
"line": 14,
"description": "Hardcoded AWS Access Key",
"remediation_prompt": "Move to environment variable or secrets manager."
}
],
"total": 1,
"engine": "deterministic",
"latency_ms": 12
}MCP ecosystem audit
A separate command that scans all MCP config files on your system for misconfigurations. Run it manually — it doesn't require a running IDE.
$ ekmire mcp audit
It scans ~/.cursor/mcp.json, ~/.claude/settings.json, VS Code workspace configs, and other known MCP config locations. Results are printed to the terminal and posted to the dashboard under Events → Source: mcp.
What it checks per server entry:
- Is the server bound to
0.0.0.0? (network exposure) - Does the URL have a pinned version hash? (rug-pull risk)
- Are there hidden instructions in tool descriptions? (tool poisoning)
What it catches
MCP tool poisoning, hidden instructions in tool descriptions, MCP servers bound to 0.0.0.0 (network exposure), servers with unpinned/ambiguous command paths, and prompt injection strings embedded in source code before they hit disk.