This repository has been archived on 2025-12-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Ben 10906ab115 Initial commit: Gitea MCP Server
- 6 curated MCP tools (get_my_user_info, search_repos, list_my_repos, get_repo, list_repo_issues, list_repo_commits)
- API pass-through tool (gitea_api_call) for complete API coverage
- Curated API reference resource (gitea://api-reference)
- Health check endpoint
- Docker support with health checks
2025-12-22 04:45:30 +00:00
2025-12-22 04:45:30 +00:00
2025-12-22 04:45:30 +00:00
2025-12-22 04:45:30 +00:00
2025-12-22 04:45:30 +00:00
2025-12-22 04:45:30 +00:00

Gitea MCP Server

A lightweight Model Context Protocol (MCP) server for Gitea, following the Hybrid MCP Light pattern.

Features

  • 5 Curated Tools for common operations
  • API Pass-through for complete API coverage
  • Embedded API Reference for agent self-service
  • Health Check Endpoint for Docker/Kubernetes

Tools

Tool Description
get_my_user_info Get authenticated user info
search_repos Search repositories by keyword
list_my_repos List user's accessible repositories
get_repo Get repository details
list_repo_issues List issues for a repository
list_repo_commits List commits for a repository
gitea_api_call Raw API pass-through for any endpoint

Resources

Resource URI Description
gitea://api-reference Quick reference for common API endpoints

Setup

Environment Variables

GITEA_URL=https://gitea.example.com
GITEA_TOKEN=your_access_token

Local Development

# Install dependencies
uv pip install -e .

# Run server
python server.py

Docker

# Build and run
docker compose up -d

# Check health
curl http://localhost:8000/health

MCP Client Configuration

Gemini CLI (~/.gemini/settings.json)

{
  "mcpServers": {
    "gitea": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

API Pass-through Examples

# Create a release
gitea_api_call(
    endpoint="/repos/myorg/myrepo/releases",
    method="POST",
    body='{"tag_name": "v1.0.0", "name": "Release 1.0"}'
)

# Get file contents
gitea_api_call(
    endpoint="/repos/myorg/myrepo/contents/README.md",
    params='{"ref": "main"}'
)

License

MIT

Description
Interactive with Gitea instances with MCP
Readme 14 MiB
Languages
Python 95.3%
Dockerfile 4.7%