Repository navigation
feat(mcp): add local agent support - #309
Merged
Merged
Conversation
- Add MCP server, operation service, access store, and data transfer - Add MCP tool registry, factory, and resource definitions - Add protocol models (JSON, tool definitions, errors, results) - Add infrastructure layer for MCP access, operation store, file transfer - Wire DI containers (main.dart, infrastructure_container, persistence_container) - Add mcp_dart 2.4.2 and crypto dependencies to pubspec Co-authored-by: Sisyphus <sisyphus@whph>
- Add MCP server factory, tool registry, and tool catalog - Add application shared services: timer session, restore barrier, application transaction, and graceful shutdown abstractions - Add drift query interceptor for restore barrier enforcement - Add per-feature MCP action contracts and event interfaces: app_usages, habits, notes, tags, tasks - Add feature MCP action implementations: app_usage, habit, note, settings, sync, task actions - Add save_note_with_tags_command and tag relationship commands Co-authored-by: Sisyphus <sisyphus@whph>
- Add MCP settings page, controller, and effects for user management - Add timer session alarm scheduler for MCP-aware timer lifecycle - Add MCP runtime service managing connection state and foreground/background - Add application shutdown service for graceful cleanup - Add app lifecycle integration with MCP runtime enter/leave foreground - Add desktop and Flatpak system tray exit with graceful shutdown Co-authored-by: Sisyphus <sisyphus@whph>
- Extend all feature commands with MCP-aware operations: - tasks: complete, delete, save, time records - habits: add, delete, complete, toggle, time records - notes: save, delete, save_with_tags - tags: delete, save, set_relationships, update - app_usages: save, delete, queries - settings: export, import - Add MCP task actions, habit actions, sync actions - Update registrations to expose MCP tool handlers - Add timer session alarm scheduler integration - Add habit record operations service - Add save_note_with_tags_command Co-authored-by: Sisyphus <sisyphus@whph>
- Adapt Android sync and app_usage services for MCP binding - Adapt desktop sync services for MCP client/server protocol - Update Flatpak system tray with graceful shutdown - Extend drift repositories with MCP-aware query support - Add database backup service and drift app context for MCP transactions - Update persistence container for restore barrier integration Co-authored-by: Sisyphus <sisyphus@whph>
- Add MCP settings page with locale support for all 22 translations - Add settings translation keys for MCP configuration - Update tag components for MCP-aware tag management - Add platform initialization service for MCP bootstrap - Add app bootstrap service with MCP runtime integration Co-authored-by: Sisyphus <sisyphus@whph>
- Add MCP contract and production client CI test job - Update Windows CI for MCP support - Update Android CI for MCP test execution - Update Privacy Policy with MCP data disclosure clause - Update PRD with MCP access documentation - Update docs README with MCP.md reference - Update sync and migration tests for MCP-aware changes Co-authored-by: Sisyphus <sisyphus@whph>
…ntation - Add MCP documentation (MCP.md) with tool contract for all 89 handlers - Add MCP smoke test client (Node.js) for official client compatibility - Add integration tests: data management, mutation parity, user actions - Add contract tests: protocol contract, tool catalog, resource tests - Add infrastructure tests: mcp_access_store, mcp_http_server, restore_barrier - Add presentation tests: all tool tests (tasks, habits, notes, tags, timer, settings) - Add timer session service test - Add settings MCP test Co-authored-by: Sisyphus <sisyphus@whph>
Move MCP settings from an inline settings-page section into a dedicated 'AI' tile that opens in a responsive dialog, matching the pattern used by the other settings pages. Rework the scope picker from FilterChips into a checkbox list with readable per-scope labels, add Select all / Clear bulk actions, and localize the new strings across all 22 locales.
Bound abandoned operations so grant slots recover, make settings and import schemas usable by external MCP clients, and correct the affected contract coverage.
Require destructive import scopes and bound local request, session, operation, and transfer state before it can exhaust the MCP service.
Use the staged transfer filename required by the import approval endpoint.
Use the shell that receives the Windows FVM installation path so the MCP test job can invoke FVM.
Ensure the full Linux test job can execute MCP user-action integration tests with the official client dependencies available.
Keep test access stores inside the Windows user application directory so the storage safety invariant is satisfied in Windows CI.
Keep reading past the body-size limit instead of aborting mid-stream, so the client finishes writing before the connection closes. Fixes a Windows-only reset observed in CI for the oversized chunked-body test.
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.
🚀 Context
Adds user-authorized, loopback-only Model Context Protocol (MCP) access so local AI agents can use WHPH tasks, habits, notes, timers, app usage, settings, sync, and data-transfer actions without exposing access state to sync, export, or restore.
Important
The MCP server is disabled by default. Users explicitly enable it and issue scoped local grants from WHPH settings; raw tokens are shown only at issuance.
⚙️ Implementation Details
📋 Checklist for Reviewer
docs/MCP.md, README, privacy policy, and PRD.