TypeScript MCP server for automating GitHub repository operations from AI agents.
- Lists repositories for the authenticated user
- Fetches repository details
- Creates repositories
- Updates repository settings
- Lists repository contents
- Deletes repositories
- Returns authenticated user profile data
- Node.js
- TypeScript
@modelcontextprotocol/sdk@octokit/rest- Zod
git clone https://github.com/canburakyol/github-mcp-server.git
cd github-mcp-server
npm ciSet your token:
# Linux/macOS
export GITHUB_TOKEN=your_personal_access_token
# Windows PowerShell
$env:GITHUB_TOKEN="your_personal_access_token"Build and run:
npm run build
npm run start{
"github-server": {
"command": "node",
"args": ["/absolute/path/to/github-mcp-server/build/index.js"],
"env": {
"GITHUB_TOKEN": "your_personal_access_token"
}
}
}npm run dev: TypeScript watch modenpm test: Compile and run unit testsnpm run check: Full local verification
- Unit tests for repository output mapping
- CI workflow on push and pull request (
.github/workflows/ci.yml) node_modulesandbuildexcluded from version control- MIT license included
Use a minimum-scope GitHub PAT and rotate it regularly. Never commit tokens to source control.
MIT