AI Code Review MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
node src/index.js
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN}" -e "WORKSPACE_PATH=${WORKSPACE_PATH}" ai-code-review -- node "<FULL_PATH_TO_REVIEW_CODE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_REVIEW_CODE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GITHUB_PERSONAL_ACCESS_TOKENWORKSPACE_PATH
README.md

GitHub and FileSystem integration for AI agents

AI Code Review MCP Server

Simple MCP server for GitHub and FileSystem integration with AI agents (Copilot, Claude, etc.)

🚀 Quick Start

1. Install Dependencies

npm install

2. Test MCP Server

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:

{
  "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

Tools (7)

github_list_reposList your repositories
github_list_prsList pull requests
github_get_prGet PR details
github_get_pr_diffGet PR diff for review
fs_read_fileRead file contents
fs_list_filesList directory contents
fs_search_filesSearch files by pattern

Environment Variables

GITHUB_PERSONAL_ACCESS_TOKENrequiredGitHub authentication token
WORKSPACE_PATHrequiredLocal path to the project workspace

Configuration

claude_desktop_config.json
{"mcpServers": {"ai-code-review": {"env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here", "WORKSPACE_PATH": "/path/to/workspace"}}}}

Try it

List my GitHub repositories to see what projects I have.
Show me the pull requests for the current repository.
Get the diff for PR #123 and summarize the changes.
Read the README.md file in the current directory.
Search for all files matching *.js in my workspace.

Frequently Asked Questions

What are the key features of AI Code Review?

List and manage GitHub repositories and pull requests. Retrieve detailed PR information and code diffs for review. Read and search local files within a restricted workspace. Path traversal protection for secure file system access.

What can I use AI Code Review for?

Automating code review summaries for incoming pull requests. Quickly searching and reading project files during development. Managing GitHub repository workflows directly from an AI chat interface.

How do I install AI Code Review?

Install AI Code Review by running: npm install && node src/index.js

What MCP clients work with AI Code Review?

AI Code Review works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep AI Code Review docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare