From be8c2cf7d7a269293b63c8d22f4eb6270b893aab Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Sun, 19 Apr 2026 07:28:37 +0800 Subject: [PATCH] added agentmail-mcp image --- .gitea/workflows/build-agentmail-mcp.yaml | 34 +++++++++++++++++++++++ agentmail-mcp/Dockerfile | 14 ++++++++++ agentmail-mcp/entrypoint.sh | 12 ++++++++ 3 files changed, 60 insertions(+) create mode 100644 .gitea/workflows/build-agentmail-mcp.yaml create mode 100644 agentmail-mcp/Dockerfile create mode 100644 agentmail-mcp/entrypoint.sh diff --git a/.gitea/workflows/build-agentmail-mcp.yaml b/.gitea/workflows/build-agentmail-mcp.yaml new file mode 100644 index 0000000..18d02a0 --- /dev/null +++ b/.gitea/workflows/build-agentmail-mcp.yaml @@ -0,0 +1,34 @@ +name: CI +on: + push: + branches: [ master ] + paths: + - 'agentmail-mcp/*' + - '.gitea/workflows/build-agentmail-mcp.yaml' +jobs: + "Build agentmail-mcp docker images": + runs-on: woryzen + steps: + - + name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni + password: ${{ secrets.PUBLISHER_TOKEN }} + - + name: Build and push agentmail-mcp images + uses: docker/build-push-action@v6 + with: + builder: multiplatform-builder + context: "{{defaultContext}}:agentmail-mcp" + build-args: | + VERSION=0.3.0 + platforms: | + linux/amd64 + push: true + pull: true + tags: | + "gitea.woggioni.net/woggioni/agentmail-mcp:latest" + "gitea.woggioni.net/woggioni/agentmail-mcp:0.3.0" + diff --git a/agentmail-mcp/Dockerfile b/agentmail-mcp/Dockerfile new file mode 100644 index 0000000..a28ba2c --- /dev/null +++ b/agentmail-mcp/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:3.23 +ARG VERSION +RUN --mount=type=cache,target=/var/cache/apk apk add python3 pipx +ADD --chmod=755 ./entrypoint.sh /usr/local/bin/entrypoint.sh +RUN addgroup -S agentmail +RUN adduser -D -S -h /var/lib/agentmail -G agentmail agentmail +WORKDIR /var/lib/agentmail +USER agentmail +RUN pipx install mcp-streamablehttp-proxy +RUN pipx install agentmail-mcp==${VERSION} +ENV SERVER_HOST="0.0.0.0" +ENV SERVER_PORT="8080" + +ENTRYPOINT ["entrypoint.sh"] diff --git a/agentmail-mcp/entrypoint.sh b/agentmail-mcp/entrypoint.sh new file mode 100644 index 0000000..93e77b5 --- /dev/null +++ b/agentmail-mcp/entrypoint.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +if [ -z "${SERVER_HOST}" ] +then + SERVER_HOST="0.0.0.0" +fi +if [ -z "${AGENTMAIL_API_KEY}" ] +then + echo "You need to specify an API key setting the environmental variable 'AGENTMAIL_API_KEY'" + false +else + exec .local/bin/mcp-streamablehttp-proxy --host ${SERVER_HOST} --port ${SERVER_PORT} .local/bin/agentmail-mcp --api-key ${AGENTMAIL_API_KEY} +fi