MCP Server Git
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LANGUAGE | No | Language for messages (en, zh, zh-CN, zh-TW) (default: en) | en |
| NO_PROXY | No | Comma-separated list of hosts that should not use proxy | |
| ALL_PROXY | No | Universal proxy URL for all protocols | |
| REPO_NAME | No | Repository identifier for logging and identification | |
| HTTP_PROXY | No | HTTP proxy URL (e.g., http://proxy.company.com:8080) | |
| HTTPS_PROXY | No | HTTPS proxy URL (e.g., http://proxy.company.com:8080) | |
| MCP_LOG_DIR | No | Directory for log files (default: ./.setting or ./.setting.{REPO_NAME}) | |
| REMOTE_NAME | No | Remote name (default: origin) | origin |
| SOCKS_PROXY | No | SOCKS5 proxy URL (e.g., socks5://proxy.company.com:1080) | |
| TOOL_PREFIX | No | Prefix for MCP tool names (default: empty) | |
| LOCAL_BRANCH | Yes | Local branch name to push from | |
| MCP_LOG_FILE | No | Log filename (default: mcp-git.log) | mcp-git.log |
| PROJECT_PATH | Yes | Absolute path to the git repository | |
| REMOTE_BRANCH | Yes | Remote branch name to push to | |
| GIT_PUSH_FLAGS | No | Additional git push flags (default: --progress) | --progress |
| MCP_CHANGES_FILE | No | Pending changes filename (default: pending-changes.json) | pending-changes.json |
| PULL_SOURCE_BRANCH | No | Source branch for git_pull (default: same as REMOTE_BRANCH) | |
| MCP_PUSH_HISTORY_FILE | No | Push history filename (default: push-history.json) | push-history.json |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| git_pullA | Execute git pull command from "origin/main" to the current branch. Pull command: git pull origin main |
| git_pushA | Execute git push command from "main" to "origin/main" in project path "/app/repo". Push command: git push origin main:main --progress ⚠️ REQUIREMENT: You MUST call get_pending_changes to review changes before using this tool. USAGE:
Please provide the commit message in English language. NOTE: If the push result contains a branch merge URL (such as a pull request URL), please output it to the user. If you can open a browser, you may also automatically open the URL. The review status is reset after each push attempt (success or failure). |
| get_push_historyA | Get the last 5 push history records for the git repository. This tool should be called before using git_push to ensure the current changes have not been pushed before. |
| get_operation_logsB | Get operation logs for debugging and monitoring purposes. |
| save_changesA | Save pending changes before pushing. This tool records modified files and change content for review before git push. USAGE: Call this tool to save your changes before pushing. The saved changes must be reviewed using get_pending_changes before git_push can proceed. Please provide the change description in English language. Example: {"files": ["src/main.js", "src/utils.js"], "content": "Fixed bug in user authentication"} |
| get_pending_changesA | Get pending changes that need to be reviewed before pushing. This tool MUST be called before git_push to enable pushing. USAGE: Call this tool to view and review all pending changes. This will mark changes as reviewed, allowing git_push to proceed. The review status is reset after each push attempt. By default, this tool returns ALL pending changes (limit=1000). Use smaller limit values for pagination if needed. Examples: {} - View and review ALL changes (default) {"limit": 10, "offset": 0} - View and review first 10 changes {"limit": 50} - View and review first 50 changes NOTE: Review status is valid only for the next push attempt. You may need to review again for subsequent pushes. |
| git_statusB | Show the working directory and staging area status. USAGE: Call this tool to see which files have been modified, added, or deleted in your working directory and staging area. Example: {} |
| git_diffB | Show changes between working directory and HEAD or staging area. USAGE: Call this tool to see the differences between your working directory and the last commit, or between staging area and HEAD. Examples: {} - Show all unstaged changes {"staged": true} - Show staged changes {"files": ["src/main.js"]} - Show changes for specific file(s) |
| git_addA | Add file contents to the staging area. USAGE: Call this tool to stage files for commit. Use "." to add all changes, or specify specific files. Examples: {} - Add all changes (equivalent to "git add .") {"files": ["src/main.js", "src/utils.js"]} - Add specific files {"files": ["*.js"]} - Add files matching pattern (use shell expansion) |
| git_logB | Show commit history. USAGE: Call this tool to view the commit history of the repository. Examples: {} - Show last 10 commits with full details {"limit": 5} - Show last 5 commits {"limit": 20, "oneline": true} - Show last 20 commits in oneline format |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/liliangshan/mcp-server-git'
If you have feedback or need assistance with the MCP directory API, please join our Discord server