Repository navigation
Releases
Release v1.5.0
Gerrit MCP Server v1.5.0
Minor release — ticket extraction is now configurable through the [bugs] section, so
Jira / Yandex Tracker / custom trackers need no code change. Three Gerrit wire-format
fixes ship alongside it (Bugs: line, file counters, vote noise), and the toolchain
floor moves to Rust 1.99.
What's new since v1.4.1
Configurable ticket extraction ([bugs])
get_bugs_from_cl and the Bugs: line of get_change_details now take their tracker
definitions from configuration instead of hard-coded Bugzilla patterns:
[bugs]
[[bugs.trackers]]
name = "bugzilla"
footer_keys = ["bug", "fixes", "closes"]
footer_value = "(?i)(?:b/)?(\\d+)"
inline = "(?i)\\bb/(\\d+)\\b"
[[bugs.trackers]]
name = "jira"
footer_keys = ["jira", "ticket"]
footer_value = "([A-Z][A-Z0-9]*-\\d+)"
# `inline` omitted deliberately: keys merely mentioned in the body — for example
# "cherry-picked from PROJ-1234-02" — would otherwise be reported as bugs.
[[bugs.trackers]]
name = "yandex-tracker"
footer_keys = ["tracker", "yt"]
footer_value = "((?:TREKER|BUGS)-\\d+)"| Field | Required | Meaning |
|---|---|---|
name |
yes | Tracker name; shown in output when several trackers match |
footer_keys |
yes | Footer line prefixes, matched case-insensitively (ASCII) |
footer_value |
yes | Pattern matched against every footer value token (auto-anchored) |
inline |
no | Pattern searched anywhere in the commit message |
- No section, no change. An absent
[bugs]section — or an empty one — keeps the
built-in Bugzilla set: footersBug:/Fixes:/Closes:with an optionalb/prefix,
plus inlineb/123. Defining at least one tracker replaces that default entirely. - Two phases per tracker. Footer: every line matching
^\s*(?:key1|key2)\s*:\s*(.+)$
is collected, the value is split on commas and whitespace, and each token must match
footer_valueas a whole (the pattern is anchored for you, sofb/123does not
match(?:b/)?(\d+)). Inline: the optional pattern is searched anywhere. - Identifier is capture group 1, or the whole match when the pattern has no groups.
regex-litesubset. Look-around and backreferences are not supported. Patterns are
compiled at startup and validated: an invalid pattern, an emptyfooter_keys, or a
duplicate tracker name aborts with the offending config path
(bugs.trackers[0].footer_value: …) instead of silently extracting nothing. The
effective tracker set is logged at startup.- Non-ASCII keys.
regex-lite's(?i)folds ASCII letters only, so a key such as
Багcontributes both its configured and its lower-cased spelling (Баг:andбаг:);
other mixed-case spellings must be listed as extra keys. - Output stays compatible. A single matching tracker keeps the historical flat form
(12345, 67890); several trackers are grouped by name
(bugzilla: 12345; jira: PROJ-1234).
The configuration reference ships Bugzilla, Jira and Yandex Tracker examples, and both
usage guides document the semantics (docs/en/usage.md, docs/ru/usage.md).
get_change_details: the Bugs: line can now actually appear
ChangeDetail declared currentRevision / currentRevisionNumber, but Gerrit
serialises change details with LOWER_CASE_WITH_UNDERSCORES — the fields are
current_revision and current_revision_number. The mismatch left current_revision
as None on a live Gerrit, so the commit message was never looked up and the documented
Bugs: line was unreachable. Both fields now declare Gerrit's real wire keys, and a
wire-level regression test feeds the real payload shape
(revisions[current_revision].commit.message).
list_change_files: real +N, -M counters and statuses
FileInfo was deserialised with rename_all = "camelCase", while Gerrit sends
snake_case keys (lines_inserted, lines_deleted). Combined with #[serde(default)],
every miss became a silent zero — the tool reported (+0, -0) for every file.
| Payload | Before | After |
|---|---|---|
modified file, no status (Gerrit omits it) |
[?] path (+0, -0) |
[M] path (+42, -7) |
| added / deleted / renamed file | correct status, +0, -0 |
correct status, real counters |
copied file (C) |
[?] |
[C] |
FileInfo no longer renames keys, a missing status maps to M (a plain
modification), and the C (copied) arm was added; unknown statuses still render as ?.
get_change_details: no zero-vote noise, real voter names
With DETAILED_LABELS Gerrit returns an entry with value: 0 for every account
allowed to vote — the tool printed all of them as votes, which could add ~110 lines of
zero-value noise. Only non-zero votes are reported now. The call also requests
DETAILED_ACCOUNTS, so voters render as
Vote Code-Review: 2 (by Jane Doe <jane@example.com>) instead of by account <id>.
MSRV 1.99 & dependency refresh
- Minimum supported Rust version raised to 1.99 (
rust-version = "1.99", edition
2024); the published Docker image is built withrust:1.99.1-alpine3.24. rmcp3.5.0 → 3.9.0,toml1.1.6 → 1.2.1,tokio1.53.1 → 1.54.1,
lru0.18.5 → 0.19.0, plus patch bumps ofrustls(0.23.46),
rustls-native-certs(0.8.5),schemars(1.2.3) andserde_json(1.0.154). No source
changes were needed for these versions.
Upgrade note: publish the image before the config
Config is deserialised with deny_unknown_fields, so an image older than v1.5.0
refuses to start as soon as the config contains [bugs]:
Error: config parse error: failed to parse config file '/cfg.toml': TOML parse error
unknown field `bugs`, expected one of `gerrit`, `service`, `cache`, `rate_limit`, `transport`, `log`
- Deploy order: new image first, then restart with the new config.
- Rollback order: remove
[bugs]from the config, then roll the image back. - The default tracker set stays Bugzilla-only — a Gerrit instance that uses Jira must add
its own[[bugs.trackers]]entry.
Numbers
- Tools: 32 (unchanged — no new tools in this release).
- Tests: 480 (420 at v1.4.1; +60, including wire-level payload tests).
Docker
docker pull rd2w/gerrit-mcp:1.5.0
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.5.0
Links
Release v1.4.1
Gerrit MCP Server v1.4.1
Patch release — fixes query_changes failing with HTTP 400 when options were passed
together with limit, drops the unmaintained rustls-pemfile dependency, and refreshes
the dependency set (rmcp 3.5.0).
What's new since v1.4.0
query_changes no longer rejects options with HTTP 400
Passing options together with limit made every such call fail:
query_changes(query="status:open", limit=2, options=["LABELS"])
→ HTTP 400: "2?o=LABELS" is not a valid value for "-n"
The URL was built as /changes/?q=…&n=2?o=LABELS: the options helper always prefixed
its result with ?, which is only correct when the endpoint has no query string yet. In
query_changes it was concatenated after ?q=…&n=…, so the second ? became part of
the n value and Gerrit rejected it. Without a limit the options were silently
swallowed by the q value instead (no error, no options).
Query strings are now assembled by a single helper that emits ? once, joins pairs with
& and percent-encodes values, so callers never choose a separator themselves:
| Call | Before | After |
|---|---|---|
query_changes, limit + options |
…&n=2?o=LABELS ❌ |
…&n=2&o=LABELS ✅ |
query_changes, options only |
q=status:open?o=LABELS ❌ |
q=status:open&o=LABELS ✅ |
get_change_details, changes_submitted_together, suggest_reviewers |
correct | byte-identical |
query_changes_by_date_and_filters is fixed transitively (it goes through the same
client call).
Unmaintained rustls-pemfile removed (RUSTSEC-2025-0134)
rustls-pemfile was archived in August 2025; the advisory RUSTSEC-2025-0134 flags it as
unmaintained. Its PEM parsing now lives in rustls-pki-types, which rustls 0.23
already re-exports as rustls::pki_types, so parse_certs_from_pem() uses
CertificateDer::pem_slice_iter() and the dependency is gone — no new dependency was
added and certificate loading behaves identically (non-certificate sections are still
skipped, malformed PEM is still an error).
A dependency scan against OSV now reports 0 advisories across the 27 direct
dependencies (was 1).
Dependency refresh
rmcp3.4.1 → 3.5.0 (lockfile only — this bump needed no source changes, unlike
3.2.0 → 3.4.0, which requiredServerInfo→ServerConfig).- 18 transitive updates within existing requirements:
hyper-util0.1.21,
tokio-rustls0.26.6,rustls-platform-verifier0.7.1,quinn-proto/quinn-udp,
cc1.5.1,smallvec,zerocopy0.8.59 and the wasm-onlyjs-sys/wasm-bindgen*/
web-sysset. lrurequirement tightened from"0"to"0.18"— the wildcard allowed breaking 0.x
minor bumps while the code is written against the 0.18 API.matchitstays at 0.8.4: it is pinned byaxum 0.8.x(latest release). Upstream axum
mainalready bumps it to 0.9.2, so it resolves automatically once axum 0.9 ships —
now documented next to the dependency.
Docker
The builder image moves from rust:1.98.0-alpine3.24 to rust:1.98.1-alpine3.24,
matching the toolchain used for local builds and CI. MSRV is unchanged at Rust 1.98.
Numbers
- Tools: 32 (unchanged — no new tools in this release).
- Tests: 420 (407 at v1.4.0).
Docker
docker pull rd2w/gerrit-mcp:1.4.1
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.4.1
Links
Release v1.4.0
Gerrit MCP Server v1.4.0
Maintenance release — related-changes subject fix, get_commit_message fallback for
Gerrit < 3.10, Gerrit API parity fixes, MSRV bumped to Rust 1.98, and a dependency refresh.
What's new since v1.3.0
get_related_changes subject toggle
The relation chain now shows each change's subject. Gerrit's /related endpoint returns
the subject nested under commit.subject, which the model previously ignored — every
relation was displayed as no subject. The subject is now resolved from the nested
commit object (with the flat field kept for compatibility).
get_commit_message works on Gerrit < 3.10
GET /changes/{id}/message was added in Gerrit 3.10. On older instances (e.g. 3.9.x)
the tool now falls back to GET /changes/{id}/revisions/current/commit and returns
CommitInfo.message unchanged. On 3.10+ the verbatim contract is preserved.
Gerrit API parity fixes
publish_draftsnow actually publishes drafts ("drafts": "PUBLISH_ALL_REVISIONS")
and forwardsmessage/labels— previously it returned success while leaving drafts
unpublished ("false success").changes_submitted_togetheraccepts both Gerrit response shapes (bare array and
changes/non_visible_changesobject) instead of failing with a JSON parse error.add_reviewerno longer sendsconfirmed: trueunconditionally — the server's
addreviewer.maxWithoutConfirmationpolicy applies unless explicitly requested.- Draft comments and review comments forward
unresolved/range/embedded suggestions
andlabels; deleting a topic (204, empty body) no longer errors;get_change_details
extracts bugs from the current revision; cherry-pick tools forward
keep_reviewers/allow_conflicts/allow_emptyand chain cherry-picks use the current
revision SHA asbase;query_changes_by_date_and_filtersvalidates both dates and
quotes themessage:filter.
3 new core Gerrit API tools
get_revision_commit (full commit object for a revision), get_related_changes
(relation-chain panel with subject/status), get_git_parent_changes (changes that are
parents of a change via the parentof: query).
MSRV 1.98 & dependency refresh
- Minimum supported Rust version raised to 1.98 (
rust-version = "1.98", edition
2024); the published Docker image is built withrust:1.98.0-alpine3.24. h2bumped 0.4.18 → 0.4.19. Note:matchitstays at 0.8.4 — it is pinned by
axum 0.8.x(the latest release); upstream axummainalready bumps it to 0.9.2, so
it resolves automatically once axum 0.9 is released.
Docker
docker pull rd2w/gerrit-mcp:1.4.0
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.4.0
Links
Release v1.3.0
Gerrit MCP Server v1.3.0
Feature release — set_labels tool, per-request gerrit_base_url override on all write tools, rmcp 3.1.3, and restored container health.
What's new since v1.2.0
set_labels tool
Vote on Gerrit labels (e.g. READY-FOR-CI, TARGET, CI-CLEAN-BUILD) in a single call:
{
"change_id": "85394",
"labels": { "READY-FOR-CI": 1, "TARGET": 3 },
"message": "CI passed, ready for merge"
}Implemented as one POST /changes/{id}/revisions/current/review — no separate
draft comments or inline comments. Complements the existing post_review_comment
for inline feedback.
gerrit_base_url override on all write tools
The per-request gerrit_base_url parameter (previously declared but silently
ignored) now works on every write tool: create_change, set_ready_for_review,
set_work_in_progress, set_topic, abandon_change, revert_change,
revert_submission, submit_change, post_review_comment, post_draft_comment,
delete_draft_comment, delete_draft_comments, publish_drafts, add_reviewer,
cherry_pick_change, and cherry_pick_chain.
The parameter is now optional on these tools (None = configured server),
matching the read tools. All tools resolve the target server through a shared
resolve_repo helper — useful for multi-instance setups.
rmcp 3.1.3 & dependency refresh
- rmcp upgraded 3.1.2 → 3.1.3: client-side OAuth fixes (query-param resource
matching, issuer state retention, discovery probe timeout) - 36 crates refreshed to latest semver-compatible versions (h2, quinn-proto,
rustls-webpki, uuid, futures, icu, …)
Container health restored
/healthz,/readyz,/metricsare public again — token auth applies only to/mcp- Docker healthcheck now resolves
127.0.0.1:${HEALTHCHECK_PORT}${HEALTHCHECK_PATH}
via runtimeENVvars instead of build-timeARGs (previously unset in the
runtime stage, making the container reportunhealthy) HEALTHCHECK_PORT/HEALTHCHECK_PATHcan be overridden in compose via
environment:— e.g. when changing the serverbind_addrport
Docker
docker pull rd2w/gerrit-mcp:1.3.0
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.3.0
Links
Release v1.2.0
Gerrit MCP Server v1.2.0
Feature release — read-only mode, full env var configuration, MCP endpoint auth, refactored codebase, and 8 bug fixes.
What's new since v1.1.1
Read-only mode
Disable all 16 write tools with one flag:
READ_ONLY_MODE=trueOr in config.toml:
[service]
read_only = trueAll read tools (query, get details, list files, list comments, suggest reviewers)
remain fully available. Blocked tools return "Cannot <action> in read-only mode.".
Use for CI pipelines, audit environments, or LLM agents that should only read Gerrit data.
Environment variable overrides
Every config field now has an env var. No more editing config.toml in Docker —
set everything via environment:
GERRIT_URL=https://gerrit.example.com
GERRIT_TIMEOUT_SECS=60
GERRIT_VERIFY_SSL=false
MCP_CACHE_ENABLED=true
MCP_RATE_LIMIT_RPS=20
MCP_TRANSPORT=stdio
MCP_LOG_LEVEL=debug
# ... plus ~20 moreSensitive credentials loaded indirectly — config specifies the env var name,
the code reads the value at startup. Credentials are never in the TOML.
MCP endpoint token authentication
Protect the HTTP MCP endpoint with a Bearer token:
[transport]
mcp_auth_token = "my-secret-token"Or:
MCP_AUTH_TOKEN=my-secret-tokenClients must include Authorization: Bearer <token>. Constant-time comparison
prevents timing attacks. Health/metrics endpoints are not affected.
Refactored codebase
- Monolithic
mod.rs(~800 lines) split intotools.rs,changes.rs,comments.rs,reviews.rs - Prometheus metrics:
tool_calls_total,tool_errors_total,queries_total,uptime_seconds - Cache switched from
DashMaptoLRUwith TTL eviction
Bug fixes
get_commit_messagecorrected (was hitting wrong Gerrit API path)get_file_diffhandler now respectsgerrit_base_urlparameterbuild_options_queryandget_commit_messageURL construction fixed- Topic and reviewer fields properly populated
- Multi-instance support: per-URL Gerrit client cache
- Default bind address:
0.0.0.0→127.0.0.1(security) AuthModeDebug output no longer leaks secrets
CI & infra
- UPX binary compression for
aarch64release binaries - Dependabot target branch set to
dev - Unpinned
reqwestversion constraint
Docker
docker pull rd2w/gerrit-mcp:1.2.0
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.2.0
Links
Release v1.1.1
Gerrit MCP Server v1.1.1
Bugfix and optimization release — rmcp 3.1.2 upgrade, UPX binary compression (34% smaller image), and dependency updates.
What's new since v1.1.0
Fix
- rmcp 3.0.1 → 3.1.2 — MCP protocol conformance fixes: stateless request routing for 2026-07-28, MRTR round-trip support, per-request protocol metadata validation, cancel-safe receive
- Legacy session mode disabled —
StreamableHttpServerConfig::with_legacy_session_mode(false)required when usingNeverSessionManagerin rmcp 3.1.x, otherwise all HTTP requests fail
Docker
- UPX binary compression —
upx --bestin Dockerfile and CI release pipeline - Image size: 35 MB → 23 MB (34% reduction)
Dependencies
- 23 packages updated to latest semver-compatible versions (base64, clap, thiserror, zerocopy, async-trait, aws-lc-rs, etc.)
CI
- Added
install-upxcomposite action for binary release builds - SPDX headers on CI and release workflow files
Docker
docker pull rd2w/gerrit-mcp:1.1.1
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.1.1
Links
Release v1.1.0
Gerrit MCP Server v1.1.0
Upgrade to MCP 2026-07-28 —
stateless Streamable HTTP, protocol negotiation, and multi round-trip requests (MRTR).
What's new since v1.0.0
MCP 2026-07-28 protocol
- rmcp 2.2 → 3.0 — support for the latest MCP specification
- Stateless HTTP —
NeverSessionManagerreplacesLocalSessionManager,
no session tracking, noMcp-Session-Id, no GET/DELETE overhead - Protocol negotiation — server announces both 2026-07-28 (preferred) and
2025-11-25 (legacy fallback) viasupported_protocol_versions() - MRTR — multi round-trip request types handled automatically by
#[tool_router]macro, no handler code changes required
Docker
- Consolidated LABEL into single layer
- Added ghcr.io publishing to release workflow
Documentation
- Usage guides: fake tool names (
list_changes,get_account,list_plugins,
etc.) replaced with the actual 28 implemented tools - Architecture docs: updated for stateless HTTP and 2026-07-28 protocol
- Test count: 102 → 199
Dependencies
- 9 minor updates (schemars, rustls, toml, http, etc.)
Docker
docker pull rd2w/gerrit-mcp:1.1.0
docker pull ghcr.io/rd2w/gerrit-mcp-server:1.1.0
Links
Release v1.0.0
First stable release: Gerrit MCP Server v1.0.0. 🚀
gerrit-mcp-server is an MCP server that exposes a full Gerrit REST API as tools for LLM-powered coding assistants (Claude, Cursor, etc.).
Features
28 MCP Tools
Querying changes
query_changes, query_changes_by_date_and_filters, get_change_details, get_most_recent_cl, changes_submitted_together
Change content
get_commit_message, list_change_files, get_file_diff, list_change_comments, list_draft_comments, get_bugs_from_cl
Change lifecycle
create_change, set_ready_for_review, set_work_in_progress, set_topic, abandon_change, revert_change, revert_submission, submit_change
Code review
add_reviewer, suggest_reviewers, post_review_comment, post_draft_comment, delete_draft_comment, delete_draft_comments, publish_drafts
Cherry-pick
cherry_pick_change, cherry_pick_chain
Authentication
- Bearer token, HTTP Basic, Git cookies
- Host-based
AuthManagerfor multi-instance deployments - Credentials from environment variables only — never stored in config
Transport
- stdio — local subprocess, Claude Desktop,
docker exec - Streamable HTTP — axum + rmcp for multi-client deployments
- Both — simultaneous stdio + HTTP
TLS
- rustls (pure Rust), system trust store, custom CA certs
- Optional verification disable for trusted networks
Caching & Rate Limiting
- In-memory TTL cache (
DashMap-based) - Token-bucket rate limiting (
governor, GCRA)
Health & Metrics
/healthzliveness,/readyzreadiness/metrics— Prometheus (uptime_seconds,tool_calls_total,tool_errors_total)
Docker
- Multi-arch (
amd64,arm64), ~35 MB Alpine image - Docker Compose for local build and Docker Hub
- Air-gapped deployment guide
Documentation
- Bilingual EN/RU docs, README, config examples, contributing guide
Docker
docker pull rd2w/gerrit-mcp:latest