feat(mcp): add daemon control tools#1382
Open
Conversation
PR Build Metrics✅ All clear — no issues detected
Binary Size
Dependency ChangesNo dependency changes. govulncheck OutputBuild Info
History (3 previous)
🤖 Updated on each push. |
Reject timeout values that overflow time.Duration and could disable socket deadlines. Cover timeout, cancellation, stale-socket, and daemon error paths.
corylanou
marked this pull request as ready for review
July 17, 2026 17:44
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.
Description
Adds seven daemon-control tools to the official MCP SDK surface:
litestream_listandlitestream_daemon_infoare annotated read-only.litestream_sync,litestream_start,litestream_stop,litestream_register, andlitestream_unregisterare annotated mutating and destructive.Motivation and Context
The daemon already exposes
/list,/sync,/info,/start,/stop,/register, and/unregister, but the MCP server did not register tools for those endpoints. Assistants therefore could not inspect or control the running daemon through MCP.The MCP behavior test now exercises all seven methods, paths, request bodies, and responses over a real Unix socket. A separate matrix verifies that every tool reports
no Litestream daemon is runningwhen the socket is absent.Scope
In scope:
Not in scope:
textoutput contract.Behavior Change
litestream_syncacceptswait: trueHow Has This Been Tested?
go test -race ./...go vet ./...go mod verifypre-commit run --all-filesvalidation_dir=$(mktemp -d); go build -o "${validation_dir}/litestream" ./cmd/litestreamvalidation_dir=$(mktemp -d); GOOS=windows CGO_ENABLED=0 go test -c -o "${validation_dir}/litestream.test.exe" ./cmd/litestreamTypes of changes
Checklist
go fmt,go vet)go test ./...)Related