Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

Commit 992febe

Browse files
committed
feat: initial bridge image (alpine multi-arch) with Node+npm+tsx and Python+mcp-proxy; build/push via GH Actions
0 parents  commit 992febe

6 files changed

Lines changed: 165 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build-and-push
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
tags: [ 'v*.*.*' ]
7+
workflow_dispatch: {}
8+
9+
env:
10+
IMAGE_NAME: ghcr.io/icoretech/mcp-stdio-bridge
11+
12+
jobs:
13+
docker:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
id-token: write
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up QEMU
24+
uses: docker/setup-qemu-action@v3
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Log in to GHCR
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.repository_owner }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Docker metadata
37+
id: meta
38+
uses: docker/metadata-action@v5
39+
with:
40+
images: ${{ env.IMAGE_NAME }}
41+
tags: |
42+
type=ref,event=branch
43+
type=semver,pattern={{version}}
44+
type=semver,pattern={{major}}.{{minor}}
45+
type=raw,value=latest,enable={{is_default_branch}}
46+
47+
- name: Build and push
48+
uses: docker/build-push-action@v6
49+
with:
50+
context: .
51+
platforms: linux/amd64,linux/arm64
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+
provenance: false

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# general
2+
.dockerignore
3+
.DS_Store
4+
5+
# node
6+
node_modules
7+
8+
# python
9+
__pycache__
10+
*.pyc
11+

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM alpine:3.20
2+
3+
ARG NODE_MAJOR=22
4+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
5+
PIP_NO_CACHE_DIR=1 \
6+
UV_SYSTEM_PYTHON=1 \
7+
PYTHONDONTWRITEBYTECODE=1 \
8+
PYTHONUNBUFFERED=1
9+
10+
# Multi-arch compatible: install Node.js, Python, pip, git; then python mcp-proxy and node tsx
11+
RUN set -eux; \
12+
apk add --no-cache \
13+
nodejs npm python3 py3-pip git bash tini ca-certificates; \
14+
npm i -g --omit=dev tsx; \
15+
python3 -m pip install --no-cache-dir --upgrade pip; \
16+
python3 -m pip install --no-cache-dir mcp-proxy;
17+
18+
# Use tini for proper signal handling (PID 1)
19+
ENTRYPOINT ["/sbin/tini","--","mcp-proxy"]
20+
21+
# Default to SSE on 3000; helm chart passes args; left here as documentation
22+
EXPOSE 3000
23+
24+
LABEL org.opencontainers.image.source="https://github.com/icoretech/mcp-stdio-bridge" \
25+
org.opencontainers.image.description="Universal stdio→HTTP(SSE) bridge for MCP servers with Node (npx/tsx) and Python envs" \
26+
org.opencontainers.image.licenses="MIT"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Icoretech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
REG ?= ghcr.io
2+
ORG ?= icoretech
3+
IMG ?= mcp-stdio-bridge
4+
IMAGE ?= $(REG)/$(ORG)/$(IMG)
5+
PLATFORMS ?= linux/amd64,linux/arm64
6+
TAG ?= dev
7+
8+
.PHONY: build push all
9+
10+
build:
11+
docker buildx build --platform $(PLATFORMS) -t $(IMAGE):$(TAG) --load .
12+
13+
push:
14+
docker buildx build --platform $(PLATFORMS) -t $(IMAGE):$(TAG) --push .
15+
16+
all: build

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# mcp-stdio-bridge
2+
3+
Universal stdio → HTTP(SSE) bridge image for MCP servers on Kubernetes.
4+
5+
- Includes Node.js (with `npx`/`tsx`) and Python (`pip`).
6+
- Entrypoint is `mcp-proxy`, converting stdio MCP servers to SSE over HTTP.
7+
- Multi-arch (amd64/arm64) via GH Actions.
8+
9+
## Usage with Helm `mcp-server`
10+
11+
Example values snippet:
12+
13+
```yaml
14+
servers:
15+
- name: chrome-devtools
16+
port: 3000
17+
stdioBridge:
18+
enabled: true
19+
image: ghcr.io/icoretech/mcp-stdio-bridge
20+
tag: latest
21+
port: 3000
22+
passEnvironment: true
23+
serverCommand: ["npx","chrome-devtools-mcp"]
24+
serverArgs: []
25+
register:
26+
enabled: true
27+
type: sse
28+
path: /sse
29+
```
30+
31+
## Local build
32+
33+
```bash
34+
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/icoretech/mcp-stdio-bridge:dev --load .
35+
```
36+

0 commit comments

Comments
 (0)