Skip to main content

PR review agent that warns when pull requests reintroduce historical bug patterns. MCP server for Claude Code, Codex CLI, and Gemini CLI.

Project description

ScarTissue MCP

ScarTissue is a PR review agent that warns when a pull request appears to reintroduce a historical bug pattern from the same repository. It mines prior bug-fix commits, stores them as searchable "scar tissue," and exposes the review workflow as an MCP stdio server for Claude Code, Codex CLI, Gemini CLI, and other MCP clients.

Install

pip install scartissue-mcp

After installation, start the MCP stdio server with:

scartissue-mcp

Configuration

Set these environment variables in your MCP client config:

Variable Required Description
ANTHROPIC_API_KEY Yes Anthropic API key used by the review agent.
NIA_API_KEY Yes Nia API key used for current-code search.
GITHUB_TOKEN Yes GitHub token used to fetch pull requests and mine repositories.
CHROMA_PERSIST_DIR Yes Absolute path to the local ChromaDB directory where scar tissue indexes are stored.

Claude Code

Add this to ~/.claude/mcp.json or workspace .claude/mcp.json:

{
  "mcpServers": {
    "scartissue": {
      "command": "scartissue-mcp",
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "NIA_API_KEY": "nia_...",
        "GITHUB_TOKEN": "ghp_...",
        "CHROMA_PERSIST_DIR": "/absolute/path/to/scartissue/chroma_db"
      }
    }
  }
}

Codex CLI

Add this to ~/.codex/mcp_servers.toml:

[scartissue]
command = "scartissue-mcp"

[scartissue.env]
ANTHROPIC_API_KEY = "sk-ant-..."
NIA_API_KEY = "nia_..."
GITHUB_TOKEN = "ghp_..."
CHROMA_PERSIST_DIR = "/absolute/path/to/scartissue/chroma_db"

Gemini CLI

Add this to ~/.gemini/settings.json under mcpServers:

{
  "mcpServers": {
    "scartissue": {
      "command": "scartissue-mcp",
      "args": [],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "NIA_API_KEY": "nia_...",
        "GITHUB_TOKEN": "ghp_...",
        "CHROMA_PERSIST_DIR": "/absolute/path/to/scartissue/chroma_db"
      }
    }
  }
}

Tools

  • scartissue_index_repo: mine a repository's git history and index historical bug-fix incidents.
  • scartissue_review_pr: review a GitHub pull request against previously indexed scar tissue.
  • scartissue_search_scar_tissue: search indexed incident history for bug-fix examples related to a query.
  • scartissue_list_indexed_repos: list indexed repositories with incident counts and last-indexed timestamps.

Index a repository once with scartissue_index_repo before reviewing PRs from that repository.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scartissue_mcp-0.1.0.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scartissue_mcp-0.1.0-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

File details

Details for the file scartissue_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: scartissue_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scartissue_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd173d121259f939a567abcbd667f34e66898bf857616c3e0a45d475f7115b7c
MD5 2dd620af7b96ef6f56cc9710536a7a63
BLAKE2b-256 8407baca34fd1d4222fd4fb20b8ec95fe44db707da52aa2dee647ff5ecc28394

See more details on using hashes here.

File details

Details for the file scartissue_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scartissue_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 46.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scartissue_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 295e64d604d97eb9533221915ee4ebac632018908ce108ce8899847e850cfca8
MD5 49168307d19f2b84b684212e57eb8284
BLAKE2b-256 bcdea0b34fa77072536d454d1ac7def66e96b8553f854e32542ff9bdd18599e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page