Skip to content

Commit d36728a

Browse files
authored
Merge pull request #1 from smart-mcp-proxy/feature/fyne
Add goreleaser configuration and update dependencies
2 parents 282d2d6 + 853af3d commit d36728a

15 files changed

Lines changed: 164 additions & 209 deletions

File tree

.github/workflows/pr-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,14 @@ jobs:
4040
run: go test -tags nogui -v ./...
4141

4242
- name: Build binary
43+
shell: bash
4344
run: |
4445
VERSION=pr-${{ github.event.number }}-${{ github.sha }}
45-
go build -tags nogui -ldflags "-X main.version=${VERSION}" -o mcpproxy ./cmd/mcpproxy
46+
if [[ "${{ runner.os }}" == "Windows" ]]; then
47+
go build -tags nogui -ldflags "-X main.version=${VERSION}" -o mcpproxy.exe ./cmd/mcpproxy
48+
else
49+
go build -tags nogui -ldflags "-X main.version=${VERSION}" -o mcpproxy ./cmd/mcpproxy
50+
fi
4651
4752
- name: Test version output
4853
shell: bash
@@ -73,5 +78,5 @@ jobs:
7378
- name: Check GoReleaser config
7479
uses: goreleaser/goreleaser-action@v5
7580
with:
76-
version: latest
81+
version: v2.3.2
7782
args: check

.github/workflows/release.yml

Lines changed: 17 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,30 @@
1-
name: Build and Release
2-
1+
name: goreleaser
32
on:
43
push:
54
tags: ["v*"]
65

