# GitHub MCP Server
A Model Context Protocol (MCP) server that provides comprehensive GitHub integration for Claude Desktop.
## Quick Setup
### 1. Get the Complete Source Code
The complete `src/index.ts` file (613 lines) is available in the files I shared with you. Look for the file named `COMPLETE-INDEX-TS.txt`.
**To create the index.ts file:**
1. Open the `COMPLETE-INDEX-TS.txt` file
2. Copy everything EXCEPT the first 3 comment lines
3. Save it as `src/index.ts` in this directory
Alternatively, you can download the complete `src/index.ts` from the original package files.
### 2. Install Dependencies
```bash
npm install
```
### 3. Build the Project
```bash
npm run build
```
### 4. Create GitHub Personal Access Token
1. Visit: https://github.com/settings/tokens/new
2. Name it: "Claude MCP Server"
3. Select scopes:
- ✅ `repo` (Full control of private repositories - includes all sub-scopes)
- ✅ `user:read` (Read user information)
- ✅ `read:org` (Read organization data)
4. Click "Generate token"
5. **Copy the token immediately**
### 5. Configure Claude Desktop
Edit your Claude Desktop config file:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
Add this configuration:
```json
{
"mcpServers": {
"github": {
"command": "node",
"args": ["C:\\Users\\DavidFurry\\Documents\\Github-MCP-Claude-Desktop\\dist\\index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
}
```
Replace `your_github_token_here` with your actual GitHub token.
### 6. Restart Claude Desktop
Completely quit and restart Claude Desktop.
## Features
✅ **Repositories** - List, get, create
✅ **Issues** - Full CRUD + comments
✅ **Pull Requests** - Create, merge, list
✅ **Files** - Read and write
✅ **Branches** - List and create
✅ **Search** - Repos, code, issues
✅ **Users** - Get user info
## Usage Examples
Once installed:
```
List my GitHub repositories
```
```
Create a new repository called my-awesome-project
```
```
Search GitHub for TypeScript MCP servers
```
```
List open issues in facebook/react
```
## Troubleshooting
### Server not found
- Check the path in config is absolute and correct
- Verify `dist/index.js` exists
- Make sure you ran `npm run build`
### Authentication failed
- Verify token is correct
- Check token hasn't expired
- Ensure token has correct scopes
### Build fails
```bash
rm -rf node_modules dist
npm install
npm run build
```
## Security
⚠️ **Never commit your GitHub token to version control**
- Keep your token secure
- Use minimal required permissions
- Set token expiration (90 days recommended)
## License
MIT