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