github-pr-context-mcp 0.2.7__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.7/github_pr_context_mcp.egg-info → github_pr_context_mcp-0.2.8}/PKG-INFO +63 -63
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/README.md +199 -199
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/mcp_app.py +3 -2
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/tools/indexing.py +0 -1
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8/github_pr_context_mcp.egg-info}/PKG-INFO +63 -63
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/pyproject.toml +1 -1
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/tests/test_fixes.py +5 -5
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/LICENSE +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/analytics/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/analytics/usage_metrics.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/routes/http.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/state.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/tools/admin.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/tools/analysis.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/app/tools/generation.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/auth/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/auth/gmail_identity.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/entrypoints/deployed/server.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/entrypoints/local/server.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/fetcher/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/fetcher/client.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/fetcher/queries.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/fetcher/transform.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/SOURCES.txt +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/dependency_links.txt +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/entry_points.txt +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/requires.txt +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/github_pr_context_mcp.egg-info/top_level.txt +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/inference/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/inference/providers.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/inference/review.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/setup.cfg +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/storage/__init__.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/storage/document_builder.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/storage/encoder.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/storage/vector_store.py +0 -0
- {github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8}/tests/test_sqlite_auth.py +0 -0
{github_pr_context_mcp-0.2.7/github_pr_context_mcp.egg-info → github_pr_context_mcp-0.2.8}/PKG-INFO
RENAMED
|
@@ -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
|
|
@@ -19,8 +19,6 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
# GitHub PR Review Context MCP
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
<div align="center">
|
|
25
23
|
|
|
26
24
|

|
|
@@ -30,21 +28,51 @@ Dynamic: license-file
|
|
|
30
28
|

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

|
|
33
|
-

