🔄 MCP + Cursor GitHub Setup

by Ankitkushwaha90

2 stars
409 downloads
Not rated
GitHub

About

🔄 MCP + Cursor GitHub Setup Set up full GitHub control via Cursor once your MCP server is running. 🛠️ Step-by-Step Cursor Setup for MCP 🧭 1. Open Cursor Editor Launch Cursor, the AI-first code editor. Click Settings (bottom-left corner ⚙️).

Details

Author
Ankitkushwaha90
GitHub stars
2
Downloads
409
Categories
Developer Tools, Automation

- Create, update, read, and delete files in GitHub repos
- Create and delete GitHub repositories
- Search repositories with natural language queries
- Local MCP server running on http://localhost:3333
- Fine‑grained token authentication for secure access
- Terminal‑driven automation via npx @smithery/cli

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🔄 MCP + Cursor GitHub Setup
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

What are the prerequisites?

Node.js and npm installed, a GitHub account, the Cursor editor, and an MCP‑compatible agent setup with @modelcontextprotocol/sdk.

How do I configure authentication?

Create a fine‑grained GitHub personal access token with full repository and user read/write permissions, then place it under github.token in mcp.json.

What GitHub tools does the MCP server offer?

Tools include create_or_update_file, create_repository, delete_repository, get_file_contents, and search_repositories.

How can I test the server connection?

Run curl http://localhost:3333 — the server logs will show tool calls and API responses.

Can I use the server without Cursor?

Yes. You can execute commands via the terminal using npx @smithery/cli ask "your prompt".

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83d\udd04 mcp + cursor github setup": {
            "MCP_server_cursor_to_github": {
                "command": "node",
                "args": [
                    "server.js"
                ]
            }
        }
    }
}

McpServers

{
    "MCP_server_cursor_to_github": {
        "command": "node",
        "args": [
            "server.js"
        ]
    }
}

🔄 MCP + Cursor GitHub Setup

> Set up full GitHub control via Cursor once your MCP server is running.

🛠️ Step-by-Step Cursor Setup for MCP

🧭 1. Open Cursor Editor

- Launch Cursor, the AI-first code editor. - Click Settings (bottom-left corner ⚙️).

🌐 2. Navigate to MCP Section

- In Settings, scroll down to the MCP (Model Context Protocol) section. - Click "Add Server".

🔧 3. Fill in MCP Server Details

- Name: Local MCP Server - URL: http://localhost:3333 (or your configured port from server.js) - Client: Select ollama or your preferred LLM engine. - Auth: Leave blank for local use (behind firewall). Add headers if using token-based auth.

✅ Cursor is now connected to your MCP server!

⚙️ Make Sure Your MCP Server Is Running

Run your server locally from your terminal:
node server.js

Expected output:

✅ MCP server running at http://localhost:3333

🤖 Use Cursor Prompts to Control GitHub

With MCP connected, use the Cursor command palette:

<kbd>⌘ + K</kbd> / <kbd>Ctrl + K</kbd> → Type:

Create a private GitHub repo named ai-lab
Add README.md to ai-lab repo with initial text
Search repositories about 'android hacking tools'

> MCP GitHub plugin (@smithery-ai/github) handles GitHub API calls via your server.

✅ Available GitHub Tools via MCP

| Tool | Description |
|-----------------------|----------------------------------|
| create_or_update_file | Create or update files |
| create_repository | Create a new GitHub repository |
| delete_repository | Delete a repository (if supported) |
| get_file_contents | Read contents of files |
| search_repositories | Discover GitHub repositories |

These tools can be triggered through Cursor's prompt bar or:

npx @smithery/cli

🧠 Best Practice Tips

- Keep your mcp.json secure (especially GitHub tokens).
- Use environment variables for secrets in production.
- Test server connection with:

curl http://localhost:3333

> Logs will show tool calls and API responses for easier debugging.

---
title: "MCP Server + GitHub Cursor Setup Guide"
description: "Step-by-step guide for setting up MCP server with Cursor GitHub integration for repo automation, creation, deletion, and commit control."
---

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.