
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ai-agent-github-mcp-server
Advanced tools
MCP server for GitHub integration - review pull requests, read code for context
A Model Context Protocol (MCP) server for GitHub integration, enabling AI agents to review pull requests, read code for context, and interact with GitHub repositories.
npm install
npm run build
The server requires a GitHub Personal Access Token. You can create one at: https://github.com/settings/tokens
For full functionality, your token should have these scopes:
repo
- Full control of private repositories (includes read access to public repos)read:user
- Read user profile dataread:org
- Read organization membership (if working with org repos)For public repositories only:
public_repo
- Access to public repositoriesSet your token as an environment variable:
# Option 1: GITHUB_TOKEN (recommended)
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
# Option 2: GITHUB_API_KEY (alternative)
export GITHUB_API_KEY=ghp_xxxxxxxxxxxxxxxxxxxx
# Development mode
npm run dev
# Production mode
npm start
Add to your agent's agent.yaml
:
mcpServers:
- name: github
url: node ./mcp-servers/github/dist/server.js
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
required: false # Set to true if GitHub access is essential
github_list_pull_requests
- List PRs for a repositorygithub_get_pull_request
- Get detailed PR informationgithub_get_pull_request_files
- Get files changed in a PRgithub_get_pull_request_diff
- Get the unified diffgithub_create_pull_request_review
- Create a PR reviewgithub_list_pull_request_reviews
- List PR reviewsgithub_get_repository
- Get repository informationgithub_get_file_content
- Read file contentsgithub_list_repository_contents
- List directory contentsgithub_search_code
- Search code with queriesgithub_list_branches
- List repository branchesgithub_get_commit
- Get commit detailsgithub_list_issues
- List repository issuesgithub_get_issue
- Get issue detailsgithub_create_issue_comment
- Add comments to issues/PRsgithub_list_issue_comments
- List issue comments// List open PRs
await tools.github_list_pull_requests({
owner: "octocat",
repo: "Hello-World",
state: "open"
});
// Get PR details
await tools.github_get_pull_request({
owner: "octocat",
repo: "Hello-World",
pull_number: 42
});
// Get the diff for review
await tools.github_get_pull_request_diff({
owner: "octocat",
repo: "Hello-World",
pull_number: 42
});
// Create a review
await tools.github_create_pull_request_review({
owner: "octocat",
repo: "Hello-World",
pull_number: 42,
body: "Looks good to me! Just a few minor suggestions.",
event: "APPROVE",
confirm: true
});
// Get repository structure
await tools.github_list_repository_contents({
owner: "octocat",
repo: "Hello-World",
path: "src"
});
// Read a specific file
await tools.github_get_file_content({
owner: "octocat",
repo: "Hello-World",
path: "src/main.js",
ref: "main"
});
// Search for specific code patterns
await tools.github_search_code({
q: "function handleError repo:octocat/Hello-World"
});
// List open issues
await tools.github_list_issues({
owner: "octocat",
repo: "Hello-World",
state: "open",
labels: "bug,high-priority"
});
// Add a comment to an issue
await tools.github_create_issue_comment({
owner: "octocat",
repo: "Hello-World",
issue_number: 123,
body: "I can reproduce this issue. Working on a fix.",
confirm: true
});
GitHub API has the following rate limits:
The server includes appropriate error handling for rate limit scenarios.
The server provides detailed error messages for common scenarios:
src/
├── server.ts # Main MCP server entry point
├── auth/
│ └── api-key-manager.ts # GitHub token management
├── handlers/
│ ├── pull-requests.ts # PR operations
│ ├── repository.ts # Repository operations
│ └── issues.ts # Issue operations
└── types/
└── index.ts # TypeScript type definitions
npm run build
# Test the server directly
echo '{"method": "tools/list"}' | npm run dev
# Test with authentication
GITHUB_TOKEN=your_token npm run dev
MIT License - see LICENSE file for details.
For issues and questions:
FAQs
MCP server for GitHub integration - review pull requests, read code for context
The npm package ai-agent-github-mcp-server receives a total of 1 weekly downloads. As such, ai-agent-github-mcp-server popularity was classified as not popular.
We found that ai-agent-github-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.