|
|
34
32
|
<!-- [](https://github-pr-context-mcp.onrender.com/usage) -->
|
|
35
33
|
|
|
36
34
|
**Production-grade context layer for AI code review, grounded in your repository's real pull request history.**
|
|
37
35
|
|
|
38
|
-
|
|
39
36
|
</div>
|
|
40
37
|
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Overview
|
|
41
|
+
|
|
42
|
+
GitHub PR Review Context MCP gives AI assistants institutional review memory.
|
|
43
|
+
|
|
44
|
+
Instead of generic feedback, reviews are informed by historical reviewer comments, recurring quality patterns, and repository-specific standards from your own PR history.
|
|
45
|
+
|
|
46
|
+
### Core Value
|
|
47
|
+
|
|
48
|
+
- Improves review consistency across teams and repositories.
|
|
49
|
+
- Reduces repeated reviewer feedback on known issues.
|
|
50
|
+
- Integrates with any MCP-compatible client and multiple LLM providers.
|
|
51
|
+
|
|
52
|
+
---
|
|
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
|
+
|
|
41
68
|
## 🚀 Quick Start
|
|
42
69
|
|
|
43
70
|
### 🚀 Zero-Setup (uvx / pipx / npx)
|
|
71
|
+
|
|
44
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:
|
|
45
73
|
|
|
46
74
|
> [!TIP]
|
|
47
|
-
> **Don't clone this repo to get AI rules!**
|
|
75
|
+
> **Don't clone this repo to get AI rules!**
|
|
48
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.
|
|
49
77
|
|
|
50
78
|
**Using uvx (Recommended for speed):**
|
|
@@ -67,6 +95,7 @@ npx -y @smithery/cli run github-pr-context-mcp
|
|
|
67
95
|
---
|
|
68
96
|
|
|
69
97
|
### ⚠️ Manual Installation (Git Clone / Advanced)
|
|
98
|
+
|
|
70
99
|
> [!WARNING]
|
|
71
100
|
> Running from a git clone is **only recommended for developers** contributing to this project. For general use, please use the `pipx` method above.
|
|
72
101
|
|
|
@@ -79,17 +108,15 @@ For full configuration (Cursor, Claude Desktop), see the [**Quick Start Guide**]
|
|
|
79
108
|
|
|
80
109
|
---
|
|
81
110
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- Reduces repeated reviewer feedback on known issues.
|
|
92
|
-
- Integrates with any MCP-compatible client and multiple LLM providers.
|
|
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`
|
|
93
120
|
|
|
94
121
|
---
|
|
95
122
|
|
|
@@ -98,23 +125,24 @@ Instead of generic feedback, reviews are informed by historical reviewer comment
|
|
|
98
125
|
This MCP server is built to scale from a single machine to an entire engineering organization.
|
|
99
126
|
|
|
100
127
|
### 👤 Solo Developer (Local Mode)
|
|
128
|
+
|
|
101
129
|
**Best for:** Privacy, local-first control, and zero hosting costs.
|
|
102
130
|
- **How it works:** Run via `uvx`, `pipx`, or a local git clone.
|
|
103
131
|
- **Storage:** ChromaDB stays on your local machine.
|
|
104
132
|
- **Security:** Your GitHub Token and LLM keys never leave your device.
|
|
105
133
|
- **Setup:** See [Quick Start](docs/quickstart.md#🚀-zero-setup-uvx--pipx--npx).
|
|
106
134
|
|
|
107
|
-
### 🤝 Team Collaboration (Hosted Mode
|
|
135
|
+
### 🤝 Team Collaboration (Hosted Mode — UPCOMING)
|
|
136
|
+
|
|
108
137
|
**Best for:** Scaling team-wide PR standards and centralized infra.
|
|
109
138
|
- **How it works:** One deployment on Render (Coming Soon) shared by the whole team.
|
|
110
139
|
- **Isolation:** Strict **Gmail-based namespace isolation** (driven by SQLite). User A's indexed data is mathematically invisible to User B.
|
|
111
140
|
- **Economics:** Pooled LLM credits and a single shared indexing server.
|
|
112
141
|
- **Setup:** See [Deployment Guide](docs/integrations/deployed.md).
|
|
113
142
|
|
|
114
|
-
---
|
|
115
|
-
|
|
116
143
|
### 🌟 Zero-Friction Setup (Upcoming)
|
|
117
|
-
|
|
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:
|
|
118
146
|
|
|
119
147
|
```json
|
|
120
148
|
"github-pr-context": {
|
|
@@ -125,40 +153,8 @@ If your team has Hosted this MCP on Render, you do **NOT** need to `git clone` o
|
|
|
125
153
|
}
|
|
126
154
|
}
|
|
127
155
|
```
|
|
128
|
-
*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.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
> [!IMPORTANT]
|
|
133
|
-
> **🚀 USE THE OFFICIAL PACKAGE:** This project is now on PyPI.
|
|
134
|
-
> To ensure seamless updates and zero configuration friction, do **NOT** `git clone`.
|
|
135
|
-
>
|
|
136
|
-
> **Recommended Install:**
|
|
137
|
-
> ```bash
|
|
138
|
-
> pipx install github-pr-context-mcp
|
|
139
|
-
> ```
|
|
140
|
-
> Or run instantly with: `uvx github-pr-context-mcp`
|
|
141
|
-
|
|
142
|
-
<div align="center">
|
|
143
|
-
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<br/>
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Key Capabilities
|
|
151
|
-
|
|
152
|
-
| Capability | What It Delivers |
|
|
153
|
-
|---|---|
|
|
154
|
-
| Historical review retrieval | Semantic search across prior PR comments and review summaries |
|
|
155
|
-
| Context-aware AI review | Feedback grounded in repository-specific review behavior |
|
|
156
|
-
| Grounded code generation | Generate new code based on past commits, comments, and style |
|
|
157
|
-
| **Team rules generation** | **Auto-generate .cursorrules / CLAUDE.md from repo history** |
|
|
158
|
-
| Smart repository readiness | Auto-detect indexed state and index on demand |
|
|
159
|
-
| Flexible storage modes | Permanent (disk) and temporary (in-memory) indexing options |
|
|
160
|
-
| Portable inference layer | Switch LLM providers using environment configuration only |
|
|
161
156
|
|
|
157
|
+
*That's it.* If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment.
|
|
162
158
|
|
|
163
159
|
---
|
|
164
160
|
|
|
@@ -170,7 +166,7 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
170
166
|
|---|---|
|
|
171
167
|
| `ensure_repo_ready` | Index a repo and ensure it's ready for queries |
|
|
172
168
|
| `generate_repo_rules` | **Synthesize .cursorrules / CLAUDE.md from PR history** |
|
|
173
|
-
| `generate_code_from_history
|
|
169
|
+
| `generate_code_from_history` | Write code grounded in past commits & team style |
|
|
174
170
|
| `review_code_with_history` | Perform AI review grounded in team review memory |
|
|
175
171
|
| `get_team_review_patterns` | Summarize recurring team standards (e.g. "no magic numbers") |
|
|
176
172
|
| `semantic_search_reviews` | Search past PR comments by meaning, not just keywords |
|
|
@@ -181,7 +177,9 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
181
177
|
| `update_settings` | Update tokens/LLM keys (Hosted mode only) |
|
|
182
178
|
| `get_usage_stats` | View adoption metrics and unique user counts |
|
|
183
179
|
|
|
184
|
-
|
|
180
|
+
<div align="center">
|
|
181
|
+
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
182
|
+
</div>
|
|
185
183
|
|
|
186
184
|
---
|
|
187
185
|
|
|
@@ -197,9 +195,17 @@ Detailed guides for deep dives and specific configurations:
|
|
|
197
195
|
|
|
198
196
|
---
|
|
199
197
|
|
|
198
|
+
## 🛠️ Troubleshooting
|
|
199
|
+
|
|
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.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
200
206
|
## 📣 Community & Feedback
|
|
201
207
|
|
|
202
|
-
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!
|
|
203
209
|
|
|
204
210
|
- **Feedback**: Please open an issue or start a discussion if you have ideas or encounter bugs.
|
|
205
211
|
- **Star ⭐**: If this tool saves you time, give it a star! It helps others find the project.
|
|
@@ -207,12 +213,6 @@ We want to hear from you—whether you are a solo developer or a team at a large
|
|
|
207
213
|
|
|
208
214
|
---
|
|
209
215
|
|
|
210
|
-
## 🛠️ Troubleshooting
|
|
211
|
-
|
|
212
|
-
- **"command not found"**: Use absolute paths in your configuration. Run `github-pr-context-mcp config` to get your exact path.
|
|
213
|
-
- **"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.
|
|
214
|
-
- **Rate Limit Errors**: Ensure your `GITHUB_TOKEN` is valid and has `repo` scope.
|
|
215
|
-
|
|
216
216
|
## ⚖️ License
|
|
217
217
|
|
|
218
218
|
MIT
|
|
@@ -1,199 +1,199 @@
|
|
|
1
|
-
# GitHub PR Review Context MCP
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-

|
|
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
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sys
|
|
1
2
|
import os
|
|
2
3
|
import threading
|
|
3
4
|
from mcp.server.fastmcp import FastMCP
|
|
@@ -42,12 +43,12 @@ def _github_sync_loop():
|
|
|
42
43
|
return
|
|
43
44
|
|
|
44
45
|
owner, name = repo.split("/", 1)
|
|
45
|
-
print(f"Starting GitHub traffic sync for {repo}...", flush=True)
|
|
46
|
+
print(f"Starting GitHub traffic sync for {repo}...", file=sys.stderr, flush=True)
|
|
46
47
|
while True:
|
|
47
48
|
try:
|
|
48
49
|
usage_store.sync_github_traffic(owner, name, token)
|
|
49
50
|
except Exception as e:
|
|
50
|
-
print(f"GitHub traffic sync failed: {e}", flush=True)
|
|
51
|
+
print(f"GitHub traffic sync failed: {e}", file=sys.stderr, flush=True)
|
|
51
52
|
import time
|
|
52
53
|
time.sleep(3600 * 12) # Sync every 12 hours
|
|
53
54
|
|
{github_pr_context_mcp-0.2.7 → github_pr_context_mcp-0.2.8/github_pr_context_mcp.egg-info}/PKG-INFO
RENAMED
|
@@ -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
|
|
@@ -19,8 +19,6 @@ Dynamic: license-file
|
|
|
19
19
|
|
|
20
20
|
# GitHub PR Review Context MCP
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
<div align="center">
|
|
25
23
|
|
|
26
24
|

