pr-council-mcp
Platform support: macOS and Linux. Linux needs a few system packages and kernel features for its sandbox; see the Quickstart.
Illustrative, time-compressed replay with a fictional PR. Open the interactive version and transcript.
pr-council-mcp is a playground for agentic engineering end to end. It explores production concerns such as durable
workflows, model coordination, sandboxed tools, secrets, human approval, and observability in a local environment with
a small footprint: one stdio MCP server backed by SQLite, without a service stack to deploy.
The concrete application is multi-model review of GitHub pull requests. Independent quality and security reviewers
inspect a PR, deliberate over their findings to remove disproven claims and correct overstated ones, and combine the
remaining issues into a preview. The calling agent shows that preview to a human; only after explicit approval does
the server publish inline comments and a COMMENT-only summary to GitHub.
Status: early development (alpha). The design, tool surface, and configuration are still changing and may break between versions. Expect rough edges, and expect the interfaces to evolve as both tracks are explored.
Benchmark
Review quality is measured with ReviewBench, an open benchmark of real pull requests with human-reviewed golden findings, whose leaderboard ranks reviewers by grounded F1. Early results on its 25-PR test set look promising. With the default configuration, 0.6.0 scored:
| Version | PRs | GF1 | GP | GR | AF1 | AP | AR |
|---|---|---|---|---|---|---|---|
| 0.6.0 | 25 | 61.8 | 87.8 | 47.7 | 73.8 | 92.9 | 61.3 |
Grounded F1, precision, and recall (GF1, GP, GR) count only matches against the golden set. Augmented scores (AF1, AP, AR) also count findings outside it, as the judge classifies them. Scores pool every finding across the 25 PRs.
Early indicator only. These come from a single offline run over the 25-PR test subset, judged locally with the leaderboard's judge model. They are not a leaderboard result: the leaderboard scores all 219 PRs three times, and ReviewBench does not accept offline results for it. See
evals/experiments.mdfor the full results andevals/reviewbench/to reproduce them.
Quickstart
The server runs on macOS and Linux and requires Python 3.12+. Install
uv, git 2.26 or newer,
rg, and gh, then authenticate GitHub:
gh auth login
gh auth status
On Linux, review agents run in a bubblewrap sandbox that finds tools only in supported Nix profiles and /usr/bin,
/bin, /usr/sbin, and /sbin, never your PATH, so install file and git there along with the sandbox's
dependencies. On Debian or Ubuntu:
sudo apt-get install bubblewrap bash libseccomp2 file git
Bubblewrap must be 0.6.3 or newer, and the x86-64 or AArch64 host must permit unprivileged user and cgroup namespaces. Reviews fail rather than run unsandboxed otherwise. See localmcplib's Linux sandbox support for details.
On first launch, the server creates ~/.config/localmcp/localmcp.toml (or the path beneath $XDG_CONFIG_HOME) with
this base configuration if the file does not exist. The llm, secrets, and observability tables are owned by
localmcplib; pr-council owns only its optional pr_review table:
schema_version = 1
[llm]
backend = "native"
[secrets.openai_api_key]
env_vars = ["OPENAI_API_KEY"]
[secrets.anthropic_api_key]
env_vars = ["ANTHROPIC_API_KEY"]
On macOS, store the keys in your default Keychain. Each command prompts for the key without putting it in shell history:
security add-generic-password -U -s localmcp -a openai_api_key -w
security add-generic-password -U -s localmcp -a anthropic_api_key -w
On Linux, store them in the Secret Service keyring, such as GNOME Keyring or KWallet, with secret-tool (the
libsecret-tools package on Debian or Ubuntu), which also prompts for each key:
secret-tool store --label="localmcp openai_api_key" service localmcp username openai_api_key
secret-tool store --label="localmcp anthropic_api_key" service localmcp username anthropic_api_key
On a host without a keyring, set OPENAI_API_KEY and ANTHROPIC_API_KEY in the MCP client's environment instead.
Only the providers used by your selected models need keys. macOS may ask you to allow the server to read these Keychain items. The server starts without keys and reports missing credentials when a review is requested.
Install the package on demand from public PyPI in your MCP client configuration.
Claude Code
Add .mcp.json:
{
"mcpServers": {
"pr-council-mcp": {
"command": "uvx",
"args": ["--from", "pr-council-mcp", "pr-council-mcp"]
}
}
}
opencode
Add opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"pr-council-mcp": {
"type": "local",
"command": ["uvx", "--from", "pr-council-mcp", "pr-council-mcp"]
}
}
}
Updating
uvx reuses a cached environment, so a client restart does not pick up a new release on its own. Clear the cached
package, then restart your MCP client to install the latest release:
uv cache clean pr-council-mcp
How it works
Reviews are checkpointed operations rather than one long MCP request. The client starts a review, polls it, presents the exact revision-bound preview, and publishes only after explicit approval. Restarts can recover unfinished work, and publication revalidates the PR revision and approved payload before writing.
By default the server prepares an isolated managed worktree. Reviewer and deliberator models receive one bounded Bash
tool inside a read-only sandbox: Seatbelt on macOS, and bubblewrap and seccomp on Linux. They can inspect source and
Git history with ordinary local tools, but cannot write files or access the network or credentials. Commands may name
only the granted tools and a few shell builtins. On macOS, Seatbelt also stops a tool from launching an unrelated
executable or a program in the repository. On Linux, a tool such as find or awk can still launch other programs,
including repository code, inside the same read-only, offline sandbox. A local-checkout mode is also available when
cloning a large repository is impractical.
The MCP surface intentionally stays small: start, status, preview, commit, and cancel. Published reviews contain
inline comments plus a COMMENT-only summary; the server never approves or rejects a pull request.
Tools
Inspect the MCP server's tool schema for complete arguments and return models.
| Tool | What it does | Important behavior and requirements |
|---|---|---|
pr_council_start |
Starts a durable initial or follow-up PR review and returns an opaque operation ID. | Accepts a GitHub PR URL, source mode, finalized context, review mode, optional baseline, iterations, and optional model and min_severity overrides. It never publishes comments. |
pr_council_get |
Polls review status, progress, failures, and completion data. | The calling agent retains the operation ID and polls until the review is ready, terminal, or needs action. |
pr_council_preview |
Returns the exact revision-bound summary and inline comments. | Read-only. The calling agent presents this payload for human review without changing it. Findings below min_severity are listed separately with a note; they are never published. |
pr_council_commit |
Publishes one approved preview as inline comments plus a COMMENT-only summary. |
Requires the preview revision and payload hash, revalidates the PR endpoints and authenticated GitHub user, and never approves or rejects the PR. |
pr_council_cancel |
Requests cooperative cancellation of one owned operation. | Cancellation is unavailable once publication has begun. |
Basic configuration
Configuration lives at ~/.config/localmcp/localmcp.toml, or beneath $XDG_CONFIG_HOME when set. Shared root values
are inherited by every local MCP server and [server.pr-council-mcp] overrides this server's application settings.
Unknown application keys are rejected. The generated configuration uses the default reviewer matrix.
PR URLs are accepted from github.com by default. To allow a GitHub Enterprise host, configure:
[server.pr-council-mcp.pr_review]
allowed_hosts = ["github.com", "github.enterprise.example"]
Authenticate gh for the additional host with gh auth login --hostname github.enterprise.example. For headless
authentication to a GitHub Enterprise Server host, set GH_ENTERPRISE_TOKEN or GITHUB_ENTERPRISE_TOKEN instead;
GH_TOKEN and GITHUB_TOKEN apply to github.com and ghe.com hosts.
By default, every review uses the GitHub identity gh resolves from the server's environment. To review and publish as
different accounts per host, owner, or repository, log each account in with gh auth login and map them; the most
specific match wins, keys ignore case, and each login must match gh auth status exactly:
[server.pr-council-mcp.pr_review.github_accounts]
"github.com" = "work-account"
"github.com/example-org" = "personal-account"
"github.com/example-org/special-repo" = "other-account"
A mapped review gets that account's token from gh auth token --user for each GitHub call, ignoring inherited
GH_TOKEN-style variables, and fetches over HTTPS with gh as the Git credential helper. Nothing changes gh's
active account, so concurrent reviews can use different identities. Starting a review fails immediately if the
account's token authenticates as someone else, and publication uses the account recorded when the review started.
Every finding is published by default. To publish only findings at or above a severity (info, low, medium,
high, or critical), configure a threshold; pr_council_start also accepts min_severity for one review:
[server.pr-council-mcp.pr_review]
min_severity = "medium"
Suppressed findings still appear in the preview, so the human approving publication can see what was held back.
Reviewers, deliberation, and aggregation all run at medium reasoning effort. To change a role's effort (low,
medium, high, xhigh, or max), configure:
[server.pr-council-mcp.pr_review.reasoning_effort]
review = "high"
Each model in the role receives the effort if it accepts one; a model that takes none runs without it. The provider rejects a level that a model does not support.
Local-checkout reviews reject repository Git configuration that could run a program or carry a credential, in every
local, per-worktree, and submodule config file. Inert settings such as sparse checkout, index format, fetch
parallelism, the untracked cache, boolean core.fsmonitor, and filter.<driver>.required need no setup, and
cannot be listed: remote and submodule URLs are always checked for executable transports and credentials. To accept
other keys, list the exact values a checkout may carry, or a full-match pattern for data-only keys:
[server.pr-council-mcp.pr_review.allowed_local_git_config]
"filter.lfs.clean" = ["git-lfs clean -- %f"]
"filter.lfs.smudge" = ["git-lfs smudge -- %f"]
"filter.lfs.process" = ["git-lfs filter-process"]
"tool.last-run" = { pattern = "[0-9]{1,12}" }
Each entry is a trust decision: validation runs git status outside the model sandbox, and Git may run an allowed
filter or other command while it does. Prefer absolute program paths, since the server resolves bare names through
its own PATH, or the platform default when it is unset, after dropping relative entries and directories inside the
checkout. Known keys whose values Git runs as programs, such as drivers, helpers, tools, pagers, and aliases, accept
only exact values, and include, includeIf, and core.hooksPath cannot be allowed. As in Git, section and
variable names ignore case but subsection names must match exactly. Patterns run on the server's event loop, so
avoid nested repetition such as (a+)+, which a crafted value can make take exponential time. Errors name a
rejected key without its subsection, such as filter.<subsection>.clean, and never show its value; run
git config --list --show-origin in the checkout to find it. Models can read the checkout's Git config, so never
allow a key that holds a credential. Changes take effect when the server restarts, including for reviews already in
progress, which revalidate before preview and publication.
Secrets resolve from declared environment aliases first and the shared localmcp OS-keyring service second. The
native backend resolves openai_api_key and anthropic_api_key as required by the selected models. GitHub
authentication is owned by gh, using the host-specific credentials described above. Secret values are never logged.
Structured logs are written only to
~/.local/state/localmcp/pr-council-mcp/logs/pr-council-mcp.log (or beneath $XDG_STATE_HOME) because stdout and
stderr carry the MCP protocol. Langfuse tracing is optional and enabled with LOCALMCP_LANGFUSE_ENABLED=true.
Tool inputs and outputs remain suppressed unless LOCALMCP_LANGFUSE_CAPTURE_PAYLOADS=true is also set.
License
Metadata
Release files for pr-council-mcp 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pr_council_mcp-0.6.3.tar.gz | 72.3 kB | With provenance | Details for pr_council_mcp-0.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pr_council_mcp-0.6.3-py3-none-any.whl | Python 3 | none | any | Details for pr_council_mcp-0.6.3-py3-none-any.whl |
Total release size: 150.0 kB
Release files / pr_council_mcp-0.6.3.tar.gz
| Download URL | pr_council_mcp-0.6.3.tar.gz |
|---|---|
| Size | 72.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3db0bfb968dfe74397699ca68f3845e8ebf5ffc51375517a8a6343f5c5c6556d
|
|
BLAKE2b-256 checksum How to use checksums |
98f3278c666ec5bbc208b20b530d63a464dc7381e0107d275ff714ef885e765f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / pr_council_mcp-0.6.3-py3-none-any.whl
| Download URL | pr_council_mcp-0.6.3-py3-none-any.whl |
|---|---|
| Size | 77.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
222b39eefa732b075b6cf22a586471017b105a3bfbfc2abd98719b0da2cea48e
|
|
BLAKE2b-256 checksum How to use checksums |
23fa96a3844b08bd9193dedaac51ed82e049635c4cd485fad01326a0e823809c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for pr-council-mcp 0.6.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pr_council_mcp-0.6.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.