{"id":47662629,"url":"https://github.com/n24q02m/better-code-review-graph","last_synced_at":"2026-04-21T07:04:37.796Z","repository":{"id":345742922,"uuid":"1187120099","full_name":"n24q02m/better-code-review-graph","owner":"n24q02m","description":"Knowledge graph for token-efficient code reviews — fixed search, qualified call resolution, dual-mode embedding (ONNX + multi-provider cloud)","archived":false,"fork":false,"pushed_at":"2026-04-18T05:25:43.000Z","size":5183,"stargazers_count":19,"open_issues_count":12,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-18T05:26:06.751Z","etag":null,"topics":["ai-agents","ai-coding","antigravity","claude","claude-code","code-review","codex","copilot","cursor","docker","gemini-cli","knowledge-graph","mcp","mcp-server","model-context-protocol","open-source","python","tree-sitter"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/better-code-review-graph/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n24q02m.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-20T11:11:32.000Z","updated_at":"2026-04-18T05:25:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/n24q02m/better-code-review-graph","commit_stats":null,"previous_names":["n24q02m/better-code-review-graph"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/n24q02m/better-code-review-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n24q02m%2Fbetter-code-review-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n24q02m%2Fbetter-code-review-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n24q02m%2Fbetter-code-review-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n24q02m%2Fbetter-code-review-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n24q02m","download_url":"https://codeload.github.com/n24q02m/better-code-review-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n24q02m%2Fbetter-code-review-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32081125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","ai-coding","antigravity","claude","claude-code","code-review","codex","copilot","cursor","docker","gemini-cli","knowledge-graph","mcp","mcp-server","model-context-protocol","open-source","python","tree-sitter"],"created_at":"2026-04-02T11:41:15.426Z","updated_at":"2026-04-21T07:04:37.791Z","avatar_url":"https://github.com/n24q02m.png","language":"Python","readme":"# Better Code Review Graph\n\nmcp-name: io.github.n24q02m/better-code-review-graph\n\n**Knowledge graph for token-efficient code reviews -- fixed search, configurable embeddings, qualified call resolution.**\n\n\u003c!-- Badge Row 1: Status --\u003e\n[![CI](https://github.com/n24q02m/better-code-review-graph/actions/workflows/ci.yml/badge.svg)](https://github.com/n24q02m/better-code-review-graph/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/n24q02m/better-code-review-graph/graph/badge.svg)](https://codecov.io/gh/n24q02m/better-code-review-graph)\n[![PyPI](https://img.shields.io/pypi/v/better-code-review-graph?logo=pypi\u0026logoColor=white)](https://pypi.org/project/better-code-review-graph/)\n[![Docker](https://img.shields.io/docker/v/n24q02m/better-code-review-graph?label=docker\u0026logo=docker\u0026logoColor=white\u0026sort=semver)](https://hub.docker.com/r/n24q02m/better-code-review-graph)\n[![License: MIT](https://img.shields.io/github/license/n24q02m/better-code-review-graph)](LICENSE)\n\n\u003c!-- Badge Row 2: Tech --\u003e\n[![Python](https://img.shields.io/badge/Python_3.13-3776AB?logo=python\u0026logoColor=white)](#)\n[![MCP](https://img.shields.io/badge/MCP-000000?logo=anthropic\u0026logoColor=white)](#)\n[![semantic-release](https://img.shields.io/badge/semantic--release-e10079?logo=semantic-release\u0026logoColor=white)](https://github.com/python-semantic-release/python-semantic-release)\n[![Renovate](https://img.shields.io/badge/renovate-enabled-1A1F6C?logo=renovatebot\u0026logoColor=white)](https://developer.mend.io/)\n\n\u003c!-- Glama badge --\u003e\n\u003ca href=\"https://glama.ai/mcp/servers/n24q02m/better-code-review-graph\"\u003e\n  \u003cimg width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/n24q02m/better-code-review-graph/badge\" alt=\"better-code-review-graph MCP server\" /\u003e\n\u003c/a\u003e\n\nFork of [code-review-graph](https://github.com/tirth8205/code-review-graph) with critical bug fixes, configurable embeddings, and production CI/CD. Parses your codebase with [Tree-sitter](https://tree-sitter.github.io/tree-sitter/), builds a structural graph of functions/classes/imports, and gives Claude (or any MCP client) precise context so it reads only what matters.\n\n## Features\n\n| Feature | code-review-graph | better-code-review-graph |\n|:--------|:------------------|:-------------------------|\n| Multi-word search | Broken (literal substring) | AND-logic word splitting |\n| callers_of/callees_of | Empty results (bare name targets) | Qualified name resolution + bare fallback |\n| Embedding | sentence-transformers + torch (1.1 GB) | qwen3-embed ONNX + cloud (200 MB), dual-mode |\n| Output size | Unbounded (500K+ chars) | Paginated (max_results, truncated flag) |\n| Tool design | 9 individual tools | 6 tools: graph + query + review + config + setup + help |\n| Plugin hooks | Invalid PostEdit/PostGit | Valid PostToolUse |\n\n## Setup\n\n**With AI Agent** -- copy and send this to your AI agent:\n\n\u003e Please set up better-code-review-graph for me. Follow this guide:\n\u003e https://raw.githubusercontent.com/n24q02m/better-code-review-graph/main/docs/setup-with-agent.md\n\n**Manual Setup** -- follow [docs/setup-manual.md](docs/setup-manual.md)\n\n## Tools\n\n### `graph` -- Graph lifecycle\n\nActions: `build` | `update` | `stats` | `embed`\n\n| Action | Description |\n|:-------|:------------|\n| `build` | Full or incremental graph build. Set `full_rebuild=true` to re-parse all files. |\n| `update` | Alias for `build` with `full_rebuild=false` (incremental). |\n| `stats` | Graph size, languages, node/edge breakdown, embedding count. |\n| `embed` | Compute vector embeddings for semantic search. Dual-mode: local ONNX or cloud. |\n\n### `query` -- Graph queries\n\nActions: `query` | `search` | `impact` | `large_functions`\n\n| Action | Description |\n|:-------|:------------|\n| `query` | Predefined pattern queries: `callers_of`, `callees_of`, `imports_of`, `importers_of`, `children_of`, `tests_for`, `inheritors_of`, `file_summary`. |\n| `search` | Search code entities by name/keyword or semantic similarity. |\n| `impact` | Blast radius of changed files. Auto-detects from git diff. Paginated with `max_results`. |\n| `large_functions` | Find functions/classes exceeding a line-count threshold. |\n\n### `review` -- Code review context\n\nToken-optimized review context with structural summary, source snippets, and review guidance. Auto-detects changed files from git diff.\n\n### `config` -- Server configuration\n\nActions: `status` | `set` | `cache_clear`\n\n| Action | Description |\n|:-------|:------------|\n| `status` | Server info: version, graph path, node/edge counts, embedding backend. |\n| `set` | Update runtime settings (e.g., `log_level`). |\n| `cache_clear` | Remove all computed embeddings. |\n\n### `setup` -- Credential setup\n\nActions: `status` | `start` | `skip` | `reset` | `complete`\n\n| Action | Description |\n|:-------|:------------|\n| `status` | Show current credential state and setup URL. |\n| `start` | Start relay setup to configure API keys via browser. |\n| `skip` | Set local mode (skip relay permanently, use ONNX only). |\n| `reset` | Clear credentials and reset state. |\n| `complete` | Re-resolve credentials from environment variables. |\n\n### `help` -- Full documentation\n\nTopics: `graph` | `query` | `review` | `config`\n\nReturns complete documentation for each tool. Use when the compressed descriptions above are insufficient.\n\n## Security\n\n- **Graceful fallbacks** -- Cloud embedding failure falls back to local ONNX\n- **Error handling** -- Tools return error strings with fix suggestions, never crash\n- **Read-only mount** -- Docker mode mounts repo as `:ro` (read-only)\n\n## Build from Source\n\n```bash\ngit clone https://github.com/n24q02m/better-code-review-graph\ncd better-code-review-graph\nuv sync --group dev\nuv run pytest\nuv run better-code-review-graph\n```\n\n**Requirements:** Python 3.13, [uv](https://docs.astral.sh/uv/)\n\n## License\n\nMIT -- See [LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn24q02m%2Fbetter-code-review-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn24q02m%2Fbetter-code-review-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn24q02m%2Fbetter-code-review-graph/lists"}