You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app uses a `config.yml` file for core configuration including the AI system prompt and tool definitions. This file contains:
135
-
136
-
#### Key Configuration Sections:
137
-
-**GitHub settings**: API endpoints, bot username, check run names
138
-
-**Queue configuration**: Worker limits and retry settings
139
-
-**Diff processing**: Chunk size limits for large diffs
140
-
-**Amp integration**: Command settings and MCP server configuration
141
-
-**System prompt**: The complete AI prompt template for code reviews
142
-
-**Tool definitions**: Available MCP tools and their usage instructions
76
+
Contains GitHub settings, queue configuration, server settings, Amp integration, and the AI review prompt. Environment variables are interpolated using `${VARIABLE_NAME}` syntax.
143
77
144
-
#### Important Notes:
145
-
- The system prompt in `config.yml` defines how the AI reviews code
146
-
- Tool definitions specify which GitHub operations are available to the AI
147
-
- Environment variables are interpolated using `${VARIABLE_NAME}` syntax
148
-
- Modify the prompt template to customize review behavior and focus areas
149
-
- The configuration supports both development and production deployment modes
150
-
151
-
**Example customization:**
152
-
To adjust review focus, modify the `prompt_template` section in `config.yml` to emphasize specific areas like security, performance, or coding standards.
78
+
To customize review behavior, modify the `prompt_template` section.
153
79
154
80
## API Endpoints
155
81
156
-
### Core Endpoints
157
82
-`GET /` - Service information
158
83
-`GET /health` - Health check
159
-
-`GET /queue/status` - Queue status information
84
+
-`GET /queue/status` - Queue status information
160
85
-`GET /jobs/:jobId` - Job status information
161
-
-`POST /test/review` - Test endpoint for review functionality
@@ -178,7 +98,7 @@ For development, you'll need to expose your local server to the internet for Git
178
98
179
99
2.**Start your local server**:
180
100
```bash
181
-
npm run dev
101
+
pnpm run dev
182
102
```
183
103
184
104
3.**Expose with ngrok** (in a separate terminal):
@@ -188,46 +108,38 @@ For development, you'll need to expose your local server to the internet for Git
188
108
189
109
4.**Update your environment**:
190
110
- Copy the ngrok URL (e.g., `https://abc123.ngrok.io`)
191
-
- Update `CRA_PUBLIC_URL` and `APP_BASE_URL` in your `.env` file
111
+
- Update `APP_BASE_URL` in your `.env` file
192
112
- Update your GitHub App webhook URL to `{your-ngrok-url}/github/webhook`
193
113
194
114
### Build
195
115
```bash
196
-
npm run build
116
+
pnpm run build
197
117
```
198
118
199
119
### Type Check
200
120
```bash
201
-
npm run type-check
121
+
pnpm run type-check
202
122
```
203
123
204
124
### Lint
205
125
```bash
206
-
npm run lint
126
+
pnpm run lint
207
127
```
208
128
209
129
### MCP Server
210
130
Run the standalone MCP server:
211
131
```bash
212
-
npm run mcp
132
+
pnpm run mcp
213
133
```
214
134
215
135
Or build and run:
216
136
```bash
217
-
npm run mcp:build
137
+
pnpm run mcp:build
218
138
```
219
139
220
140
## MCP Integration
221
141
222
-
The app includes a Model Context Protocol (MCP) server that exposes GitHub operations as tools for Amp Agent.
223
-
224
-
### Available MCP Tools
225
-
-`leave_general_comment` - Leave general comments on pull requests
226
-
-`leave_inline_comment` - Leave inline comments on specific lines
227
-
-`get_pr_comments` - Get all comments on a pull request
228
-
229
-
### Usage with AI Agents
230
-
The MCP server runs as a standalone stdio server. See [`src/mcp/README.md`](src/mcp/README.md) for detailed configuration and usage instructions.
142
+
The app includes a Model Context Protocol (MCP) server that exposes GitHub operations as tools for Amp Agent. See [`src/mcp/README.md`](src/mcp/README.md) for details.
231
143
232
144
## Architecture
233
145
@@ -237,7 +149,6 @@ The MCP server runs as a standalone stdio server. See [`src/mcp/README.md`](src/
237
149
-**Job Queue**: Background processing for code reviews
238
150
-**Amp**: AI-powered code analysis engine
239
151
-**MCP Server**: Model Context Protocol server for AI agent integration
240
-
-**Installation Management**: Persistent storage for GitHub App installations
Copy file name to clipboardExpand all lines: src/mcp/README.md
+4-48Lines changed: 4 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,57 +7,30 @@ This directory contains the Model Context Protocol (MCP) server implementation f
7
7
### 1. `leave_general_comment`
8
8
Leave general comments on pull requests.
9
9
10
-
**Parameters:**
11
-
-`message` (string, required): The comment message
12
-
-`owner` (string, required): Repository owner
13
-
-`repo` (string, required): Repository name
14
-
-`pr_number` (number, required): Pull request number
15
-
16
10
### 2. `leave_inline_comment`
17
-
Leave inline comments on specific lines in pull requests.
18
-
19
-
**Parameters:**
20
-
-`message` (string, required): The comment message
21
-
-`owner` (string, required): Repository owner
22
-
-`repo` (string, required): Repository name
23
-
-`pr_number` (number, required): Pull request number
24
-
-`path` (string, required): File path for the inline comment
25
-
-`line` (number, required): Line number for the inline comment
11
+
Leave inline comments on specific lines in pull requests. Supports optional `suggested_fix` parameter for code suggestions.
26
12
27
13
### 3. `get_pr_comments`
28
14
Get all comments on a pull request.
29
15
30
-
**Parameters:**
31
-
-`owner` (string, required): Repository owner
32
-
-`repo` (string, required): Repository name
33
-
-`pr_number` (number, required): Pull request number
34
-
35
16
## Usage
36
17
37
18
### STDIO Server
38
19
39
20
Run the standalone MCP server for direct stdio communication:
40
21
41
22
```bash
42
-
npm run mcp
23
+
pnpm run mcp
43
24
```
44
25
45
26
Or build and run:
46
27
```bash
47
-
npm run mcp:build
28
+
pnpm run mcp:build
48
29
```
49
30
50
31
## Configuration
51
32
52
-
The server uses the same configuration as the main application. Make sure your `config.yml` and environment variables are properly set:
53
-
54
-
### Environment Variables
55
-
-`GITHUB_APP_ID` - GitHub App ID
56
-
-`GITHUB_APP_PRIVATE_KEY` or `GITHUB_APP_PRIVATE_KEY_PATH` - GitHub App private key
57
-
-`GITHUB_BASE_URL` - GitHub API URL (default: https://api.github.com)
58
-
59
-
### GitHub App Integration
60
-
The MCP server works with GitHub App installations for authentication. When accessing repositories, it uses the GitHub App's installation tokens rather than personal access tokens.
33
+
Uses the same configuration as the main application. Requires GitHub App credentials for authentication.
61
34
62
35
## Integration with AI Agents
63
36
@@ -80,25 +53,8 @@ amp:
80
53
81
54
This allows Amp to automatically use the GitHub MCP tools during code reviews.
82
55
83
-
### Example Usage in Prompts
84
-
85
-
```
86
-
You have access to GitHub tools. To review a pull request:
87
-
88
-
1. Use get_pr_comments to see existing feedback
89
-
2. Review the code changes
90
-
3. Use leave_inline_comment to add specific feedback
91
-
4. Use leave_general_comment for overall observations
92
-
93
-
Owner: octocat
94
-
Repo: Hello-World
95
-
PR Number: 123
96
-
```
97
-
98
56
### Code Review Workflow
99
57
100
-
The tools are designed to work together in a typical code review workflow:
101
-
102
58
1. **Check Existing Feedback**: `get_pr_comments` to see what's already been discussed
103
59
2. **Leave Feedback**:
104
60
- `leave_inline_comment`for specific line-level issues
0 commit comments