Skip to content

Commit a2a50b4

Browse files
Merge remote-tracking branch 'upstream/main' into 013-structured-server-state
# Conflicts: # cmd/mcpproxy/upstream_cmd.go # internal/health/calculator.go # oas/docs.go
2 parents eabc72e + 4c4d070 commit a2a50b4

160 files changed

Lines changed: 30587 additions & 794 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
fi
203203
204204
echo "Building version: ${VERSION}"
205-
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION} -X main.version=${VERSION}"
205+
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION} -X main.version=${VERSION} -X mcpproxy-go/internal/httpapi.buildVersion=${VERSION}"
206206
207207
# Determine clean binary name
208208
if [ "${{ matrix.goos }}" = "windows" ]; then

.github/workflows/release.yml

Lines changed: 56 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ jobs:
103103
Requirements:
104104
- Maximum 400 words
105105
- Use markdown format
106-
- Start with a brief 1-2 sentence summary of this release
106+
- DO NOT include a title or header like 'MCPProxy vX.X.X Release Notes' - GitHub already shows the version
107+
- Start directly with a brief 1-2 sentence summary of this release
107108
- Group changes into sections (use only sections that have content):
108109
- **New Features** - New functionality (feat: commits)
109110
- **Bug Fixes** - Fixed issues (fix: commits)
@@ -368,7 +369,7 @@ jobs:
368369
CGO_LDFLAGS: "-mmacosx-version-min=12.0"
369370
run: |
370371
VERSION=${GITHUB_REF#refs/tags/}
371-
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION} -X main.version=${VERSION}"
372+
LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION} -X main.version=${VERSION} -X mcpproxy-go/internal/httpapi.buildVersion=${VERSION}"
372373
373374
# Determine clean binary name
374375
if [ "${{ matrix.goos }}" = "windows" ]; then
@@ -987,66 +988,69 @@ jobs:
987988
988989
---
989990
990-
## mcpproxy ${{ github.ref_name }}
991+
## Download Installers
991992
992-
Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers.
993+
| Platform | Download | Notes |
994+
|----------|----------|-------|
995+
| **macOS (Apple Silicon)** | [**Download DMG**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-arm64-installer.dmg) | Signed & Notarized - Recommended for M1/M2/M3/M4 |
996+
| **macOS (Intel)** | [**Download DMG**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-amd64-installer.dmg) | Signed & Notarized |
997+
| **Windows (64-bit)** | [**Download Setup**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-setup-${{ github.ref_name }}-amd64.exe) | Setup wizard |
998+
| **Windows (ARM64)** | [**Download Setup**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-setup-${{ github.ref_name }}-arm64.exe) | For ARM Windows devices |
999+
| **Linux (AMD64)** | [**Download tar.gz**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-linux-amd64.tar.gz) | Binary package |
1000+
| **Linux (ARM64)** | [**Download tar.gz**](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-linux-arm64.tar.gz) | For ARM Linux |
9931001
994-
### Download Links
1002+
**Homebrew (macOS/Linux):**
1003+
```bash
1004+
brew install smart-mcp-proxy/mcpproxy/mcpproxy
1005+
```
9951006
996-
**Latest Version (auto-updates):**
997-
- [Linux AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-amd64.tar.gz)
998-
- [Linux ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-arm64.tar.gz)
999-
- [Windows AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-amd64.zip)
1000-
- [Windows ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-arm64.zip)
1001-
- [macOS AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-amd64.tar.gz)
1002-
- [macOS ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-arm64.tar.gz)
1007+
<details>
1008+
<summary>Other download options (auto-update URLs, archives)</summary>
10031009
1004-
**Windows Installer:**
1005-
- [Setup (AMD64)](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-setup-${{ github.ref_name }}-amd64.exe)
1006-
- [Setup (ARM64)](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-setup-${{ github.ref_name }}-arm64.exe)
1010+
**Auto-update URLs** (always points to latest):
1011+
- [Linux AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-amd64.tar.gz) | [Linux ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-arm64.tar.gz)
1012+
- [Windows AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-amd64.zip) | [Windows ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-arm64.zip)
1013+
- [macOS AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-amd64.tar.gz) | [macOS ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-arm64.tar.gz)
10071014
1008-
**macOS Installer:**
1009-
- [Signed DMG (Apple Silicon)](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-arm64-installer.dmg)
1010-
- [Signed DMG (Intel)](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-amd64-installer.dmg)
1015+
**Binary archives (this version):**
1016+
- [macOS AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-amd64.tar.gz) | [macOS ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-arm64.tar.gz)
1017+
- [Windows AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-windows-amd64.zip) | [Windows ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-windows-arm64.zip)
10111018
1012-
**This Version (${{ github.ref_name }}):**
1013-
- [Linux AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-linux-amd64.tar.gz)
1014-
- [Linux ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-linux-arm64.tar.gz)
1015-
- [Windows AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-windows-amd64.zip)
1016-
- [Windows ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-windows-arm64.zip)
1017-
- [macOS AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-amd64.tar.gz)
1018-
- [macOS ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ env.CLEAN_VERSION }}-darwin-arm64.tar.gz)
1019+
</details>
10191020
1020-
### Installation
1021+
---
1022+
1023+
<details>
1024+
<summary>Installation Instructions</summary>
10211025
1022-
**Windows:**
1023-
1. Download the installer for your architecture (AMD64 or ARM64)
1026+
### Windows
1027+
1. Download the installer for your architecture
10241028
2. Run `mcpproxy-setup-*.exe`
10251029
3. Follow the installation wizard (requires Administrator privileges)
1026-
4. MCPProxy will be added to Start Menu and system PATH
1027-
5. Launch "MCPProxy" from Start Menu to start the tray app
1028-
6. The app will appear in your system tray
1030+
4. Launch "MCPProxy" from Start Menu
10291031
1030-
**macOS:**
1031-
1. Download the signed installer DMG for your Mac (Apple Silicon or Intel)
1032+
### macOS
1033+
1. Download the signed DMG for your Mac
10321034
2. Double-click the DMG to mount it
10331035
3. Double-click the PKG installer inside
10341036
4. Follow the installation wizard
1035-
5. CLI tool `mcpproxy` will be available in Terminal
1036-
6. Launch mcpproxy.app from Applications folder
1037-
7. The app will appear in your system tray
1037+
5. Launch mcpproxy.app from Applications folder
10381038
1039-
**Manual Installation (All Platforms):**
1040-
1. Download the appropriate archive for your platform using the links above
1041-
2. Extract the archive: `tar -xzf mcpproxy-*.tar.gz` (Linux/macOS) or unzip (Windows)
1042-
3. Make it executable: `chmod +x mcpproxy` (Linux/macOS)
1043-
4. Run `./mcpproxy` to start
1039+
### Linux / Manual Installation
1040+
1. Download the appropriate archive
1041+
2. Extract: `tar -xzf mcpproxy-*.tar.gz`
1042+
3. Make executable: `chmod +x mcpproxy`
1043+
4. Run: `./mcpproxy serve`
10441044
1045-
### Platform Support
1045+
</details>
10461046
1047+
<details>
1048+
<summary>Platform Support & Usage</summary>
1049+
1050+
### Platform Support
10471051
- **macOS**: Full system tray support with menu and icons
1048-
- **Windows**: Full system tray support with menu and icons
1049-
- **Linux**: Headless mode only (no system tray due to compatibility)
1052+
- **Windows**: Full system tray support with menu and icons
1053+
- **Linux**: Headless mode only (CLI)
10501054
10511055
### Usage
10521056
@@ -1055,10 +1059,13 @@ jobs:
10551059
- Manages server via system tray menu
10561060
10571061
**CLI:**
1058-
- Start core server: `mcpproxy serve`
1059-
- Custom port: `mcpproxy serve --listen 127.0.0.1:8081`
1060-
- Set API key: `export MCPPROXY_API_KEY=your-secret-key`
1061-
- Start tray separately: `mcpproxy-tray` (if core already running)
1062+
```bash
1063+
mcpproxy serve # Start server
1064+
mcpproxy serve --listen 127.0.0.1:8081 # Custom port
1065+
export MCPPROXY_API_KEY=your-secret-key # Set API key
1066+
```
1067+
1068+
</details>
10621069
env:
10631070
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10641071

@@ -1137,7 +1144,7 @@ jobs:
11371144
mkdir -p Formula
11381145
11391146
# Create formula file
1140-
printf 'class Mcpproxy < Formula\n desc "Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers"\n homepage "https://github.com/smart-mcp-proxy/mcpproxy-go"\n url "https://github.com/smart-mcp-proxy/mcpproxy-go/archive/refs/tags/v%s.tar.gz"\n sha256 "%s"\n license "MIT"\n head "https://github.com/smart-mcp-proxy/mcpproxy-go.git"\n\n depends_on "go" => :build\n\n def install\n system "go", "build", "-ldflags", "-s -w -X mcpproxy-go/cmd/mcpproxy.version=v%s -X main.version=v%s", "-o", "mcpproxy", "./cmd/mcpproxy"\n bin.install "mcpproxy"\n end\n\n test do\n assert_match version.to_s, shell_output("#{bin}/mcpproxy --version")\n end\nend\n' "${VERSION}" "${SOURCE_SHA}" "${VERSION}" "${VERSION}" > Formula/mcpproxy.rb
1147+
printf 'class Mcpproxy < Formula\n desc "Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers"\n homepage "https://github.com/smart-mcp-proxy/mcpproxy-go"\n url "https://github.com/smart-mcp-proxy/mcpproxy-go/archive/refs/tags/v%s.tar.gz"\n sha256 "%s"\n license "MIT"\n head "https://github.com/smart-mcp-proxy/mcpproxy-go.git"\n\n depends_on "go" => :build\n\n def install\n system "go", "build", "-ldflags", "-s -w -X mcpproxy-go/cmd/mcpproxy.version=v%s -X main.version=v%s -X mcpproxy-go/internal/httpapi.buildVersion=v%s", "-o", "mcpproxy", "./cmd/mcpproxy"\n bin.install "mcpproxy"\n end\n\n test do\n assert_match version.to_s, shell_output("#{bin}/mcpproxy --version")\n end\nend\n' "${VERSION}" "${SOURCE_SHA}" "${VERSION}" "${VERSION}" "${VERSION}" > Formula/mcpproxy.rb
11411148
11421149
echo "Formula created successfully"
11431150
cat Formula/mcpproxy.rb

CLAUDE.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,31 @@ mcpproxy doctor # Run health checks
6161

6262
See [docs/cli-management-commands.md](docs/cli-management-commands.md) for complete reference.
6363

64+
### Activity Log CLI
65+
```bash
66+
mcpproxy activity list # List recent activity
67+
mcpproxy activity list --type tool_call --status error # Filter by type/status
68+
mcpproxy activity watch # Real-time activity stream
69+
mcpproxy activity show <id> # View activity details
70+
mcpproxy activity summary # Show 24h statistics
71+
mcpproxy activity export --output audit.jsonl # Export for compliance
72+
```
73+
74+
See [docs/cli/activity-commands.md](docs/cli/activity-commands.md) for complete reference.
75+
76+
### CLI Output Formatting
77+
```bash
78+
mcpproxy upstream list -o json # JSON output for scripting
79+
mcpproxy upstream list -o yaml # YAML output
80+
mcpproxy upstream list --json # Shorthand for -o json
81+
mcpproxy --help-json # Machine-readable help for AI agents
82+
```
83+
84+
**Formats**: `table` (default), `json`, `yaml`
85+
**Environment**: `MCPPROXY_OUTPUT=json` sets default format
86+
87+
See [docs/cli-output-formatting.md](docs/cli-output-formatting.md) for complete reference.
88+
6489
## Architecture Overview
6590

6691
### Core Components
@@ -69,6 +94,7 @@ See [docs/cli-management-commands.md](docs/cli-management-commands.md) for compl
6994
|-----------|---------|
7095
| `cmd/mcpproxy/` | CLI entry point, Cobra commands |
7196
| `cmd/mcpproxy-tray/` | System tray application with state machine |
97+
| `internal/cli/output/` | CLI output formatters (table, JSON, YAML) |
7298
| `internal/runtime/` | Lifecycle, event bus, background services |
7399
| `internal/server/` | HTTP server, MCP proxy |
74100
| `internal/httpapi/` | REST API endpoints (`/api/v1`) |
@@ -137,13 +163,26 @@ See [docs/configuration.md](docs/configuration.md) for complete reference.
137163
## MCP Protocol
138164

139165
### Built-in Tools
140-
- **`retrieve_tools`** - BM25 keyword search across all upstream tools
141-
- **`call_tool`** - Proxy tool calls to upstream servers
166+
- **`retrieve_tools`** - BM25 keyword search across all upstream tools, returns annotations and recommended tool variant
167+
- **`call_tool_read`** - Proxy read-only tool calls to upstream servers (Spec 018)
168+
- **`call_tool_write`** - Proxy write tool calls to upstream servers (Spec 018)
169+
- **`call_tool_destructive`** - Proxy destructive tool calls to upstream servers (Spec 018)
142170
- **`code_execution`** - Execute JavaScript to orchestrate multiple tools (disabled by default)
143171
- **`upstream_servers`** - CRUD operations for server management
144172

145173
**Tool Format**: `<serverName>:<toolName>` (e.g., `github:create_issue`)
146174

175+
**Intent Declaration (Spec 018)**: Tool variants enable granular IDE permission control. The `intent` parameter provides two-key security:
176+
```json
177+
{
178+
"intent": {
179+
"operation_type": "read",
180+
"data_sensitivity": "public",
181+
"reason": "User requested list of repositories"
182+
}
183+
}
184+
```
185+
147186
### HTTP API Endpoints
148187

149188
**Base Path**: `/api/v1`
@@ -155,6 +194,9 @@ See [docs/configuration.md](docs/configuration.md) for complete reference.
155194
| `POST /api/v1/servers/{name}/enable` | Enable/disable server |
156195
| `POST /api/v1/servers/{name}/quarantine` | Quarantine/unquarantine server |
157196
| `GET /api/v1/tools` | Search tools across servers |
197+
| `GET /api/v1/activity` | List activity records with filtering |
198+
| `GET /api/v1/activity/{id}` | Get activity record details |
199+
| `GET /api/v1/activity/export` | Export activity records (JSON/CSV) |
158200
| `GET /events` | SSE stream for live updates |
159201

160202
**Authentication**: Use `X-API-Key` header or `?apikey=` query parameter.
@@ -333,6 +375,16 @@ See `docs/prerelease-builds.md` for download instructions.
333375
## Active Technologies
334376
- Go 1.24 (toolchain go1.24.10) (001-update-version-display)
335377
- In-memory only for version cache (no persistence per clarification) (001-update-version-display)
378+
- Go 1.24 (toolchain go1.24.10) + Cobra CLI framework, encoding/json, gopkg.in/yaml.v3 (014-cli-output-formatting)
379+
- N/A (CLI output only) (014-cli-output-formatting)
380+
- Go 1.24 (toolchain go1.24.10) + BBolt (storage), Chi router (HTTP), Zap (logging), existing event bus (016-activity-log-backend)
381+
- BBolt database (existing `~/.mcpproxy/config.db`) (016-activity-log-backend)
382+
- Go 1.24 (toolchain go1.24.10) + Cobra CLI framework, encoding/json, internal/cli/output (spec 014), internal/cliclien (017-activity-cli-commands)
383+
- N/A (CLI layer only - uses REST API from spec 016) (017-activity-cli-commands)
384+
- Go 1.24 (toolchain go1.24.10) + Cobra CLI, Chi router, BBolt (storage), Zap (logging), mark3labs/mcp-go (MCP protocol) (018-intent-declaration)
385+
- BBolt database (`~/.mcpproxy/config.db`) - ActivityRecord extended with intent metadata (018-intent-declaration)
386+
- TypeScript 5.9, Vue 3.5, Go 1.24 (backend already exists) + Vue 3, Vue Router 4, Pinia 2, Tailwind CSS 3, DaisyUI 4, Vite 5 (019-activity-webui)
387+
- N/A (frontend consumes REST API from backend) (019-activity-webui)
336388

337389
## Recent Changes
338390
- 001-update-version-display: Added Go 1.24 (toolchain go1.24.10)

Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ swagger-verify: swagger
4646
fi
4747
@echo "✅ OpenAPI artifacts are up to date."
4848

49+
# Version detection for builds
50+
VERSION ?= $(shell git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0-dev")
51+
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
52+
BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
53+
LDFLAGS := -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(BUILD_DATE) -X mcpproxy-go/internal/httpapi.buildVersion=$(VERSION) -s -w
54+
4955
# Build complete project
5056
build: swagger frontend-build
51-
@echo "🔨 Building Go binary with embedded frontend..."
52-
go build -o mcpproxy ./cmd/mcpproxy
53-
go build -o mcpproxy-tray ./cmd/mcpproxy-tray
57+
@echo "🔨 Building Go binary with embedded frontend (version: $(VERSION))..."
58+
go build -ldflags "$(LDFLAGS)" -o mcpproxy ./cmd/mcpproxy
59+
go build -ldflags "$(LDFLAGS)" -o mcpproxy-tray ./cmd/mcpproxy-tray
5460
@echo "✅ Build completed! Run: ./mcpproxy serve"
5561
@echo "🌐 Web UI: http://localhost:8080/ui/"
5662
@echo "📚 API Docs: http://localhost:8080/swagger/"
@@ -74,8 +80,8 @@ frontend-dev:
7480

7581
# Build backend with dev flag (for development with frontend hot reload)
7682
backend-dev:
77-
@echo "🔨 Building backend in development mode..."
78-
go build -tags dev -o mcpproxy-dev ./cmd/mcpproxy
83+
@echo "🔨 Building backend in development mode (version: $(VERSION))..."
84+
go build -tags dev -ldflags "$(LDFLAGS)" -o mcpproxy-dev ./cmd/mcpproxy
7985
@echo "✅ Development backend ready!"
8086
@echo "🚀 Run: ./mcpproxy-dev serve"
8187
@echo "🌐 In dev mode, make sure frontend dev server is running on port 3000"

0 commit comments

Comments
 (0)