github-pr-context-mcp 0.2.6__tar.gz → 0.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/PKG-INFO +97 -73
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/README.md +199 -175
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/analytics/usage_metrics.py +7 -1
- github_pr_context_mcp-0.2.8/app/mcp_app.py +56 -0
- github_pr_context_mcp-0.2.8/app/routes/http.py +90 -0
- github_pr_context_mcp-0.2.8/app/state.py +174 -0
- github_pr_context_mcp-0.2.8/app/tools/admin.py +57 -0
- github_pr_context_mcp-0.2.8/app/tools/analysis.py +95 -0
- github_pr_context_mcp-0.2.8/app/tools/generation.py +125 -0
- github_pr_context_mcp-0.2.8/app/tools/indexing.py +240 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/entrypoints/local/server.py +16 -1
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/PKG-INFO +97 -73
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/SOURCES.txt +6 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/pyproject.toml +1 -1
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/tests/test_fixes.py +5 -5
- github_pr_context_mcp-0.2.6/app/mcp_app.py +0 -928
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/LICENSE +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/analytics/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/app/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/auth/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/auth/gmail_identity.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/entrypoints/deployed/server.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/fetcher/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/fetcher/client.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/fetcher/queries.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/fetcher/transform.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/dependency_links.txt +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/entry_points.txt +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/requires.txt +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/top_level.txt +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/inference/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/inference/providers.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/inference/review.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/setup.cfg +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/storage/__init__.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/storage/document_builder.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/storage/encoder.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/storage/vector_store.py +0 -0
- {github_pr_context_mcp-0.2.6 → github_pr_context_mcp-0.2.8}/tests/test_sqlite_auth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github-pr-context-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: GitHub PR Review Context MCP Server
|
|
5
5
|
Author: Paarth Gala
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -28,14 +28,11 @@ Dynamic: license-file
|
|
|
28
28
|

|
|
29
29
|
[](LICENSE)
|
|
30
30
|

|
|
31
|
-

