By Tomer Erusalimsky
January 14, 2025 • 1 min read
You can use an MCP (Model Context Protocol) in Cursor to stage, commit, push, pull, create branches and even create pull requests directly from your IDE.
To configure the MCP on your repo, add the following code to the .cursor/mcp.json
file:
{ "mcpServers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "https://lnkd.in/dZVFzbWR" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_access_token" } } } }
Make sure you replace your_github_access_token
with your own generated GitHub access token.
⚠️ Important: Make sure the token has:
repo
scope access authorizationWith this MCP configured, you can perform Git operations directly from Cursor:
This integration streamlines your development workflow by keeping you in your editor while managing version control operations.
For more information, check the official documentation.