mdabdullahfaruque/github-mcp-server
If you are the rightful owner of github-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server that provides GitHub API integration.
GitHub MCP Server
A Model Context Protocol (MCP) server that provides GitHub API integration.
Features
- 🔍 Search repositories
- 📁 Get repository details and contents
- 🐛 Create and list issues
- 🏷️ Manage labels and states
Setup
-
Install dependencies:
npm install -
Create a GitHub Personal Access Token:
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scopes:
repo,read:user - Copy the token
-
Configure environment:
cp .env.example .env # Edit .env and add your GitHub token -
Run the server:
npm start
Available Tools
search_repositories
Search for GitHub repositories.
Parameters:
query(required): Search querysort: Sort field (stars, forks, updated)order: Sort order (asc, desc)per_page: Results per page (max 100)
get_repository
Get details about a specific repository.
Parameters:
owner(required): Repository ownerrepo(required): Repository name
get_repository_contents
Get contents of a file or directory in a repository.
Parameters:
owner(required): Repository ownerrepo(required): Repository namepath(required): Path to file or directoryref: Branch, tag, or commit SHA
create_issue
Create a new issue in a repository.
Parameters:
owner(required): Repository ownerrepo(required): Repository nametitle(required): Issue titlebody: Issue bodylabels: Array of label names
list_issues
List issues in a repository.
Parameters:
owner(required): Repository ownerrepo(required): Repository namestate: Issue state (open, closed, all)labels: Comma-separated list of labelsper_page: Results per page (max 100)
Integration with SplitCosts
This GitHub MCP server can be used alongside your SplitCosts project to:
- Track issues related to cost splitting features
- Search for similar open-source projects
- Manage project documentation and collaboration
- Automate GitHub workflows related to your project
Usage Examples
With Claude Desktop
Add this to your Claude Desktop configuration:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp-server/index.js"]
}
}
}
Standalone Testing
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node index.js