Skip to content

Commit a56a0e0

Browse files
anvansterclaude
andcommitted
docs: sync mcp-package README to 0.17.5 — pr_context, CI action, flags
42 tools (was 41), added pr_context tool entry, --graph-only and --run-tool flags, and a GitHub Action / CI PR-review section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e4d085f commit a56a0e0

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

mcp-package/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CodeGraph MCP Server
22

3-
Cross-language code intelligence for AI agents — 41 tools, 38 languages, persistent memory, documentation intelligence.
3+
Cross-language code intelligence for AI agents — 42 tools, 38 languages, persistent memory, documentation intelligence, one-call PR review.
44

55
## Install
66

@@ -50,14 +50,31 @@ Pass flags after `--`:
5050
| `--exclude <dir>` || Directories to skip (repeatable) |
5151
| `--embedding-model <model>` | `bge-small` | `bge-small`, `jina-code-v2`, or `granite-97m` (32K context, multilingual) |
5252
| `--max-files <n>` | 5000 | Maximum files to index |
53-
| `--profile <name>` | `all` | Scope tool surface: `core` (8), `graph` (16), `memory` (14), `security` (pro), `all` (41) |
53+
| `--profile <name>` | `all` | Scope tool surface: `core` (8), `graph` (16), `memory` (14), `security` (pro), `all` (42) |
54+
| `--graph-only` | off | Skip embeddings — graph + structural tools only. No ONNX model load, 10-50× faster indexing. For CI / one-shot graph queries. |
55+
| `--run-tool <name>` || One-shot: index, run a single tool, print result, exit. No MCP handshake. Pair with `--tool-args '<json>'`. |
5456

5557
### Agent rules (recommended)
5658

5759
Pre-configured rule files that teach your AI agent to use CodeGraph tools before falling back to grep / multi-file reads:
5860

5961
**[codegraph-rules-for-agents](https://github.com/codegraph-ai/codegraph-rules-for-agents)**
6062

63+
### GitHub Action — automatic PR review
64+
65+
Get a code-graph analysis comment on every PR — blast radius, test gaps,
66+
stale docs, suggested reviewers. Runs **graph-only** (no embeddings, no
67+
API keys, just `GITHUB_TOKEN`). The core invocation:
68+
69+
```bash
70+
codegraph-server --graph-only \
71+
--run-tool codegraph_pr_context \
72+
--tool-args '{"baseBranch":"main","format":"markdown"}'
73+
```
74+
75+
This prints a ready-to-post markdown PR comment. A copy-paste workflow
76+
template lives at [`.github/workflows/codegraph-pr.yml`](https://github.com/codegraph-ai/CodeGraph/blob/main/.github/workflows/codegraph-pr.yml) in the main repo.
77+
6178
### Optional: automatic context injection in Claude Code
6279

6380
Install a PreToolUse hook that nudges Claude to fetch graph context (`get_edit_context`, `analyze_impact`) before editing source files in indexed workspaces. Skips non-source files and ad-hoc edits silently. Never blocks tool calls.
@@ -69,10 +86,12 @@ npx codegraph-mcp-install-hooks --force # skip prompt
6986
npx codegraph-mcp-install-hooks --uninstall
7087
```
7188

72-
## Tools (41)
89+
## Tools (42)
7390

7491
**Analysis** (11): `get_ai_context`, `get_edit_context`, `get_curated_context`, `analyze_impact`, `analyze_complexity`, `find_circular_deps`, `find_hot_paths`, `find_dead_imports`, `get_module_summary`, `search_by_pattern`, `search_by_error`
7592

93+
**PR review** (1): `pr_context` — one-call PR analysis: blast radius, test gaps, stale docs, commit hint, suggested reviewers. Supports `format:"markdown"` for ready-to-post CI comments.
94+
7695
**Navigation** (13): `symbol_search`, `get_callers`, `get_callees`, `get_detailed_symbol`, `get_symbol_info`, `get_dependency_graph`, `get_call_graph`, `find_by_imports`, `find_by_signature`, `find_entry_points`, `find_implementors`, `find_related_tests`, `traverse_graph`
7796

7897
**Memory** (7): `memory_store`, `memory_get`, `memory_search`, `memory_context`, `memory_list`, `memory_stats`, `memory_invalidate`

0 commit comments

Comments
 (0)