7-
permissions:
8-
contents: write
9-
packages: write
10-
116
jobs:
12-
build:
13-
strategy:
14-
matrix:
15-
include:
16-
- os: ubuntu-22.04
17-
goos: linux
18-
goarch: amd64
19-
ext: ""
20-
artifact_name: "mcpproxy-linux-amd64"
21-
package_cmd: "tar -czf mcpproxy-${{ github.ref_name }}-linux-amd64.tar.gz mcpproxy"
22-
- os: windows-latest
23-
goos: windows
24-
goarch: amd64
25-
ext: ".exe"
26-
artifact_name: "mcpproxy-windows-amd64"
27-
ldflags: "-H windowsgui"
28-
package_cmd: "7z a mcpproxy-${{ github.ref_name }}-windows-amd64.zip mcpproxy.exe"
29-
- os: macos-14
30-
goos: darwin
31-
goarch: "amd64 arm64" # Universal binary
32-
ext: ""
33-
artifact_name: "mcpproxy-macos-universal"
34-
package_cmd: "ditto -ck --rsrc --sequesterRsrc mcpproxy mcpproxy-${{ github.ref_name }}-macos-universal.zip"
35-
36-
runs-on: ${{ matrix.os }}
37-
38-
env:
39-
CGO_ENABLED: "1"
40-
GO111MODULE: "on"
41-
7+
release:
8+
runs-on: ubuntu-latest
429
steps:
43-
- name: Checkout
44-
uses: actions/checkout@v4
10+
- uses: actions/checkout@v4
4511
with:
4612
fetch-depth: 0
47-
48-
# Linux-only: install GUI headers
49-
- name: Install Linux dependencies
50-
if: runner.os == 'Linux'
51-
run: |
52-
sudo apt-get update
53-
sudo apt-get install -y gcc libgtk-3-dev libayatana-appindicator3-dev
54-
55-
- name: Set up Go
56-
uses: actions/setup-go@v5
13+
- uses: actions/setup-go@v5
5714
with:
58-
go-version: "1.23.10"
59-
60-
- name: Get version
61-
id: version
62-
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
63-
64-
- name: Build for macOS Universal
65-
if: matrix.goos == 'darwin'
15+
go-version: "1.22"
16+
- name: Install fyne-cross
17+
run: go install github.com/fyne-io/fyne-cross/v2/cmd/fyne-cross@latest
18+
- name: Cross-compile (linux,win,mac)
6619
run: |
67-
mkdir -p build
68-
# Build for both architectures separately
69-
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }}" -o build/mcpproxy_amd64 ./cmd/mcpproxy
70-
GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }}" -o build/mcpproxy_arm64 ./cmd/mcpproxy
71-
# Combine into universal binary
72-
lipo -create -output build/mcpproxy build/mcpproxy_amd64 build/mcpproxy_arm64
73-
# Clean up individual binaries
74-
rm build/mcpproxy_amd64 build/mcpproxy_arm64
75-
76-
- name: Build for Linux/Windows
77-
if: matrix.goos != 'darwin'
78-
env:
79-
GOOS: ${{ matrix.goos }}
80-
GOARCH: ${{ matrix.goarch }}
81-
CGO_ENABLED: "1"
82-
run: |
83-
mkdir -p build
84-
go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }} ${{ matrix.ldflags }}" -o build/mcpproxy${{ matrix.ext }} ./cmd/mcpproxy
85-
86-
- name: Package artifacts (Linux/macOS)
87-
if: runner.os != 'Windows'
88-
run: |
89-
cd build
90-
cp ../README.md .
91-
if [ -f ../assets/icons/icon.svg ]; then
92-
mkdir -p assets/icons
93-
cp ../assets/icons/icon.svg assets/icons/
94-
fi
95-
# Create versioned package
96-
${{ matrix.package_cmd }}
97-
# Create latest package for stable links
98-
LATEST_CMD="${{ matrix.package_cmd }}"
99-
LATEST_CMD=$(echo "$LATEST_CMD" | sed 's/${{ github.ref_name }}/latest/g')
100-
eval "$LATEST_CMD"
101-
102-
- name: Package artifacts (Windows)
103-
if: runner.os == 'Windows'
104-
run: |
105-
cd build
106-
Copy-Item ../README.md .
107-
if (Test-Path ../assets/icons/icon.svg) {
108-
New-Item -ItemType Directory -Force -Path assets/icons
109-
Copy-Item ../assets/icons/icon.svg assets/icons/
110-
}
111-
# Create versioned package
112-
${{ matrix.package_cmd }}
113-
# Create latest package for stable links
114-
$latestCmd = "${{ matrix.package_cmd }}" -replace "${{ github.ref_name }}", "latest"
115-
Invoke-Expression $latestCmd
116-
117-
- name: Upload artifacts to release
118-
uses: softprops/action-gh-release@v2
20+
fyne-cross linux --pull --app-id mcpproxy ./cmd/mcpproxy
21+
fyne-cross windows --pull --app-id mcpproxy ./cmd/mcpproxy
22+
fyne-cross darwin --pull --app-id mcpproxy ./cmd/mcpproxy
23+
echo "fyne-cross output structure:"
24+
find fyne-cross -type f -name "*mcpproxy*" | head -20
25+
- uses: goreleaser/goreleaser-action@v5
11926
with:
120-
files: |
121-
build/mcpproxy-${{ github.ref_name }}-*
122-
build/mcpproxy-latest-*
123-
draft: false
124-
prerelease: false
125-
generate_release_notes: true
126-
body: |
127-
## mcpproxy ${{ steps.version.outputs.version }}
128-
129-
Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers.
130-
131-
### Changes in this release
132-
- Full GUI/System Tray support on all platforms
133-
- Native builds with CGO support for optimal performance
134-
- Cross-platform compatibility (Linux, Windows, macOS)
135-
136-
### Installation
137-
138-
#### Download and Run
139-
1. Download the appropriate archive for your platform
140-
2. Extract the binary
141-
3. Run `mcpproxy` to start with system tray, or `mcpproxy --tray=false` for headless mode
142-
143-
#### Stable Download Links (Always Latest)
144-
For scripts and websites that need stable URLs:
145-
- **macOS**: `https://github.com/smart-mcp-proxy/mcpproxy-go/releases/latest/download/mcpproxy-latest-macos-universal.zip`
146-
- **Windows**: `https://github.com/smart-mcp-proxy/mcpproxy-go/releases/latest/download/mcpproxy-latest-windows-amd64.zip`
147-
- **Linux**: `https://github.com/smart-mcp-proxy/mcpproxy-go/releases/latest/download/mcpproxy-latest-linux-amd64.tar.gz`
148-
149-
#### macOS
150-
- Download `mcpproxy-*-macos-universal.zip`
151-
- Right-click → Open to bypass Gatekeeper (unsigned app)
152-
153-
#### Windows
154-
- Download `mcpproxy-*-windows-amd64.zip`
155-
- Extract and run `mcpproxy.exe`
156-
157-
#### Linux
158-
- Download `mcpproxy-*-linux-amd64.tar.gz`
159-
- Extract: `tar -xzf mcpproxy-*-linux-amd64.tar.gz`
160-
- Run: `./mcpproxy`
161-
- Requires GTK3 and AppIndicator libraries
27+
version: v2.3.2
28+
args: release --clean
16229
env:
16330
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164-
165-
# Optional: Create macOS DMG (can be added later)
166-
# macos-dmg:
167-
# needs: build
168-
# runs-on: macos-14
169-
# if: github.event.repository.default_branch == 'main'
170-
# steps:
171-
# - name: Create DMG
172-
# run: echo "DMG creation can be added here later"

.golangci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ linters:
2020
- gocritic
2121
- revive
2222
- gosec
23-
- exportloopref
23+
- copyloopvar
2424

2525
linters-settings:
2626
goconst:
@@ -40,9 +40,6 @@ linters-settings:
4040
- octalLiteral
4141
- whyNoLint
4242

43-
revive:
44-
min-confidence: 0
45-
4643
gosec:
4744
excludes:
4845
- G204 # Subprocess launched with variable

.goreleaser.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- skip: true
9+
10+
archives:
11+
- id: linux
12+
name_template: "mcpproxy-{{ .Version }}-linux-amd64"
13+
files:
14+
- src: "fyne-cross/bin/linux-amd64/mcpproxy"
15+
dst: "mcpproxy"
16+
- README.md
17+
- assets/**/*
18+
19+
- id: windows
20+
name_template: "mcpproxy-{{ .Version }}-windows-amd64"
21+
files:
22+
- src: "fyne-cross/bin/windows-amd64/mcpproxy.exe"
23+
dst: "mcpproxy.exe"
24+
- README.md
25+
- assets/**/*
26+
27+
- id: darwin-amd64
28+
name_template: "mcpproxy-{{ .Version }}-darwin-amd64"
29+
files:
30+
- src: "fyne-cross/bin/darwin-amd64/mcpproxy"
31+
dst: "mcpproxy"
32+
- README.md
33+
- assets/**/*
34+
35+
- id: darwin-arm64
36+
name_template: "mcpproxy-{{ .Version }}-darwin-arm64"
37+
files:
38+
- src: "fyne-cross/bin/darwin-arm64/mcpproxy"
39+
dst: "mcpproxy"
40+
- README.md
41+
- assets/**/*
42+
43+
release:
44+
github:
45+
owner: smart-mcp-proxy
46+
name: mcpproxy-go
47+
draft: false
48+
prerelease: auto
49+
name_template: "mcpproxy {{ .Tag }}"
50+
header: |
51+
## mcpproxy {{ .Tag }}
52+
53+
Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers.
54+
55+
footer: |
56+
### Installation
57+
58+
#### Download and Run
59+
1. Download the appropriate archive for your platform
60+
2. Extract the binary
61+
3. Run `mcpproxy` to start with system tray, or `mcpproxy --tray=false` for headless mode
62+
63+
#### Platform-specific notes:
64+
- **macOS**: Right-click → Open to bypass Gatekeeper (unsigned app)
65+
- **Windows**: Extract and run `mcpproxy.exe`
66+
- **Linux**: Requires GTK3 and AppIndicator libraries
67+
68+
checksum:
69+
name_template: "checksums.txt"
70+
71+
changelog:
72+
use: github
73+
sort: asc
74+
groups:
75+
- title: Features
76+
regexp: '^.*?feat(\(.+\))??!?:.+$'
77+
order: 0
78+
- title: Bug Fixes
79+
regexp: '^.*?fix(\(.+\))??!?:.+$'
80+
order: 1
81+
- title: Others
82+
order: 999
83+
filters:
84+
exclude:
85+
- "^docs:"
86+
- "^test:"
87+
- "^chore:"
88+
- "merge conflict"
89+
- Merge pull request
90+
- Merge remote-tracking branch
91+
- Merge branch

AUTOUPDATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ go run -ldflags "-X main.version=v0.1.0-test" ./cmd/mcpproxy --version
171171
```
172172

173173
### Dependencies
174-
- `github.com/getlantern/systray` - System tray functionality
174+
- `fyne.io/systray` - System tray functionality
175175
- `github.com/inconshreveable/go-update` - Binary update mechanism
176176
- `golang.org/x/mod/semver` - Semantic version comparison

DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Re‑implement the existing Python MCP proxy in Go, delivering a single‑binary
3232
| Full‑text search | **Bleve v2** | Embeddable BM25 |
3333
| CLI & config | **`spf13/cobra` + `spf13/viper`** | Flags → env → file binding |
3434
| Persistence | **bbolt** | Single‑file ACID |
35-
| Sys‑tray | **`getlantern/systray`** | Tiny cross‑platform tray |
35+
| Sys‑tray | **`fyne.io/systray`** | Tiny cross‑platform tray |
3636
| Logging | **zap** / **slog** | Structured logs |
3737
| Metrics | `prometheus/client_golang` | Optional `/metrics` |
3838

TRAY_ICON_GUIDE.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,36 @@ export MCPPROXY_LISTEN=:8080
138138

139139
- **macOS**: 44x44 pixels, transparent PNG. For dynamic adaptation to light/dark system themes, the icon should be black with only an alpha channel.
140140
- **Windows**: 32x32 pixels.
141-
- **Linux**: 24x24 pixels.
141+
- **Linux**: 24x24 pixels. **Note: System tray functionality is currently disabled on Linux** due to compatibility issues with the systray library. Use `--tray=false` or run without tray on Linux.
142142
- **Format**: PNG with transparency is generally recommended.
143143
- **Color**: Monochrome icons often work better and adapt to system theme on macOS.
144144
- **Style**: Simple, high contrast designs work best.
145145
- **Template**: Consider using template images that adapt to dark/light modes.
146146

147+
### Platform Limitations
148+
149+
#### Linux Support
150+
The system tray functionality is currently **disabled on Linux builds** due to incomplete support in the underlying `fyne.io/systray` library. On Linux, the application will:
151+
152+
- Automatically use the stub implementation (no tray)
153+
- Run normally in server-only mode
154+
- Log: "Tray functionality disabled (nogui/headless build)"
155+
156+
**Workarounds for Linux users:**
157+
```bash
158+
# Run without tray (recommended)
159+
./mcpproxy --tray=false
160+
161+
# Or use environment variable
162+
export MCPPROXY_TRAY=false
163+
./mcpproxy
164+
```
165+
166+
**Alternative Linux tray solutions:**
167+
- Use a different systray library (requires code changes)
168+
- Run the server and use a separate GUI client
169+
- Use command-line interface for management
170+
147171
### Current Icons
148172

149173
The project includes two icon versions:

0 commit comments

Comments
 (0)