Skip to main content
Glama

Git MCP

by Andre-Buzeli

Git MCP Server v2.6.1

🚀 Complete MCP Server for Gitea Self-Hosted - 18 tools with 100+ actions including AI code review, enhanced validation and automated DevOps workflows

🎯 Overview

Git MCP Server v2.6.1 é um servidor MCP moderno em TypeScript, focado em Gitea self-hosted e com suporte completo a multi-provedor (GitHub + Gitea simultaneamente). Inclui arquitetura de providers unificada, documentação abrangente, boas práticas, validações aprimoradas, nova tool de code-review com IA e guia para uso individual (solo).

✨ Features

🛠️ 18 Tools

  1. repositories - Complete repository management with cloning, archiving, templates
  2. branches - Branch operations with enhanced validation
  3. files - File and directory management with search capabilities
  4. commits - Commit operations with search and creation
  5. issues - Issue management with advanced search
  6. pulls - Pull request management with reviews
  7. releases - Release management with enhanced validation
  8. tags - Tag management with search
  9. users - User operations with search
  10. webhooks - Webhook management with testing
  11. code-review - AI-powered code analysis and review suggestions ⭐ NEW
  12. git-sync - Cross-provider repository synchronization with bidirectional sync
  13. version-control - Versioning, backup and change tracking system with semantic versioning
  14. workflows - CI/CD workflow management
  15. actions - GitHub Actions management
  16. deployments - Deployment tracking and rollbacks
  17. security - Security scanning and compliance
  18. analytics - Repository insights and analytics

🚀 Multi-Provider Complete (GitHub + Gitea simultaneamente)

🔧 Technical Features

  • TypeScript: Full type safety and modern development
  • Zod Validation: Input/output schema validation
  • Axios Client: Robust HTTP client with interceptors
  • Error Handling: Comprehensive error management
  • Debug Mode: Detailed logging for development
  • Self-Hosted Focus: Optimized for Gitea instances

📦 Installation

npx @andrebuzeli/gitea-mcp-v2

Global Installation

npm install -g @andrebuzeli/gitea-mcp-v2

⚙️ Configuration

Demo Mode

Para testar o servidor sem configurar providers reais:

DEMO_MODE=true npx @andrebuzeli/gitea-mcp-v2

O modo demo permite:

  • ✅ Testar todas as funcionalidades sem APIs reais
  • ✅ Desenvolvimento e debugging
  • ✅ Demonstrações e tutoriais
  • ⚠️ Não executa operações reais nos repositórios

Environment Variables

GITEA_URL=http://your-gitea-instance:3000 GITEA_TOKEN=your_personal_access_token GITEA_USERNAME=your_username DEBUG=false TIMEOUT=30000 DEMO_MODE=false # Set to 'true' for testing without real providers

MCP Configuration

Single Provider (Gitea)
{ "mcpServers": { "gitea": { "command": "npx", "args": ["@andrebuzeli/gitea-mcp-v2"], "env": { "GITEA_URL": "http://your-gitea-instance:3000", "GITEA_TOKEN": "your_personal_access_token", "GITEA_USERNAME": "your_username" } } } }
Single Provider (GitHub)
{ "mcpServers": { "github": { "command": "npx", "args": ["@andrebuzeli/gitea-mcp-v2"], "env": { "GITHUB_TOKEN": "your_github_token", "GITHUB_USERNAME": "your_github_username" } } } }
Multi-Provider (GitHub + Gitea Simultaneamente)
{ "mcpServers": { "gitea-mcp": { "command": "npx", "args": ["@andrebuzeli/gitea-mcp-v2"], "env": { "PROVIDERS_JSON": "[{\"name\":\"gitea\",\"type\":\"gitea\",\"apiUrl\":\"http://your-gitea:3000/api/v1\",\"token\":\"your_gitea_token\"},{\"name\":\"github\",\"type\":\"github\",\"apiUrl\":\"https://api.github.com\",\"token\":\"your_github_token\"}]", "DEFAULT_PROVIDER": "gitea" } } } }
Multi-Provider com Variáveis Separadas
{ "mcpServers": { "gitea-mcp": { "command": "npx", "args": ["@andrebuzeli/gitea-mcp-v2"], "env": { "GITEA_URL": "http://your-gitea:3000/api/v1", "GITEA_TOKEN": "your_gitea_token", "GITHUB_TOKEN": "your_github_token", "DEFAULT_PROVIDER": "gitea" } } } }

🚀 Usage Examples

Repository Management

{ "tool": "repositories", "arguments": { "action": "create", "name": "my-new-repo", "description": "A new repository", "private": false } }

Issue Creation

{ "tool": "issues", "arguments": { "action": "create", "owner": "username", "repo": "repository", "title": "Bug report", "body": "Description of the issue", "labels": ["bug", "priority-high"] } }

File Operations

