Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/homebrew-formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Jevgate < Formula
generate_completions_from_executable(bin/"jevgate", "completions")
man1.mkpath
(man1/"jevgate.1").write Utils.safe_popen_read(bin/"jevgate", "man")
%w[auth check baseline rules init serve completions man].each do |command|
%w[auth check baseline rules init serve mcp completions man].each do |command|
(man1/"jevgate-#{command}.1").write Utils.safe_popen_read(bin/"jevgate", "man", command)
end
end
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Notable changes to JevGate. Versions follow [Semantic Versioning](https://semver

## [Unreleased]

- `jevgate mcp` runs a Model Context Protocol server on stdin and stdout, so coding agents can call JevGate as a tool: `jevgate_check` runs a check and returns its findings (an incomplete run is a tool error), `jevgate_findings` reads the last report, and `jevgate_rules` lists the rules.

## [0.18.0] - 2026-09-25

- Documentation site: https://tech-byte-frontier.github.io/jevgate/, with guides, troubleshooting, a page on coding agents, and rules, configuration and command-line references generated from the binary. It is published with each release.
Expand Down
2 changes: 1 addition & 1 deletion site/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import sys
from pathlib import Path

COMMANDS = ["auth", "check", "baseline", "rules", "init", "completions", "man", "serve"]
COMMANDS = ["auth", "check", "baseline", "rules", "init", "completions", "man", "serve", "mcp"]
GROUPS = {
"maintainability": "On by default.",
"tests": "On by default; judged with `--include-tests` or `include_tests = true`.",
Expand Down
22 changes: 22 additions & 0 deletions site/src/coding-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ for a `consider`, fix it or say why the code should stay as it is.
| 1 | The gate failed: act on the findings listed |
| 2 | The run could not finish (no key, provider rejection, request budget); report it, don't treat it as a pass |

## As an MCP server

`jevgate mcp` is a [Model Context Protocol](https://modelcontextprotocol.io) server on stdin and stdout, so an agent can call JevGate as a tool instead of running a shell command. Register it, started in the repository:

```sh
claude mcp add jevgate -- jevgate mcp # Claude Code
```

```json
{"mcpServers": {"jevgate": {"command": "jevgate", "args": ["mcp"]}}}
```

The second form is for clients configured with JSON, such as Cursor. The server offers three tools:

| Tool | What it does |
|---|---|
| `jevgate_check` | Runs `jevgate check` in the repository with `base`, `paths`, `rules`, `include_tests`, `dry_run` or `verbose`, and returns the ranked findings. An incomplete run (exit 2) is a tool error, never a pass |
| `jevgate_findings` | Reads the last report's findings, optionally under one path, without running anything |
| `jevgate_rules` | Lists every rule with the question it asks |

A check runs as a child process with the repository's `jevgate.toml` and key, so the tool reviews exactly what the command line would.

## Structured output

`--format json` prints the full report: every file, finding, raw answer and probability, and the gate. The same report is always written to `.jevgate/latest.json`, whatever the output format, so an agent can run the check once and read the details after. `jevgate check --help` explains its fields.
Expand Down
6 changes: 4 additions & 2 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::{
auth, baseline, cancellation, catalog, config,
config::ConfigContext,
init, manual,
init, manual, mcp,
options::{self, JevCommand},
output, revision, server,
};
Expand All @@ -15,6 +15,7 @@ pub fn run(command: JevCommand) -> Result<u8> {
JevCommand::Completions { shell } => manual::completions(shell).map(|()| 0),
JevCommand::Man { command } => manual::man(command.as_deref()).map(|()| 0),
JevCommand::Init { force } => init(force),
JevCommand::Mcp => mcp::run().map(|()| 0),
command => configured(command),
}
}
Expand Down Expand Up @@ -44,7 +45,8 @@ fn configured(command: JevCommand) -> Result<u8> {
JevCommand::Auth { .. }
| JevCommand::Init { .. }
| JevCommand::Completions { .. }
| JevCommand::Man { .. } => {
| JevCommand::Man { .. }
| JevCommand::Mcp => {
unreachable!("handled before repository configuration")
}
JevCommand::Check(mut args) => {
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ mod inventory;
mod line_ranges;
mod locations;
mod manual;
mod mcp;
mod options;
mod output;
mod packages;
Expand Down
Loading
Loading