feat: add write-capable MCP tools#29
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.
Original request
Implement the planned PR to make the xpenser MCP endpoint write-capable so agents can manage vendors, categories, and transactions instead of only reading data.
What changed
configandknexso vendor enrichment, currency conversion, and transaction listing match the HTTP API behavior.Reasoning
This keeps MCP as another authenticated entry point over the same business logic already used by the HTTP API rather than introducing a parallel write path. Current API keys remain the authorization boundary, matching the existing external API model. Vendor deletion is not included because the current API and application services do not define vendor deletion semantics.
Screenshots / preview evidence
Screenshots are not applicable because this is a non-visual API/MCP endpoint change.
Preview QA passed against
https://xpenser-pr-029.cleverbrush.com: logged in with the seeded account, created an API key, connected through Streamable HTTP MCP, confirmed 19 tools, created a category, created a vendor, created a transaction, updated the transaction amount to23.45, deleted the transaction, deleted the temporary category, and revoked the temporary API key.Validation
npm run lintpassed locally.npm run typecheckpassed locally.npm testpassed locally: 58 files, 336 tests.npm test -- apps/api/src/mcp/tools.test.ts.Lint and testpassed.Deploy PR environmentpassed.Playwright e2epassed.xpenser-api-pr-29traces/logs/operation telemetry checked after preview QA:xpenserMcp, category, vendor, and transaction operations were present; top operations reportederrorCount: 0; error-only trace and ERROR-log queries returned no rows.