|
|
32
|
+
<!-- [](https://github-pr-context-mcp.onrender.com/usage) -->
|
|
33
33
|
|
|
34
34
|
**Production-grade context layer for AI code review, grounded in your repository's real pull request history.**
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
> Tracking unique users across **uvx**, **pipx**, and **local** sources. (Render hosting upcoming)
|
|
38
|
-
|
|
39
36
|
</div>
|
|
40
37
|
|
|
41
38
|
---
|
|
@@ -54,28 +51,98 @@ Instead of generic feedback, reviews are informed by historical reviewer comment
|
|
|
54
51
|
|
|
55
52
|
---
|
|
56
53
|
|
|
54
|
+
## Key Capabilities
|
|
55
|
+
|
|
56
|
+
| Capability | What It Delivers |
|
|
57
|
+
|---|---|
|
|
58
|
+
| Historical review retrieval | Semantic search across prior PR comments and review summaries |
|
|
59
|
+
| Context-aware AI review | Feedback grounded in repository-specific review behavior |
|
|
60
|
+
| Grounded code generation | Generate new code based on past commits, comments, and style |
|
|
61
|
+
| **Team rules generation** | **Auto-generate .cursorrules / CLAUDE.md from repo history** |
|
|
62
|
+
| Smart repository readiness | Auto-detect indexed state and index on demand |
|
|
63
|
+
| Flexible storage modes | Permanent (disk) and temporary (in-memory) indexing options |
|
|
64
|
+
| Portable inference layer | Switch LLM providers using environment configuration only |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 🚀 Quick Start
|
|
69
|
+
|
|
70
|
+
### 🚀 Zero-Setup (uvx / pipx / npx)
|
|
71
|
+
|
|
72
|
+
The fastest way to use the server. No cloning required. Just run one of these commands directly in your terminal or use them in your IDE's MCP settings:
|
|
73
|
+
|
|
74
|
+
> [!TIP]
|
|
75
|
+
> **Don't clone this repo to get AI rules!**
|
|
76
|
+
> Once installed, run `generate_repo_rules` inside **YOUR** project to automatically create `.cursorrules` or `CLAUDE.md` tailored to your own team's PR history.
|
|
77
|
+
|
|
78
|
+
**Using uvx (Recommended for speed):**
|
|
79
|
+
```bash
|
|
80
|
+
uvx github-pr-context-mcp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Using pipx (Recommended for stability):**
|
|
84
|
+
```bash
|
|
85
|
+
pipx run github-pr-context-mcp
|
|
86
|
+
# Or install permanently:
|
|
87
|
+
pipx install github-pr-context-mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Using npx (Smithery bridge):**
|
|
91
|
+
```bash
|
|
92
|
+
npx -y @smithery/cli run github-pr-context-mcp
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### ⚠️ Manual Installation (Git Clone / Advanced)
|
|
98
|
+
|
|
99
|
+
> [!WARNING]
|
|
100
|
+
> Running from a git clone is **only recommended for developers** contributing to this project. For general use, please use the `pipx` method above.
|
|
101
|
+
|
|
102
|
+
If you have cloned the repository for development:
|
|
103
|
+
1. Create a virtual environment: `python -m venv .venv`
|
|
104
|
+
2. Activate it and install: `pip install -e .`
|
|
105
|
+
3. Run automatic setup: `python scripts/install_clients.py`
|
|
106
|
+
|
|
107
|
+
For full configuration (Cursor, Claude Desktop), see the [**Quick Start Guide**](docs/quickstart.md).
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
> [!IMPORTANT]
|
|
112
|
+
> **🚀 USE THE OFFICIAL PACKAGE:** This project is now on PyPI.
|
|
113
|
+
> To ensure seamless updates and zero configuration friction, do **NOT** `git clone`.
|
|
114
|
+
>
|
|
115
|
+
> **Recommended Install:**
|
|
116
|
+
> ```bash
|
|
117
|
+
> pipx install github-pr-context-mcp
|
|
118
|
+
> ```
|
|
119
|
+
> Or run instantly with: `uvx github-pr-context-mcp`
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
57
123
|
## 🛠️ Usage Modes: Solo vs. Team
|
|
58
124
|
|
|
59
125
|
This MCP server is built to scale from a single machine to an entire engineering organization.
|
|
60
126
|
|
|
61
127
|
### 👤 Solo Developer (Local Mode)
|
|
128
|
+
|
|
62
129
|
**Best for:** Privacy, local-first control, and zero hosting costs.
|
|
63
130
|
- **How it works:** Run via `uvx`, `pipx`, or a local git clone.
|
|
64
131
|
- **Storage:** ChromaDB stays on your local machine.
|
|
65
132
|
- **Security:** Your GitHub Token and LLM keys never leave your device.
|
|
66
133
|
- **Setup:** See [Quick Start](docs/quickstart.md#🚀-zero-setup-uvx--pipx--npx).
|
|
67
134
|
|
|
68
|
-
### 🤝 Team Collaboration (Hosted Mode
|
|
135
|
+
### 🤝 Team Collaboration (Hosted Mode — UPCOMING)
|
|
136
|
+
|
|
69
137
|
**Best for:** Scaling team-wide PR standards and centralized infra.
|
|
70
138
|
- **How it works:** One deployment on Render (Coming Soon) shared by the whole team.
|
|
71
139
|
- **Isolation:** Strict **Gmail-based namespace isolation** (driven by SQLite). User A's indexed data is mathematically invisible to User B.
|
|
72
140
|
- **Economics:** Pooled LLM credits and a single shared indexing server.
|
|
73
141
|
- **Setup:** See [Deployment Guide](docs/integrations/deployed.md).
|
|
74
142
|
|
|
75
|
-
---
|
|
76
|
-
|
|
77
143
|
### 🌟 Zero-Friction Setup (Upcoming)
|
|
78
|
-
|
|
144
|
+
|
|
145
|
+
If your team has hosted this MCP on Render, you do **NOT** need to `git clone` or install anything. Just drop this snippet into your IDE:
|
|
79
146
|
|
|
80
147
|
```json
|
|
81
148
|
"github-pr-context": {
|
|
@@ -86,36 +153,8 @@ If your team has Hosted this MCP on Render, you do **NOT** need to `git clone` o
|
|
|
86
153
|
}
|
|
87
154
|
}
|
|
88
155
|
```
|
|
89
|
-
*That's it.* If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment. No setup friction, no tools required.
|
|
90
|
-
|
|
91
|
-
---
|
|
92
156
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
| Capability | What It Delivers |
|
|
96
|
-
|---|---|
|
|
97
|
-
| Historical review retrieval | Semantic search across prior PR comments and review summaries |
|
|
98
|
-
| Context-aware AI review | Feedback grounded in repository-specific review behavior |
|
|
99
|
-
| Grounded code generation | Generate new code based on past commits, comments, and style |
|
|
100
|
-
| **Team rules generation** | **Auto-generate .cursorrules / CLAUDE.md from repo history** |
|
|
101
|
-
| Smart repository readiness | Auto-detect indexed state and index on demand |
|
|
102
|
-
| Flexible storage modes | Permanent (disk) and temporary (in-memory) indexing options |
|
|
103
|
-
| Portable inference layer | Switch LLM providers using environment configuration only |
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Demo
|
|
108
|
-
|
|
109
|
-

|
|
110
|
-
|
|
111
|
-
Example workflow:
|
|
112
|
-
- Ask the assistant to review a diff using repository history.
|
|
113
|
-
- The server retrieves similar past review context.
|
|
114
|
-
- The model returns grounded feedback aligned to team expectations.
|
|
115
|
-
|
|
116
|
-
## Usage Analytics
|
|
117
|
-
|
|
118
|
-
To help us understand adoption, the MCP server collects privacy-first, anonymous telemetry on deployments. Future hosted deployments will expose HTTP endpoints (`/stats` and `/ping`) that publicly display the **number of unique users**.
|
|
157
|
+
*That's it.* If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment.
|
|
119
158
|
|
|
120
159
|
---
|
|
121
160
|
|
|
@@ -127,7 +166,7 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
127
166
|
|---|---|
|
|
128
167
|
| `ensure_repo_ready` | Index a repo and ensure it's ready for queries |
|
|
129
168
|
| `generate_repo_rules` | **Synthesize .cursorrules / CLAUDE.md from PR history** |
|
|
130
|
-
| `generate_code_from_history
|
|
169
|
+
| `generate_code_from_history` | Write code grounded in past commits & team style |
|
|
131
170
|
| `review_code_with_history` | Perform AI review grounded in team review memory |
|
|
132
171
|
| `get_team_review_patterns` | Summarize recurring team standards (e.g. "no magic numbers") |
|
|
133
172
|
| `semantic_search_reviews` | Search past PR comments by meaning, not just keywords |
|
|
@@ -138,57 +177,42 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
138
177
|
| `update_settings` | Update tokens/LLM keys (Hosted mode only) |
|
|
139
178
|
| `get_usage_stats` | View adoption metrics and unique user counts |
|
|
140
179
|
|
|
180
|
+
<div align="center">
|
|
181
|
+
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
182
|
+
</div>
|
|
183
|
+
|
|
141
184
|
---
|
|
142
185
|
|
|
143
|
-
## Documentation
|
|
186
|
+
## 📖 Documentation
|
|
144
187
|
|
|
145
|
-
Detailed guides
|
|
188
|
+
Detailed guides for deep dives and specific configurations:
|
|
146
189
|
|
|
147
|
-
- [Quick Start
|
|
148
|
-
- [LLM Configuration](docs/llm-configuration.md)
|
|
149
|
-
- [
|
|
150
|
-
- [Architecture
|
|
151
|
-
- [
|
|
152
|
-
- [Configuration Guide (Change Tokens/Settings)](docs/guides/configuration.md)
|
|
153
|
-
- [Roadmap](docs/roadmap.md)
|
|
190
|
+
- 🛠️ [**Quick Start & Usage**](docs/quickstart.md) — Setup and basic commands.
|
|
191
|
+
- ⚙️ [**LLM Configuration**](docs/llm-configuration.md) — Switching between OpenAI, Anthropic, Gemini, and Cerebras.
|
|
192
|
+
- 🧩 [**Tool Strategy & Selection Guide**](docs/tools_strategy.md) — When to use which tool (for humans and agents).
|
|
193
|
+
- 🏗️ [**Architecture & Pipeline**](docs/architecture.md) — How the RAG engine and indexing work.
|
|
194
|
+
- 🔌 [**Integrations**](docs/integrations/index.md) — Connecting to Cursor, Claude Desktop, and more.
|
|
154
195
|
|
|
155
196
|
---
|
|
156
197
|
|
|
157
|
-
##
|
|
198
|
+
## 🛠️ Troubleshooting
|
|
158
199
|
|
|
159
|
-
-
|
|
160
|
-
-
|
|
200
|
+
- **"command not found"**: Use absolute paths in your configuration. Run `github-pr-context-mcp config` to get your exact path.
|
|
201
|
+
- **"PermissionError: [WinError 32]"**: The binary is locked by a running process. Close Claude/Cursor, run `taskkill /F /IM github-pr-context-mcp.exe`, then retry the upgrade.
|
|
202
|
+
- **Rate Limit Errors**: Ensure your `GITHUB_TOKEN` is valid and has `repo` scope.
|
|
161
203
|
|
|
162
204
|
---
|
|
163
205
|
|
|
164
206
|
## 📣 Community & Feedback
|
|
165
207
|
|
|
166
|
-
We want to hear from you—whether you are a solo developer or a team at a large company!
|
|
208
|
+
We want to hear from you — whether you are a solo developer or a team at a large company!
|
|
167
209
|
|
|
168
|
-
### 👤 For Individuals
|
|
169
210
|
- **Feedback**: Please open an issue or start a discussion if you have ideas or encounter bugs.
|
|
170
|
-
- **
|
|
171
|
-
|
|
172
|
-
### 🏢 For Corporate & Teams
|
|
173
|
-
- **Usage**: Is your team using this MCP server? Join our "Adopters" list by opening a PR to add your team's name.
|
|
174
|
-
- **Corporate Feedback**: Open an issue with the `corporate-usage` label to tell us how this has improved your PR review workflow.
|
|
175
|
-
- **Custom Integration**: Need help deploying this to your private cloud? Reach out via GitHub Discussions.
|
|
211
|
+
- **Star ⭐**: If this tool saves you time, give it a star! It helps others find the project.
|
|
212
|
+
- **Corporate**: Is your team using this? Join our "Adopters" list by opening a PR to add your team's name.
|
|
176
213
|
|
|
177
214
|
---
|
|
178
215
|
|
|
179
|
-
## 📜 Documentation & Guides
|
|
180
|
-
|
|
181
|
-
- **Strategy & Best Practices**: [Tool Strategy & Selection Guide](docs/tools_strategy.md)
|
|
182
|
-
- **Architecture**: [Architecture and Tools](docs/architecture.md)
|
|
183
|
-
- **Pipeline**: [Pipeline Deep Dive](docs/pipeline.md)
|
|
184
|
-
- **Usage**: [Quick Start and Usage](docs/quickstart.md)
|
|
185
|
-
|
|
186
|
-
## 🛠️ Troubleshooting
|
|
187
|
-
|
|
188
|
-
- **"command not found"**: Use absolute paths in your configuration. Run `github-pr-context-mcp config` to get your exact path.
|
|
189
|
-
- **"PermissionError: [WinError 32]"**: The binary is locked by a running process. Close Claude/Cursor, run `taskkill /F /IM github-pr-context-mcp.exe`, then retry the upgrade.
|
|
190
|
-
- **Rate Limit Errors**: Ensure your `GITHUB_TOKEN` is valid and has `repo` scope.
|
|
191
|
-
|
|
192
216
|
## ⚖️ License
|
|
193
217
|
|
|
194
218
|
MIT
|
|
@@ -1,175 +1,199 @@
|
|
|
1
|
-
# GitHub PR Review Context MCP
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-
[](LICENSE)
|
|
11
|
-

|
|
12
|
-

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
[](LICENSE)
|
|
11
|
+

|
|
12
|
+

|
|
13
|
+
<!-- [](https://github-pr-context-mcp.onrender.com/usage) -->
|
|
14
|
+
|
|
15
|
+
**Production-grade context layer for AI code review, grounded in your repository's real pull request history.**
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
GitHub PR Review Context MCP gives AI assistants institutional review memory.
|
|
24
|
+
|
|
25
|
+
Instead of generic feedback, reviews are informed by historical reviewer comments, recurring quality patterns, and repository-specific standards from your own PR history.
|
|
26
|
+
|
|
27
|
+
### Core Value
|
|
28
|
+
|
|
29
|
+
- Improves review consistency across teams and repositories.
|
|
30
|
+
- Reduces repeated reviewer feedback on known issues.
|
|
31
|
+
- Integrates with any MCP-compatible client and multiple LLM providers.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Key Capabilities
|
|
36
|
+
|
|
37
|
+
| Capability | What It Delivers |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Historical review retrieval | Semantic search across prior PR comments and review summaries |
|
|
40
|
+
| Context-aware AI review | Feedback grounded in repository-specific review behavior |
|
|
41
|
+
| Grounded code generation | Generate new code based on past commits, comments, and style |
|
|
42
|
+
| **Team rules generation** | **Auto-generate .cursorrules / CLAUDE.md from repo history** |
|
|
43
|
+
| Smart repository readiness | Auto-detect indexed state and index on demand |
|
|
44
|
+
| Flexible storage modes | Permanent (disk) and temporary (in-memory) indexing options |
|
|
45
|
+
| Portable inference layer | Switch LLM providers using environment configuration only |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🚀 Quick Start
|
|
50
|
+
|
|
51
|
+
### 🚀 Zero-Setup (uvx / pipx / npx)
|
|
52
|
+
|
|
53
|
+
The fastest way to use the server. No cloning required. Just run one of these commands directly in your terminal or use them in your IDE's MCP settings:
|
|
54
|
+
|
|
55
|
+
> [!TIP]
|
|
56
|
+
> **Don't clone this repo to get AI rules!**
|
|
57
|
+
> Once installed, run `generate_repo_rules` inside **YOUR** project to automatically create `.cursorrules` or `CLAUDE.md` tailored to your own team's PR history.
|
|
58
|
+
|
|
59
|
+
**Using uvx (Recommended for speed):**
|
|
60
|
+
```bash
|
|
61
|
+
uvx github-pr-context-mcp
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Using pipx (Recommended for stability):**
|
|
65
|
+
```bash
|
|
66
|
+
pipx run github-pr-context-mcp
|
|
67
|
+
# Or install permanently:
|
|
68
|
+
pipx install github-pr-context-mcp
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Using npx (Smithery bridge):**
|
|
72
|
+
```bash
|
|
73
|
+
npx -y @smithery/cli run github-pr-context-mcp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### ⚠️ Manual Installation (Git Clone / Advanced)
|
|
79
|
+
|
|
80
|
+
> [!WARNING]
|
|
81
|
+
> Running from a git clone is **only recommended for developers** contributing to this project. For general use, please use the `pipx` method above.
|
|
82
|
+
|
|
83
|
+
If you have cloned the repository for development:
|
|
84
|
+
1. Create a virtual environment: `python -m venv .venv`
|
|
85
|
+
2. Activate it and install: `pip install -e .`
|
|
86
|
+
3. Run automatic setup: `python scripts/install_clients.py`
|
|
87
|
+
|
|
88
|
+
For full configuration (Cursor, Claude Desktop), see the [**Quick Start Guide**](docs/quickstart.md).
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
> [!IMPORTANT]
|
|
93
|
+
> **🚀 USE THE OFFICIAL PACKAGE:** This project is now on PyPI.
|
|
94
|
+
> To ensure seamless updates and zero configuration friction, do **NOT** `git clone`.
|
|
95
|
+
>
|
|
96
|
+
> **Recommended Install:**
|
|
97
|
+
> ```bash
|
|
98
|
+
> pipx install github-pr-context-mcp
|
|
99
|
+
> ```
|
|
100
|
+
> Or run instantly with: `uvx github-pr-context-mcp`
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 🛠️ Usage Modes: Solo vs. Team
|
|
105
|
+
|
|
106
|
+
This MCP server is built to scale from a single machine to an entire engineering organization.
|
|
107
|
+
|
|
108
|
+
### 👤 Solo Developer (Local Mode)
|
|
109
|
+
|
|
110
|
+
**Best for:** Privacy, local-first control, and zero hosting costs.
|
|
111
|
+
- **How it works:** Run via `uvx`, `pipx`, or a local git clone.
|
|
112
|
+
- **Storage:** ChromaDB stays on your local machine.
|
|
113
|
+
- **Security:** Your GitHub Token and LLM keys never leave your device.
|
|
114
|
+
- **Setup:** See [Quick Start](docs/quickstart.md#🚀-zero-setup-uvx--pipx--npx).
|
|
115
|
+
|
|
116
|
+
### 🤝 Team Collaboration (Hosted Mode — UPCOMING)
|
|
117
|
+
|
|
118
|
+
**Best for:** Scaling team-wide PR standards and centralized infra.
|
|
119
|
+
- **How it works:** One deployment on Render (Coming Soon) shared by the whole team.
|
|
120
|
+
- **Isolation:** Strict **Gmail-based namespace isolation** (driven by SQLite). User A's indexed data is mathematically invisible to User B.
|
|
121
|
+
- **Economics:** Pooled LLM credits and a single shared indexing server.
|
|
122
|
+
- **Setup:** See [Deployment Guide](docs/integrations/deployed.md).
|
|
123
|
+
|
|
124
|
+
### 🌟 Zero-Friction Setup (Upcoming)
|
|
125
|
+
|
|
126
|
+
If your team has hosted this MCP on Render, you do **NOT** need to `git clone` or install anything. Just drop this snippet into your IDE:
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
"github-pr-context": {
|
|
130
|
+
"type": "sse",
|
|
131
|
+
"url": "https://YOUR-RENDER-URL.onrender.com/mcp",
|
|
132
|
+
"headers": {
|
|
133
|
+
"Authorization": "Bearer YOUR_TOKEN"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
*That's it.* If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 🧰 Core Tools Reference
|
|
143
|
+
|
|
144
|
+
The server exposes 12 core tools for IDE agents and developers. For a deep dive on when to use each, see the [**Tool Strategy Guide**](docs/tools_strategy.md).
|
|
145
|
+
|
|
146
|
+
| Tool | Action |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `ensure_repo_ready` | Index a repo and ensure it's ready for queries |
|
|
149
|
+
| `generate_repo_rules` | **Synthesize .cursorrules / CLAUDE.md from PR history** |
|
|
150
|
+
| `generate_code_from_history` | Write code grounded in past commits & team style |
|
|
151
|
+
| `review_code_with_history` | Perform AI review grounded in team review memory |
|
|
152
|
+
| `get_team_review_patterns` | Summarize recurring team standards (e.g. "no magic numbers") |
|
|
153
|
+
| `semantic_search_reviews` | Search past PR comments by meaning, not just keywords |
|
|
154
|
+
| `set_active_repo` | Switch between multiple indexed repositories |
|
|
155
|
+
| `list_indexed_repos` | View all repos currently in local/temporary storage |
|
|
156
|
+
| `delete_repo_index` | Free up disk space by clearing repository indices |
|
|
157
|
+
| `get_index_stats` | Verify if a repo index is complete (doc count) |
|
|
158
|
+
| `update_settings` | Update tokens/LLM keys (Hosted mode only) |
|
|
159
|
+
| `get_usage_stats` | View adoption metrics and unique user counts |
|
|
160
|
+
|
|
161
|
+
<div align="center">
|
|
162
|
+
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 📖 Documentation
|
|
168
|
+
|
|
169
|
+
Detailed guides for deep dives and specific configurations:
|
|
170
|
+
|
|
171
|
+
- 🛠️ [**Quick Start & Usage**](docs/quickstart.md) — Setup and basic commands.
|
|
172
|
+
- ⚙️ [**LLM Configuration**](docs/llm-configuration.md) — Switching between OpenAI, Anthropic, Gemini, and Cerebras.
|
|
173
|
+
- 🧩 [**Tool Strategy & Selection Guide**](docs/tools_strategy.md) — When to use which tool (for humans and agents).
|
|
174
|
+
- 🏗️ [**Architecture & Pipeline**](docs/architecture.md) — How the RAG engine and indexing work.
|
|
175
|
+
- 🔌 [**Integrations**](docs/integrations/index.md) — Connecting to Cursor, Claude Desktop, and more.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🛠️ Troubleshooting
|
|
180
|
+
|
|
181
|
+
- **"command not found"**: Use absolute paths in your configuration. Run `github-pr-context-mcp config` to get your exact path.
|
|
182
|
+
- **"PermissionError: [WinError 32]"**: The binary is locked by a running process. Close Claude/Cursor, run `taskkill /F /IM github-pr-context-mcp.exe`, then retry the upgrade.
|
|
183
|
+
- **Rate Limit Errors**: Ensure your `GITHUB_TOKEN` is valid and has `repo` scope.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 📣 Community & Feedback
|
|
188
|
+
|
|
189
|
+
We want to hear from you — whether you are a solo developer or a team at a large company!
|
|
190
|
+
|
|
191
|
+
- **Feedback**: Please open an issue or start a discussion if you have ideas or encounter bugs.
|
|
192
|
+
- **Star ⭐**: If this tool saves you time, give it a star! It helps others find the project.
|
|
193
|
+
- **Corporate**: Is your team using this? Join our "Adopters" list by opening a PR to add your team's name.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## ⚖️ License
|
|
198
|
+
|
|
199
|
+
MIT
|
|
@@ -178,7 +178,13 @@ class UsageMetricsStore:
|
|
|
178
178
|
return {
|
|
179
179
|
"tracked_since": tracked_since_val,
|
|
180
180
|
"total_tool_calls": total_calls_val,
|
|
181
|
-
"
|
|
181
|
+
"metrics": {
|
|
182
|
+
"total_unique_users": total_unique,
|
|
183
|
+
"active_cli_users": total_ping_users,
|
|
184
|
+
"authenticated_users": total_auth_users,
|
|
185
|
+
"github_clones": github_clones_val,
|
|
186
|
+
"github_downloads": github_downloads_val
|
|
187
|
+
},
|
|
182
188
|
"users_by_mode": users_by_mode,
|
|
183
189
|
"top_tools": top_tools,
|
|
184
190
|
"daily": daily_series,
|