|
|
@@ -30,21 +28,51 @@ Dynamic: license-file
|
|
|
30
28
|

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

|
|
33
|
-

|
|
34
32
|
<!-- [](https://github-pr-context-mcp.onrender.com/usage) -->
|
|
35
33
|
|
|
36
34
|
**Production-grade context layer for AI code review, grounded in your repository's real pull request history.**
|
|
37
35
|
|
|
38
|
-
|
|
39
36
|
</div>
|
|
40
37
|
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Overview
|
|
41
|
+
|
|
42
|
+
GitHub PR Review Context MCP gives AI assistants institutional review memory.
|
|
43
|
+
|
|
44
|
+
Instead of generic feedback, reviews are informed by historical reviewer comments, recurring quality patterns, and repository-specific standards from your own PR history.
|
|
45
|
+
|
|
46
|
+
### Core Value
|
|
47
|
+
|
|
48
|
+
- Improves review consistency across teams and repositories.
|
|
49
|
+
- Reduces repeated reviewer feedback on known issues.
|
|
50
|
+
- Integrates with any MCP-compatible client and multiple LLM providers.
|
|
51
|
+
|
|
52
|
+
---
|
|
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
|
+
|
|
41
68
|
## 🚀 Quick Start
|
|
42
69
|
|
|
43
70
|
### 🚀 Zero-Setup (uvx / pipx / npx)
|
|
71
|
+
|
|
44
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:
|
|
45
73
|
|
|
46
74
|
> [!TIP]
|
|
47
|
-
> **Don't clone this repo to get AI rules!**
|
|
75
|
+
> **Don't clone this repo to get AI rules!**
|
|
48
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.
|
|
49
77
|
|
|
50
78
|
**Using uvx (Recommended for speed):**
|
|
@@ -67,6 +95,7 @@ npx -y @smithery/cli run github-pr-context-mcp
|
|
|
67
95
|
---
|
|
68
96
|
|
|
69
97
|
### ⚠️ Manual Installation (Git Clone / Advanced)
|
|
98
|
+
|
|
70
99
|
> [!WARNING]
|
|
71
100
|
> Running from a git clone is **only recommended for developers** contributing to this project. For general use, please use the `pipx` method above.
|
|
72
101
|
|
|
@@ -79,17 +108,15 @@ For full configuration (Cursor, Claude Desktop), see the [**Quick Start Guide**]
|
|
|
79
108
|
|
|
80
109
|
---
|
|
81
110
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- Reduces repeated reviewer feedback on known issues.
|
|
92
|
-
- Integrates with any MCP-compatible client and multiple LLM providers.
|
|
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`
|
|
93
120
|
|
|
94
121
|
---
|
|
95
122
|
|
|
@@ -98,23 +125,24 @@ Instead of generic feedback, reviews are informed by historical reviewer comment
|
|
|
98
125
|
This MCP server is built to scale from a single machine to an entire engineering organization.
|
|
99
126
|
|
|
100
127
|
### 👤 Solo Developer (Local Mode)
|
|
128
|
+
|
|
101
129
|
**Best for:** Privacy, local-first control, and zero hosting costs.
|
|
102
130
|
- **How it works:** Run via `uvx`, `pipx`, or a local git clone.
|
|
103
131
|
- **Storage:** ChromaDB stays on your local machine.
|
|
104
132
|
- **Security:** Your GitHub Token and LLM keys never leave your device.
|
|
105
133
|
- **Setup:** See [Quick Start](docs/quickstart.md#🚀-zero-setup-uvx--pipx--npx).
|
|
106
134
|
|
|
107
|
-
### 🤝 Team Collaboration (Hosted Mode
|
|
135
|
+
### 🤝 Team Collaboration (Hosted Mode — UPCOMING)
|
|
136
|
+
|
|
108
137
|
**Best for:** Scaling team-wide PR standards and centralized infra.
|
|
109
138
|
- **How it works:** One deployment on Render (Coming Soon) shared by the whole team.
|
|
110
139
|
- **Isolation:** Strict **Gmail-based namespace isolation** (driven by SQLite). User A's indexed data is mathematically invisible to User B.
|
|
111
140
|
- **Economics:** Pooled LLM credits and a single shared indexing server.
|
|
112
141
|
- **Setup:** See [Deployment Guide](docs/integrations/deployed.md).
|
|
113
142
|
|
|
114
|
-
---
|
|
115
|
-
|
|
116
143
|
### 🌟 Zero-Friction Setup (Upcoming)
|
|
117
|
-
|
|
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:
|
|
118
146
|
|
|
119
147
|
```json
|
|
120
148
|
"github-pr-context": {
|
|
@@ -125,40 +153,8 @@ If your team has Hosted this MCP on Render, you do **NOT** need to `git clone` o
|
|
|
125
153
|
}
|
|
126
154
|
}
|
|
127
155
|
```
|
|
128
|
-
*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.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
> [!IMPORTANT]
|
|
133
|
-
> **🚀 USE THE OFFICIAL PACKAGE:** This project is now on PyPI.
|
|
134
|
-
> To ensure seamless updates and zero configuration friction, do **NOT** `git clone`.
|
|
135
|
-
>
|
|
136
|
-
> **Recommended Install:**
|
|
137
|
-
> ```bash
|
|
138
|
-
> pipx install github-pr-context-mcp
|
|
139
|
-
> ```
|
|
140
|
-
> Or run instantly with: `uvx github-pr-context-mcp`
|
|
141
|
-
|
|
142
|
-
<div align="center">
|
|
143
|
-
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<br/>
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Key Capabilities
|
|
151
|
-
|
|
152
|
-
| Capability | What It Delivers |
|
|
153
|
-
|---|---|
|
|
154
|
-
| Historical review retrieval | Semantic search across prior PR comments and review summaries |
|
|
155
|
-
| Context-aware AI review | Feedback grounded in repository-specific review behavior |
|
|
156
|
-
| Grounded code generation | Generate new code based on past commits, comments, and style |
|
|
157
|
-
| **Team rules generation** | **Auto-generate .cursorrules / CLAUDE.md from repo history** |
|
|
158
|
-
| Smart repository readiness | Auto-detect indexed state and index on demand |
|
|
159
|
-
| Flexible storage modes | Permanent (disk) and temporary (in-memory) indexing options |
|
|
160
|
-
| Portable inference layer | Switch LLM providers using environment configuration only |
|
|
161
156
|
|
|
157
|
+
*That's it.* If your IDE supports native MCP SSE connections, you are immediately connected to the secure Render deployment.
|
|
162
158
|
|
|
163
159
|
---
|
|
164
160
|
|
|
@@ -170,7 +166,7 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
170
166
|
|---|---|
|
|
171
167
|
| `ensure_repo_ready` | Index a repo and ensure it's ready for queries |
|
|
172
168
|
| `generate_repo_rules` | **Synthesize .cursorrules / CLAUDE.md from PR history** |
|
|
173
|
-
| `generate_code_from_history
|
|
169
|
+
| `generate_code_from_history` | Write code grounded in past commits & team style |
|
|
174
170
|
| `review_code_with_history` | Perform AI review grounded in team review memory |
|
|
175
171
|
| `get_team_review_patterns` | Summarize recurring team standards (e.g. "no magic numbers") |
|
|
176
172
|
| `semantic_search_reviews` | Search past PR comments by meaning, not just keywords |
|
|
@@ -181,7 +177,9 @@ The server exposes 12 core tools for IDE agents and developers. For a deep dive
|
|
|
181
177
|
| `update_settings` | Update tokens/LLM keys (Hosted mode only) |
|
|
182
178
|
| `get_usage_stats` | View adoption metrics and unique user counts |
|
|
183
179
|
|
|
184
|
-
|
|
180
|
+
<div align="center">
|
|
181
|
+
<img src="assets/mcp_tool_guide_premium_v2.png" width="800" alt="GitHub PR Context MCP Tools">
|
|
182
|
+
</div>
|
|
185
183
|
|
|
186
184
|
---
|
|
187
185
|
|
|
@@ -197,9 +195,17 @@ Detailed guides for deep dives and specific configurations:
|
|
|
197
195
|
|
|
198
196
|
---
|
|
199
197
|
|
|
198
|
+
## 🛠️ Troubleshooting
|
|
199
|
+
|
|
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.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
200
206
|
## 📣 Community & Feedback
|
|
201
207
|
|
|
202
|
-
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!
|
|
203
209
|
|
|
204
210
|
- **Feedback**: Please open an issue or start a discussion if you have ideas or encounter bugs.
|
|
205
211
|
- **Star ⭐**: If this tool saves you time, give it a star! It helps others find the project.
|
|
@@ -207,12 +213,6 @@ We want to hear from you—whether you are a solo developer or a team at a large
|
|
|
207
213
|
|
|
208
214
|
---
|
|
209
215
|
|
|
210
|
-
## 🛠️ Troubleshooting
|
|
211
|
-
|
|
212
|
-
- **"command not found"**: Use absolute paths in your configuration. Run `github-pr-context-mcp config` to get your exact path.
|
|
213
|
-
- **"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.
|
|
214
|
-
- **Rate Limit Errors**: Ensure your `GITHUB_TOKEN` is valid and has `repo` scope.
|
|
215
|
-
|
|
216
216
|
## ⚖️ License
|
|
217
217
|
|
|
218
218
|
MIT
|
|
@@ -4,7 +4,7 @@ from unittest.mock import patch, MagicMock
|
|
|
4
4
|
|
|
5
5
|
# Import the actual methods we modified
|
|
6
6
|
from entrypoints.local.server import _machine_fingerprint, _detect_mode
|
|
7
|
-
from app.
|
|
7
|
+
from app.state import resolve_namespace as _resolve_namespace
|
|
8
8
|
import storage.vector_store as vs
|
|
9
9
|
|
|
10
10
|
|
|
@@ -55,8 +55,8 @@ def test_chroma_persist_dir_default():
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
### Test Bug 2: Auth Exception handling wraps correctly
|
|
58
|
-
@patch("app.
|
|
59
|
-
@patch("app.
|
|
58
|
+
@patch("app.state.AUTH_REQUIRED", True)
|
|
59
|
+
@patch("app.state.current_user_email", return_value=None)
|
|
60
60
|
def test_resolve_namespace_unauthorized_exception(mock_email):
|
|
61
61
|
"""
|
|
62
62
|
Bug 2: When users aren't authenticated locally, but AUTH_REQUIRED is True
|
|
@@ -69,8 +69,8 @@ def test_resolve_namespace_unauthorized_exception(mock_email):
|
|
|
69
69
|
assert "Unauthorized: missing identity when AUTH_REQUIRED is true." in str(excinfo.value)
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
@patch("app.
|
|
73
|
-
@patch("app.
|
|
72
|
+
@patch("app.state.AUTH_REQUIRED", True)
|
|
73
|
+
@patch("app.state.current_user_email", return_value="alice@gmail.com")
|
|
74
74
|
def test_resolve_namespace_authorized(mock_email):
|
|
75
75
|
"""
|
|
76
76
|
Bug 2 related: Even if a user tries to access 'bob@gmail.com' (IDOR attempt),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|