
Git
Manages Git repositories through MCP operations like listing repos, handling tags, and viewing commit history without requiring direct shell access.
Provides Git operations for local repositories, enabling repository management, tag handling, and repository refreshing without direct shell access.
What it does
- List Git repositories in configured directory
- Get the most recent Git tag from repositories
- View commit history since last tag
- Create new Git tags with optional messages
Best for
About Git
Git is a community-built MCP server published by kjozsa that provides AI assistants with tools and capabilities via the Model Context Protocol. Create a local git repo easily with Git MCP: manage repositories, handle tags, and refresh repos without shell access. It is categorized under developer tools.
How to install
You can install Git in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Git is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Git MCP
MCP server for managing Git operations on local repositories.
Installation
Installing via Smithery
To install Git MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kjozsa/git-mcp --client claude
Installing Manually
uvx install git-mcp
Configuration
Add the MCP server using the following JSON configuration snippet:
{
"mcpServers": {
"git-mcp": {
"command": "uvx",
"args": ["git-mcp"],
"env": {
"GIT_REPOS_PATH": "/path/to/your/git/repositories"
}
}
}
}
Features and Usage
Environment Variables
GIT_REPOS_PATH: Path to the directory containing your Git repositories (required)
You can set this in your environment or create a .env file in the directory where you run the server.
Available Methods
list_repositories
Lists all Git repositories in the configured path.
- Parameters: None
- Returns: List of repository names
get_last_git_tag
Finds the last Git tag in the specified repository.
- Parameters:
repo_name(Name of the Git repository) - Returns: Dictionary with
version(tag name) anddate(tag creation date)
list_commits_since_last_tag
Lists commit messages between the last Git tag and HEAD.
- Parameters:
repo_name: Name of the Git repositorymax_count(optional): Maximum number of commits to return
- Returns: List of dictionaries with
hash,author,date, andmessage
create_git_tag
Creates a new git tag in the specified repository.
- Parameters:
repo_name: Name of the git repositorytag_name: Name of the tag to createmessage(optional): Message for annotated tag (if not provided, creates a lightweight tag)
- Returns: Dictionary with
status,version(tag name),date(tag creation date), andtype(annotated or lightweight)
push_git_tag
Pushes an existing git tag to the default remote repository.
- Parameters:
repo_name: Name of the git repositorytag_name: Name of the tag to push
- Returns: Dictionary with
status,remote(name of the remote),tag(name of the tag), andmessage(success message)
refresh_repository
Refreshes a repository by checking out the main branch (or master as fallback) and pulling from all remotes.
- Parameters:
repo_name: Name of the git repository
- Returns: Dictionary with
status,repository,branch, andpull_results(results for each remote)
Troubleshooting
- Repository Not Found: Ensure
GIT_REPOS_PATHis set correctly and the repository exists - No Tags Found: The repository doesn't have any tags yet
Development
# Install dependencies
uv pip install -r requirements.txt
# Run in dev mode with Inspector
mcp dev git_mcp/server.py
Testing
The project includes two test scripts:
test_git_mcp.py- Tests the underlying Git command functionality directly, without using the MCP server.test_mcp_server.py- Tests the MCP server functionality by starting a server instance and making calls to it.
To run the tests:
# Test the Git command functionality
python test_git_mcp.py
# Test the MCP server (requires the git-mcp package to be installed)
python test_mcp_server.py
Alternatives
Related Skills
Browse all skillsUI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.
Find, connect, and use MCP tools and skills via the Smithery CLI. Use when the user searches for new tools or skills, wants to discover integrations, connect to an MCP, install a skill, or wants to interact with an external service (email, Slack, Discord, GitHub, Jira, Notion, databases, cloud APIs, monitoring, etc.).
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.