Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

GitChanger MCP Server ⚡

License: MIT MCP GitHub

Official Model Context Protocol (MCP) server for GitChanger (gitchanger).

Allows AI assistants (Claude Desktop, Cursor, Antigravity / Gemini CLI, VS Code / Roo Code / Cline) to seamlessly inspect Git repositories, switch between multiple Git accounts and SSH configurations, and synchronize GitHub MCP Personal Access Tokens automatically.


🚀 Features

  • 🔄 Automatic Git Account Switching: Let your AI assistant switch your active Git profile (author name, email, SSH keys, signing keys, and remote URLs) per repository or globally.
  • 🤖 GitHub MCP Token Synchronization: Synchronize GitHub Personal Access Tokens (PATs) across all your MCP-enabled tools (@modelcontextprotocol/server-github) when changing profiles.
  • 🔍 Diagnostics & Scanning: Query Git identities, active remotes, loaded SSH keys, and system MCP configurations on demand.
  • 🛡 Security by Design: Masked tokens by default, atomic configuration updates, and full compatibility with existing ~/.ssh/config blocks.

🛠 Available MCP Tools

Tool Description
gitchanger_status Show current repository Git identity, matching profile, remote URLs, and active MCP token status.
gitchanger_list List all configured Git profiles in GitChanger.
gitchanger_switch Switch active Git profile for current repository or globally (auto-updates SSH agent & MCP tokens).
gitchanger_add Add a new Git profile (name, email, transport, key, host alias, GitHub token).
gitchanger_delete Delete a Git profile and optionally clean up SSH host configuration.
gitchanger_set_default Set a profile as the default Git profile.
gitchanger_test_ssh Test SSH network and key authentication for a specific profile.
gitchanger_scan Scan ~/.ssh and SSH config for keys and hosts, and find all MCP client configs.
gitchanger_mcp_status Show status of GitHub MCP tokens across profiles and detected AI client configurations.
gitchanger_mcp_set Set GitHub Personal Access Token for a profile or directly in MCP client configs.
gitchanger_mcp_get Retrieve configured GitHub MCP token for a profile or active configuration.
gitchanger_mcp_sync Sync a profile's GitHub token to all detected MCP client configuration files.
gitchanger_mcp_test Test and verify token validity, login, and OAuth scopes against GitHub API.
gitchanger_mcp_remove Remove GitHub MCP token from a profile and/or MCP client configs.

📦 Resources

URI MIME Type Description
gitchanger://profiles application/json List of all configured Git profiles in JSON format.
gitchanger://status text/plain Formatted status of current repository and active Git identity.

📦 Installation & Setup

Prerequisites

  1. Install GitChanger CLI:

    git clone https://github.com/culcat/GitChangerCLI.git
    cd GitChangerCLI
    cargo install --path .

    Ensure gitchanger is accessible in your $PATH (typically ~/.cargo/bin).

  2. Clone and build GitChangerMCP:

    git clone git@github.com:culcat/GitChangerMCP.git
    cd GitChangerMCP
    npm install
    npm run build

⚙️ Configuration in AI Clients

1. Google Antigravity / Gemini CLI (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "gitchanger": {
      "command": "node",
      "args": ["/path/to/GitChangerMCP/dist/index.js"]
    }
  }
}

2. Claude Desktop

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gitchanger": {
      "command": "node",
      "args": ["/path/to/GitChangerMCP/dist/index.js"]
    }
  }
}

3. Cursor (~/.cursor/mcp.json or project .cursor/mcp.json)

{
  "mcpServers": {
    "gitchanger": {
      "command": "node",
      "args": ["/path/to/GitChangerMCP/dist/index.js"]
    }
  }
}

4. VS Code (Cline / Roo Code)

Add under mcpServers in your extension settings:

{
  "gitchanger": {
    "command": "node",
    "args": ["/path/to/GitChangerMCP/dist/index.js"]
  }
}

💬 Example Prompts

Once configured, you can simply ask your AI assistant:

  • "What Git account am I currently using in this repository?"
  • "Switch this repo to my 'work' profile and verify the SSH connection."
  • "List all my configured Git profiles and show which one is default."
  • "Add a new Git profile for 'freelance' with email dev@client.com using SSH."
  • "Sync my GitHub MCP token with my work profile."
  • "Verify my GitHub MCP token against the GitHub API."

📄 License

Distributed under the MIT License.
Author: culcat

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages