codeview MCP server

codeview MCP server

codeview-mcp•bymann-uofg

An MCP server that reviews code changes from pull requests, local uncommitted work or any diff, combining regex rules with an optional AI pass.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Runs about 50 regex rules on added lines to catch issues such as committed secrets, string-formatted SQL, eval, shell=True, disabled TLS verification and risky workflows.
  • •Optionally performs an AI pass looking for logic bugs, edge cases and missing tests using free-tier providers or a local Ollama model.
  • •Produces findings tied to file and line, a verdict, and a 0-100 risk score with reasons.
  • •Exposes MCP tools for reviewing pull requests, local changes and diff text, plus prompts and resources.

BEST FOR

  • •Editor assistants that need to review a GitHub pull request from within the chat.
  • •Checking uncommitted or branch changes for secrets and risky patterns before committing.
  • •Running security-focused reviews of arbitrary diffs and posting results back to a pull request.

ABOUT CODEVIEW-MCP

codeview MCP server is cataloged as an MCP server attributed to mann-uofg. An MCP server that reviews code changes from pull requests, local uncommitted work or any diff, combining regex rules with an optional AI pass. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for codeview MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does it need an AI provider key to work?

No; with no provider configured the rules still run.

Does posting a review to GitHub happen by default?

No; post_review is a dry run unless dry_run=false is passed, and previously posted comments are skipped.

Where does the config come from when reviewing a pull request?

The config is read from the base branch rather than the PR, so a PR can't turn off the checks that would catch it.

上游原版 README

在 GitHub 查看同一版本原文

README.md · c9549e26cb82 · 采集于 2026-11-13 10:53:28 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

codeview

CI License: MIT

codeview reviews code changes: GitHub pull requests, your local uncommitted work, or any diff. It runs as an MCP server (so an editor assistant can call it), as a command-line tool, and as a GitHub Action.

Each review has two parts:

  1. A set of about 50 regex rules that run on the added lines. They catch things like committed secrets, SQL built with string formatting, eval, shell=True, disabled TLS verification, and risky GitHub Actions workflows.
  2. An optional AI pass that looks for logic bugs, edge cases and missing tests. It only uses providers with a free tier (Gemini, Groq, Cerebras, OpenRouter) or a local model through Ollama, so it costs nothing to run.

The output is a list of findings tied to file and line, a verdict, and a 0-100 risk score with the reasons behind it.

Install

Requires Python 3.11+.

pip install git+https://github.com/mann-uofg/codeview-mcp

Or run it without installing, using uv:

uvx --from git+https://github.com/mann-uofg/codeview-mcp codeview review

Usage

codeview review https://github.com/psf/requests/pull/6883   # a pull request
codeview review owner/repo#123                              # short form
codeview review                                             # uncommitted changes in the current repo
codeview review --staged                                    # only staged changes
codeview review --branch --base main                        # current branch vs main
git diff HEAD~3 | codeview review --diff -                  # any diff

Public repositories work without a token. For private repositories, or to post reviews, set GITHUB_TOKEN. If you're logged in with the gh CLI, its token is picked up automatically.

Other useful options:

-f, --format text|markdown|json|sarif
-o, --output FILE
--json-output FILE / --sarif-output FILE   write extra reports in the same run
--post [--dry-run]                         publish the review to the PR as inline comments
--fail-on high                             exit 1 if any finding is high or worse (default: high)
--max-risk 60                              exit 1 if the risk score is above 60
--no-ai                                    rules only
--provider gemini --model ...              pick the AI provider/model
--focus security                           ask the AI to concentrate on something

codeview rules lists every rule, codeview providers shows which AI providers are configured, and codeview init writes a starter config file.

AI providers

Set any one of these. If more than one is set, they are tried in this order, falling back when one fails or hits its rate limit.

ProviderEnvironment variableGet a key
Google GeminiGEMINI_API_KEYhttps://aistudio.google.com/apikey
GroqGROQ_API_KEYhttps://console.groq.com/keys
CerebrasCEREBRAS_API_KEYhttps://cloud.cerebras.ai
OpenRouter (free models)OPENROUTER_API_KEYhttps://openrouter.ai/keys
Ollama (local)CODEVIEW_OLLAMA=1 or OLLAMA_HOSThttps://ollama.com
Any OpenAI-compatible APICODEVIEW_BASE_URL, CODEVIEW_MODEL, CODEVIEW_API_KEY

