From c0402b449158d73582d8fb7b41da2ac4f5acf9d9 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 22 Dec 2025 04:50:49 +0000 Subject: [PATCH] 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 Gitea Actions CI - docker-compose.yml for production, docker-compose.dev.yml for local builds --- .gitea/workflows/build.yaml | 30 ++++++++++++++++++++++++++++++ docker-compose.dev.yml | 17 +++++++++++++++++ docker-compose.yml | 7 ++++--- 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/build.yaml create mode 100644 docker-compose.dev.yml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..7ab0fc4 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,30 @@ +name: Build and Push Gitea MCP Docker Image + +on: + push: + branches: + - main + - master + +jobs: + build: + runs-on: docker + container: + image: catthehacker/ubuntu:act-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Login to Gitea Container Registry + uses: docker/login-action@v2 + with: + registry: gitea.ext.ben.io + username: ${{ gitea.actor }} + password: ${{ secrets.CR_PAT }} + + - name: Build and Push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: gitea.ext.ben.io/${{ gitea.repository }}:latest diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..9a732e9 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,17 @@ +# Development compose file - builds from local source +# Usage: docker compose -f docker-compose.dev.yml up --build +services: + gitea-mcp: + build: . + container_name: gitea-mcp-dev + restart: "no" + ports: + - "8000:8000" + env_file: + - .env + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s diff --git a/docker-compose.yml b/docker-compose.yml index e875e05..250f56f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,13 @@ services: gitea-mcp: - build: . + image: gitea.ext.ben.io/b3nw/gitea-mcp-custom:latest container_name: gitea-mcp restart: unless-stopped ports: - "8000:8000" - env_file: - - .env + environment: + - GITEA_URL=${GITEA_URL} + - GITEA_TOKEN=${GITEA_TOKEN} healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s