diff --git a/.mcp.json b/.mcp.json index 8f1bc64..cf2dd61 100644 --- a/.mcp.json +++ b/.mcp.json @@ -1,10 +1,8 @@ { "mcpServers": { "supervisor": { - "command": "/Users/mathias/dev/AI/supervisor/bin/supervisor-bridge", - "env": { - "SUPERVISOR_URL": "http://koala:30320/mcp" - } + "type": "http", + "url": "http://koala:30320/mcp" } } } diff --git a/README.md b/README.md index 6179888..01a7204 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ into a searchable brain. ``` Your Claude Code session (in any project) │ - │ MCP tools (over stdio bridge → HTTP) + │ MCP over HTTP (Tailscale) ▼ -supervisor :3200 — skill workers: tdd, retrospective -ingestion :3300 — brain HTTP API: query wiki, write notes +supervisor :3200 (NodePort 30320 on koala) — skill workers: tdd, retrospective +ingestion :3300 — brain HTTP API: query wiki, write notes │ ▼ brain/ @@ -55,18 +55,18 @@ Create `.mcp.json` in your project root: { "mcpServers": { "supervisor": { - "command": "/Users/mathias/dev/AI/supervisor/bin/supervisor-bridge", - "env": { - "SUPERVISOR_URL": "http://localhost:3200/mcp" - } + "type": "http", + "url": "http://koala:30320/mcp" } } } ``` -Build the bridge binary once: `task bridge:build` +The supervisor MCP server is reachable over Tailscale at `koala:30320` (NodePort +to the in-cluster service on port 3200). No local binary or stdio shim is +required — Claude Code talks to it directly via HTTP. -Then open Claude Code in your project — run `/mcp` to confirm `supervisor` is listed. +Open Claude Code in your project — run `/mcp` to confirm `supervisor` is listed. ## A typical TDD session diff --git a/Taskfile.yml b/Taskfile.yml index 0e2e571..dafd4c6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -57,7 +57,6 @@ tasks: desc: Build all binaries cmds: - task: supervisor:build - - task: bridge:build - task: ingestion:build supervisor:build: @@ -65,11 +64,6 @@ tasks: cmds: - go build -trimpath -ldflags="-s -w -X main.version={{.VERSION}}" -o bin/supervisor ./cmd/supervisor - bridge:build: - desc: Build stdio↔HTTP bridge for Claude Code MCP integration - cmds: - - go build -trimpath -ldflags="-s -w" -o bin/supervisor-bridge ./cmd/bridge - ingestion:build: desc: Build ingestion server binary dir: ingestion diff --git a/cmd/bridge/main.go b/cmd/bridge/main.go deleted file mode 100644 index 87ad369..0000000 --- a/cmd/bridge/main.go +++ /dev/null @@ -1,59 +0,0 @@ -// bridge is a stdio↔HTTP adapter that lets Claude Code connect to the -// supervisor MCP server via the stdio transport. -// -// Claude Code spawns this binary as a subprocess and communicates over -// stdin/stdout. Each newline-delimited JSON-RPC message from stdin is -// forwarded to the supervisor HTTP server and the response is written back. -// -// Usage: -// -// SUPERVISOR_URL=http://localhost:3200/mcp bridge -package main - -import ( - "bufio" - "bytes" - "fmt" - "io" - "net/http" - "os" -) - -func main() { - url := os.Getenv("SUPERVISOR_URL") - if url == "" { - url = "http://localhost:3200/mcp" - } - - client := &http.Client{} - scanner := bufio.NewScanner(os.Stdin) - scanner.Buffer(make([]byte, 1024*1024), 1024*1024) - - for scanner.Scan() { - line := scanner.Bytes() - if len(bytes.TrimSpace(line)) == 0 { - continue - } - - req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(line)) - if err != nil { - fmt.Fprintf(os.Stderr, "bridge: build request: %v\n", err) - continue - } - req.Header.Set("Content-Type", "application/json") - - resp, err := client.Do(req) - if err != nil { - fmt.Fprintf(os.Stderr, "bridge: request failed: %v\n", err) - continue - } - _, _ = io.Copy(os.Stdout, resp.Body) - _ = resp.Body.Close() - _, _ = os.Stdout.Write([]byte("\n")) - } - - if err := scanner.Err(); err != nil { - fmt.Fprintf(os.Stderr, "bridge: scanner: %v\n", err) - os.Exit(1) - } -}