Every provider has a default model that fits its free tier. codeview providers shows which one it is, and --model or CODEVIEW_MODEL overrides it. The diff is trimmed to fit each provider's limits, and responses are cached locally, so reviewing the same diff twice doesn't use your quota again.

With no provider configured, the rules still run.

MCP server

Add this to your MCP client's config (Cursor, Windsurf, Zed, and others use this format):

{
  "mcpServers": {
    "codeview": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mann-uofg/codeview-mcp", "codeview", "serve"],
      "env": { "GEMINI_API_KEY": "...", "GITHUB_TOKEN": "..." }
    }
  }
}

For VS Code, put the same thing in .vscode/mcp.json under "servers" with "type": "stdio". codeview serve --http starts a Streamable HTTP server on 127.0.0.1:8765/mcp instead.

Tools:

  • review_pull_request: review a PR
  • review_local_changes: review working tree, staged, or branch changes
  • review_diff_text: review a diff passed as text
  • get_pull_request_diff: PR metadata plus a line-numbered diff, for the assistant to read itself
  • post_review: post the review to GitHub. This is a dry run unless dry_run=false is passed, and comments that were already posted are skipped.
  • list_rules, provider_status

It also provides prompts (deep_review, security_audit, suggest_tests, review_my_changes) and resources (codeview://rules, codeview://providers, codeview://config/example).

GitHub Action

name: codeview
on: pull_request

permissions:
  contents: read
  pull-requests: write     # to post the review
  security-events: write   # only needed for the SARIF upload

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: mann-uofg/codeview-mcp@v2
        with:
          gemini-api-key: ${{ secrets.GEMINI_API_KEY }}   # optional
          fail-on: critical
      - uses: github/codeql-action/upload-sarif@v4
        if: always()
        with:
          sarif_file: codeview.sarif

The action posts one review with a summary and inline comments, writes a job summary, and sets the outputs risk-score, risk-level, verdict and findings. Pull requests from forks get a read-only token, so the review isn't posted there, but the job summary and SARIF still work. All inputs are listed in action.yml.

Configuration

Put a .codeview.toml in the repository root, or a [tool.codeview] table in pyproject.toml:

provider = "auto"
min_severity = "low"          # hide findings below this
fail_on = "high"              # or "never"
max_findings = 30
exclude = ["docs/**", "**/*.generated.ts"]
disable_rules = ["CV-QUAL-006"]
focus = ["security"]
instructions = "We use SQLAlchemy 2.x. Flag raw SQL built with string formatting."

[[custom_rules]]
id = "TEAM-001"
pattern = "print\\("
message = "Use the logger instead of print()."
severity = "low"
paths = ["src/**/*.py"]

To silence one line, add a codeview-ignore comment to it, or cv-ignore[CV-SEC-020] for a specific rule.

When reviewing a pull request, the config is read from the base branch rather than the PR. That way a PR can't turn off the checks that would catch it.

Security notes

codeview reads input that other people control, so:

  • The diff and PR text are passed to the model as data, with instructions not to follow anything written in them. The model's answer is validated, and findings that point at files or lines not in the diff are dropped.
  • Text posted to GitHub has @mentions, issue-closing keywords, images and HTML comments neutralized.
  • Local git commands run with external diff drivers, textconv, fsmonitor and pagers turned off. Refs are validated, and symlinks aren't followed.
  • Only PR URLs on your GitHub host are accepted. API keys are never sent over plain HTTP to non-local hosts.
  • The HTTP transport only listens on localhost and checks Host/Origin headers.

To report a vulnerability, see SECURITY.md.

Development

git clone https://github.com/mann-uofg/codeview-mcp
cd codeview-mcp
uv sync
uv run pytest
uv run ruff check . && uv run mypy

See CONTRIBUTING.md. Changes are listed in CHANGELOG.md.

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for codeview MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/codeview-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools