Skip to content

Serve JevGate to coding agents over MCP - #18

Merged
tauanbinato merged 1 commit into
mainfrom
mcp-server
Sep 26, 2026
Merged

tauanbinato merged 1 commit into
mainfrom
mcp-server

Conversation

@tauanbinato

Copy link
Copy Markdown
Contributor

Left open for review: a new command whose tool names and arguments become an interface agents depend on.

What and why

Phase 5 of the roadmap: jevgate mcp, a Model Context Protocol server on stdin and stdout, so a coding agent calls JevGate as a tool.

claude mcp add jevgate -- jevgate mcp
Tool What it does
jevgate_check Runs jevgate check in the repository (base, paths, rules, include_tests, dry_run, verbose) and returns the agent output with what the exit code means. Exit 2 is returned as a tool error (isError), never as a result
jevgate_findings The last report's findings, ranked, optionally under one path; read-only
jevgate_rules Every rule with its question; read-only
  • Newline-delimited JSON-RPC 2.0, written with serde_json (no SDK dependency): initialize (negotiates 2024-11-05 through 2025-11-25), ping, tools/list, tools/call; other methods get -32601, bad JSON -32700, notifications no reply. instructions tell the agent how to act on each level.
  • A check runs as a child process of the same executable, in the repository root, so nothing it prints reaches the protocol stream and it uses the repository's jevgate.toml and key exactly as the command line would.
  • Tool arguments are passed as --flag=value and paths after --, so a value like --refresh or --config=… can't become a flag.
  • The man page list (Homebrew formula, site reference) includes mcp; the site's coding-agents page documents it.

Questions for review

  • Tool names (jevgate_check, jevgate_findings, jevgate_rules) and the argument set.
  • Should jevgate_check default to dry_run so an agent can't spend credits without asking? Today it follows the repository's budgets (max_requests).

How it was checked

  • Unit tests: initialize and version negotiation, tools/list, unknown methods, parse errors, tool errors, and that tool arguments never become flags.
  • A CLI test drives the server over pipes: a notification gets no reply, a dry-run check returns its headline, a bad base is a tool error, nothing is written.
  • The official MCP Inspector CLI (@modelcontextprotocol/inspector --cli) listed the tools and called each one against a temporary project.
  • While reviewing this change, JevGate flagged site/generate.py for writing rule text into pages unescaped; its input is JevGate's own catalog, but the generator now escapes markup characters anyway (the pages are byte-identical).

jevgate mcp is a Model Context Protocol server on stdin and stdout with three tools: jevgate_check runs a check in the repository as a child process and returns its findings, with an incomplete run as a tool error; jevgate_findings reads the last report; jevgate_rules lists the rules. Tool arguments are passed as --flag=value and paths after --, so none becomes another flag.
@tauanbinato
tauanbinato merged commit 5f76c5c into main Sep 26, 2026
9 checks passed
@tauanbinato
tauanbinato deleted the mcp-server branch September 26, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant