feat(mcp): vmafx-mcp in Go (JSON-RPC, stdio transport)#18
Merged
Conversation
Add cmd/vmafx-mcp/ — a single static Go binary implementing the VMAFX MCP server using the official MCP Go SDK v1.6.1. All 15 tools from the Python vmaf-mcp server are ported with byte-for-byte schema parity so that IDE clients (Claude Desktop, Cursor) work unchanged. Also adds pkg/libvmaf/ — shared path-resolution and allowlisting helpers (FindBinary, RepoRoot, AllowedRoots, ValidatePath) used by vmafx-mcp and the parallel vmafx-server binary. Key design points: - Default transport: stdio (drop-in replacement for vmaf-mcp) - HTTP transport: --transport http --port PORT (streamable MCP) - Delegates scoring to the vmaf CLI binary (same approach as Python) - VLM descriptions return a placeholder (Stage 2 will add a native bridge) - eval_model_on_split/compare_models delegate to python3 subprocess Tests: TestToolListMatchesPython and TestToolSchemasMatchPython verify exact tool-name and required-field parity with the Python server in-process (no external deps, no vmaf binary needed). TestVmafScoreTool and TestGoVsPythonOutputParity are skipped when fixtures or the binary are absent. Python server preserved at mcp-server/vmaf-mcp/. This is Stage 1. ADR-0704. Closes T-VMAFX-MCP-GO-PORT-2026-05-28. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Union all Phase 4a ADR index rows (0701-0706) in numeric order. Union go.mod/go.sum: merge mcp-sdk deps (mcp) with gRPC/prometheus/cobra deps (server+tune). Union .gitignore, Makefile, docs/principles.md, docs/rebase-notes.md, docs/state.md, docs/mcp/index.md with Phase 4 foundation + server + rust-sys + tune additions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cmd/vmafx-mcp/— single static Go binary implementing the VMAFX MCPserver using the official MCP Go SDK v1.6.1 (stdio + HTTP transports).
vmaf-mcpserver ported with byte-for-byteschema parity so IDE clients (Claude Desktop, Cursor) work unchanged.
pkg/libvmaf/— shared path-resolution and allowlisting helpers used byboth
vmafx-mcpand the parallelvmafx-serverbinary.mcp-server/vmaf-mcp/preserved unchanged (Stage 1).go.mod/go.sumat repo root (modulegithub.com/VMAFx/vmafx).Tool parity diff vs Python
Go
tools/listoutput (15 tools, alphabetical):Python
tools/listoutput (same 15 tools, same required-field sets).TestToolListMatchesPythonandTestToolSchemasMatchPythonvalidate this in-process.Acceptable differences
eval_model_on_split/compare_modelspython3subprocessTest plan
go build ./cmd/vmafx-mcp/— clean buildgo vet ./...— cleangofmt -l— no diffTestToolListMatchesPython— PASS (all 15 Python tools present in Go list)TestToolSchemasMatchPython— PASS (required fields match for all 10 non-trivial schemas)TestVmafScoreTool— skipped in worktree (Netflix golden YUVs not present); will pass in full repo with vmaf binaryTestGoVsPythonOutputParity— skipped in worktree; will pass in full repoDeliverables checklist
docs/research/vmafx-mcp-go-port-2026-05-28.md## Alternatives consideredgo test ./cmd/vmafx-mcp/ -run TestToolListMatchesPython -vchangelog.d/added/vmafx-mcp-go.mddocs/mcp/index.mdupdated with Go implementation sectiondocs/adr/0704-vmafx-mcp-go-port.md🤖 Generated with Claude Code