Repository navigation
Conversation
Opt-in Settings toggle starts a loopback Streamable HTTP server (127.0.0.1:<port>/mcp, bearer token, Host/Origin checks) in the Tauri shell that forwards JSON-RPC to the web app's McpServer. McpToolbox exposes budget read tools and Store5-backed write tools. The port is configurable in Settings (1024-65535, default 47615), persisted, and rebinds the endpoint when changed while on. Start/stop calls are serialized, and saving the same port retries a port that was busy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve conflicts with finance spaces, analytics settings and the new web schema bootstrap. MCP tools now resolve McpToolbox per request so they follow the active finance space instead of the one active at launch; the test platform module provides ReceiptFileStoreFactory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 an opt-in Assistant access (MCP) endpoint to the desktop app, so AI assistants on the same computer (Claude Code, Cursor, …) can read and update the budget.
src-tauri/src/mcp.rs): Streamable HTTP on127.0.0.1:<port>/mcp, POST only. It requires a bearer token (constant-time compare), allows only loopback Host headers (DNS-rebinding defence), and rejects cross-site Origins. It forwards each JSON-RPC body to the web app viamcp-request/mcp_respond, with a 60s timeout and 4 MB body limit.app/shared/.../mcp/):McpServerhandles the protocol (initialize, tools/list, tools/call).McpToolboxhas 18 tools: 7 reads, plus writes that go through the same repositories and use cases as the UI, so they're Store5 writes that sync like any other edit. There is deliberately no account or category deletion.McpAccessstores the toggle, port and token.claude mcp add …command, JSON config, and token copy and regenerate (with confirmation).recordAdHoc/recordAdHocTransfernow return the new posting id.Configurable port
Mutex, so a slow start can't finish after a later stop.Fixes from merging main
factorybindings.McpToolboxis resolved per request, so assistant tools follow the active space instead of staying on the space that was active at launch. A test covers this.ReceiptFileStore.openReaderandReceiptFileStoreFactory.Test results
mise run test: architecture guard passed; 246 JVM tests, 0 failures. This includes 16 MCP tests: protocol, tools including writes, space switching, and port default/persist/restart/retry/busy/range/ordering.cargo test(src-tauri): 4/4, including a real-socket test that a held port reports "already in use" and binds once freed../kotlin build: every module compiles for wasmJs, Android, iosArm64, iosSimulatorArm64, JVM and server. The only failure isperf-ios's Xcode app-bundling step:WebRTC.xcframeworkisn't present inapp/perf-ios/Frameworks(gitignored;setup-webrtc.shonly fetches it forios-app). That's an environment issue that comes from main, not this change.Consent / permission screens
Not tested end to end
🤖 Generated with Claude Code