MG

mushroomfleet/gitea-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

17 stars 9 forks 품질 72 트렌드 21Apache-2.0

MCP server for Gitea — manage repos, issues, pull requests & organizations from AI coding assistants

개요

A production-ready Model Context Protocol (MCP) server for seamless integration with self-hosted Gitea platforms. This server provides tools for creating repositories and uploading files while preserving directory structure. This guide provides step-by-step instructions for installing and configuring the Gitea MCP server, including troubleshooting common issues. - : Create new repositories on any configured Gitea instance - : Upload files and folders while preserving directory structure - : Automatically sync entire projects for initial commits (new files only) - : Smart update tool with conflict resolution for modifying existing files - : Connect to multiple Gitea instances simultaneously - : Respect API rate limits per instance - : Efficient file upload with configurable batch sizes - : Structured logging with security-safe output - : Robust error handling with retry logic - : Full type safety and modern JavaScript features - Node.js 18.0.

README

원문 README의 일부입니다. 원문 보기.

Gitea MCP Server

A production-ready Model Context Protocol (MCP) server for seamless integration with self-hosted Gitea platforms. This server provides tools for creating repositories and uploading files while preserving directory structure.

Installation and Setup Guide

This guide provides step-by-step instructions for installing and configuring the Gitea MCP server, including troubleshooting common issues.

Features

  • Repository Creation: Create new repositories on any configured Gitea instance
  • File Upload: Upload files and folders while preserving directory structure
  • Project Sync: Automatically sync entire projects for initial commits (new files only)
  • Advanced File Updates: Smart update tool with conflict resolution for modifying existing files
  • Multi-Instance Support: Connect to multiple Gitea instances simultaneously
  • Rate Limiting: Respect API rate limits per instance
  • Batch Processing: Efficient file upload with configurable batch sizes
  • Comprehensive Logging: Structured logging with security-safe output
  • Error Handling: Robust error handling with retry logic
  • TypeScript: Full type safety and modern JavaScript features

Quick Start

Prerequisites

  • Node.js 18.0.0 or higher
  • Access to one or more Gitea instances
  • Personal access tokens for authentication

Installation

  1. Clone the repository:
git clone 
cd gitea-mcp
  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env.example .env
# Edit .env with your Gitea instance details
  1. Build the project:
npm run build
  1. Start the server:
npm run start:mcp

Troubleshooting Common Issues

Windows Compatibility

If you’re running on Windows, you might encounter issues with the build script. The default build script uses the chmod command, which is not available on Windows. The package.json has been updated to use a Windows-compatible build script.

Logging Configuration

If you encounter issues with the logging configuration, make sure you have the pino-pretty package installed:

npm install --save-dev pino-pretty

Environment Variables

The .env file should contain the following configuration:

# Server Configuration
NODE_ENV=development
LOG_LEVEL=debug

# Gitea Configuration
# Replace with your Gitea instance URL and token
GITEA_INSTANCES=[{"id":"main","name":"Main Gitea Instance","baseUrl":"https://your-gitea-instance.com","token":"your-personal-access-token","timeout":30000,"rateLimit":{"requests":100,"windowMs":60000}}]

# Upload Configuration
MAX_FILE_SIZE=10485760
MAX_FILES=100
BATCH_SIZE=10

# Gitea API Configuration
GITEA_TIMEOUT=30000
GITEA_MAX_RETRIES=3
GitHub에서 전체 README 보기

설치

docker run -d \
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "gitea-mcp": { "command": "node", "args": ["./build/index.js"], "cwd": "/path/to/gitea-mcp", "env": { "NODE_ENV": "production", "LOG_LEVEL": "info" } } } }