AI Code Review MCP Server
# AI Code Review MCP Server
Simple MCP server for GitHub and FileSystem integration with AI agents (Copilot, Claude, etc.)
## 🚀 Quick Start
### 1. Install Dependencies
```bash
npm install
```
### 2. Test MCP Server
```bash
node src/index.js
```
### 3. Use with Copilot
1. **Restart VS Code** (close and reopen)
2. **Open Copilot Chat** and ask:
- "List my GitHub repositories"
- "Show pull requests in owner/repo"
- "Read README.md file"
- "List files in current directory"
## 🛠️ Available Tools
### GitHub Tools
- `github_list_repos` - List your repositories
- `github_list_prs` - List pull requests
- `github_get_pr` - Get PR details
- `github_get_pr_diff` - Get PR diff for review
### FileSystem Tools
- `fs_read_file` - Read file contents
- `fs_list_files` - List directory contents
- `fs_search_files` - Search files by pattern
## ⚙️ Configuration
Edit `.mcp/config.json`:
```json
{
"mcpServers": {
"ai-code-review": {
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here",
"WORKSPACE_PATH": "/path/to/workspace"
}
}
}
}
```
## 📝 Usage Examples
### With Copilot Chat:
- "List my GitHub repositories"
- "Show me PR #123 in owner/repo"
- "Read the package.json file"
### With Other Agents:
The MCP server implements Model Context Protocol, compatible with:
- GitHub Copilot
- Claude Desktop
- Any MCP-compatible AI agent
## 🔒 Security
- GitHub token stored in config (add `.mcp/` to `.gitignore`)
- FileSystem access restricted to workspace path
- Path traversal protection built-in
TDQS
Scored across 7 tools
The tools are mostly distinct with clear purposes, but there is some potential overlap between fs_list_files and fs_search_files, as both involve listing files, which could cause minor confusion. However, their descriptions clarify that one lists all files while the other searches by pattern, helping to mitigate ambiguity.
The naming is mixed, with fs_* tools using a prefix and github_* tools using a different prefix, but within each group, the verb_noun pattern is consistent (e.g., fs_list_files, github_get_pr). This mixed convention reduces overall consistency, though it remains readable and functional.
With 7 tools, the count is reasonable for an AI code review server, covering file system operations and GitHub PR interactions. It is slightly lean but well-scoped, as each tool serves a specific purpose without obvious bloat or redundancy.
The tool surface has notable gaps for a code review domain, such as missing tools for creating or updating PRs, commenting on code, or analyzing code quality directly. While it covers basic file and PR retrieval, it lacks full lifecycle coverage, which could limit agent effectiveness in comprehensive code review workflows.