Repository navigation
Read-only remote MCP access to highlights - #167
Merged
Merged
Conversation
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
Adds a remote, read-only MCP endpoint at
/mcpfor the authenticated user's synced highlights.list_highlights,search_highlightsandget_highlightreturn quotations with book attribution, using the existing Basic or native Bearer credentials. A matching REST API lives at/agent/v1/highlights.One shared query service enforces user scope, active-only results, literal search, identity filters and UUID pagination. List/search responses use SQL-projected previews with explicit truncation flags; exact retrieval retains the full saved quotation and locator. This change includes both interfaces and their protocol/privacy tests so the shared access contract can be reviewed together.
The official MCP SDK uses stateless Streamable HTTP JSON responses. Authentication is checked on every request; cookie-only authentication is rejected. Host/Origin validation, request-size limits, sanitized errors and existing shutdown hooks are retained. SDK tracing is disabled.
Deployment and compatibility
QUIRE_SERVER_MCP_PUBLIC_URLwith the public HTTPS origin and forward/mcpand/agent/*to Quire Server. Reference Caddy routes and setup documentation are included.Validation
2d4bf62, together with Python and Java/Kotlin CodeQL. Image publication/scan are correctly skipped for the PR.Context
Follows #166. #143 was closed with the three merged PRs and its documented horizontal-reflowable jump limitation; this PR implements the separate Agent/MCP follow-up.