{ "tool": "files", "arguments": { "action": "create", "owner": "username", "repo": "repository", "path": "src/main.js", "content": "console.log('Hello World');", "message": "Add main.js file" } }

🔐 Authentication

Personal Access Token

  1. Go to your Gitea instance
  2. Navigate to SettingsApplications
  3. Generate a new Personal Access Token
  4. Grant necessary permissions:
    • repo - Repository access
    • user - User information
    • write:repo_hook - Webhook management

Permissions Required

  • Read: Repository content, issues, pull requests
  • Write: Create/update repositories, files, issues, PRs
  • Admin: Webhook management, repository settings

🏗️ Architecture

Project Structure

src/ ├── index.ts # Entry point ├── server.ts # MCP Server setup ├── config.ts # Configuration management ├── client.ts # Gitea API client └── tools/ # Tool implementations ├── repositories.ts ├── branches.ts ├── files.ts ├── commits.ts ├── issues.ts ├── pulls.ts ├── releases.ts ├── tags.ts ├── users.ts └── webhooks.ts

Design Principles

  • Modular: Each tool is self-contained
  • Type-Safe: Full TypeScript coverage
  • Validated: Zod schemas for all inputs/outputs
  • Consistent: Uniform API across all tools
  • Documented: Comprehensive JSDoc comments

🐛 Debugging

Enable Debug Mode

DEBUG=true npx @andrebuzeli/gitea-mcp-v2

Debug Output

  • HTTP request/response logging
  • Configuration validation
  • Error stack traces
  • Performance metrics

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Development Setup

git clone https://github.com/andrebuzeli/gitea-mcp-v2.git cd gitea-mcp-v2 npm install npm run dev

📄 License

MIT License - see LICENSE file for details.

🆚 Comparison

vs Official Gitea MCP (Go)

FeatureGitea MCP v2.0 (Node.js)Official (Go)
Tools10 multifunctional40+ single-purpose
Actions65+ total40+ total
LanguageTypeScript/Node.jsGo
Type SafetyFull Zod validationGo types
InstallationNPM/NPXBinary download
ConfigurationEnvironment variablesCLI arguments
DebuggingRich loggingBasic logging
MaintenanceCommunityOfficial

Advantages

  • Organized: Logical tool grouping
  • Modern: TypeScript ecosystem
  • Flexible: Multiple actions per tool
  • Validated: Input/output validation
  • Documented: Comprehensive documentation

🎉 Changelog

v2.1.2

  • 📄 Added solo usage guide (docs/guia-gitea-solo.md)
  • 📝 Updated docs and descriptions
  • 🔖 Prepared release and tagging guidance for solo users

v2.1.1

  • 📚 Enhanced tool documentation - All 10 tools now have comprehensive JSDoc comments with parameters, actions, and direct instructions
  • 🗑️ Removed emojis from console logs and code comments
  • 📖 Added detailed instructions and recommendations for each tool and method
  • 🔧 Improved code structure with better organization and clarity
  • 🎯 Enhanced developer experience with clear usage examples and best practices

v2.1.0

  • 📚 Comprehensive code documentation
  • 🧹 Removed emojis for professional use
  • 📖 Added detailed usage instructions
  • 🔧 Enhanced code comments and recommendations
  • 📋 Improved development guidelines
  • 🎯 Better error handling documentation
  • 🚀 Enhanced developer experience

v2.0.0

  • 🎯 Complete rewrite from scratch
  • 🛠️ 10 multifunctional tools
  • 🔧 TypeScript implementation
  • ✅ Zod validation
  • 📚 Basic documentation
  • 🐛 Debug mode support
  • 🚀 NPM package distribution

Made with ❤️ for the Gitea community

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables comprehensive Git and GitHub operations through 30 DevOps tools including repository management, file operations, workflows, and advanced Git features. Provides complete Git functionality without external dependencies for seamless integration with Gitea and GitHub platforms.

  1. 🎯 Overview
    1. ✨ Features
      1. 🛠️ 18 Tools
      2. 🔧 Technical Features
    2. 📦 Installation
      1. NPX (Recommended)
      2. Global Installation
    3. ⚙️ Configuration
      1. Demo Mode
      2. Environment Variables
      3. MCP Configuration
    4. 🚀 Usage Examples
      1. Repository Management
      2. Issue Creation
      3. File Operations
    5. 🔐 Authentication
      1. Personal Access Token
      2. Permissions Required
    6. 🏗️ Architecture
      1. Project Structure
      2. Design Principles
    7. 🐛 Debugging
      1. Enable Debug Mode
      2. Debug Output
    8. 🤝 Contributing
      1. Development Setup
    9. 📄 License
      1. 🔗 Links
        1. 🆚 Comparison
          1. vs Official Gitea MCP (Go)
          2. Advantages
        2. 🎉 Changelog
          1. v2.1.2
          2. v2.1.1
          3. v2.1.0
          4. v2.0.0

        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/Andre-Buzeli/git-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server