MCP server providing GitHub operations (read/write) for ChatGPT.
Required in Railway:
GITHUB_TOKEN- Your GitHub personal access tokenMCP_API_KEY- (Optional) API key for securing the endpointPORT- Automatically set by Railway (3000 locally)
- Create new project in Railway
- Connect to this GitHub repo or deploy from local files
- Set environment variables in Railway dashboard
- Deploy
npm install
GITHUB_TOKEN=your_token_here npm startlist_repositories- List all accessible reposget_file- Read file contentscreate_or_update_file- Write/update filescreate_branch- Create new branchescreate_pull_request- Create PRs
After deployment, add this to ChatGPT MCP settings:
{
"github": {
"type": "sse",
"url": "https://your-railway-url.railway.app/sse",
"headers": {
"Authorization": "Bearer YOUR_MCP_API_KEY"
}
}
}