brokeless as an MCP server for AI apps like Claude Code
/api/mcp (Streamable HTTP, stateless) with personal tokens made on Connect your AI (stored as a hash, shown once, revocable; migration 0033). Each call runs as the token's user in their own session, so RLS applies; AI switched off in Settings refuses. Summary only, like every cloud path: the existing summary tools, plus tools that change things through placeholders and answer with counts: list categories and rules, create rule, delete rule (with undo), recategorize, find transfers, merge accounts (preview first). Rule past-matching and merging moved to shared libraries (lib/rule-past.ts, lib/merge-run.ts) so the app and the tools run the same code. Tested with the official MCP client: bad token refused, tools listed, and the 'ing' rule found, undone and replaced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7298cf955
commit
1253f4e7fb
13 files changed
+471
-100
No files matched your search
@@ -171,6 +171,21 @@ brokeless runs in Docker, so it can't use a Claude login of its own. Instead, Cl
|
||||
|
||||
Claude only answers while that command runs. It starts Claude with every tool off, in an empty folder, so it can't touch your files. Works on Windows, macOS and Linux.
|
||||
|
||||
## Connect Claude Code (MCP)
|
||||
|
||||
brokeless is an MCP server too, so an AI app like Claude Code can read your money summary and fix things for you: find a rule that catches too much, delete it and undo what it did, make better rules, recategorize, mark transfers, merge accounts.
|
||||
|
||||
1. In brokeless: Connect your AI, **Connect an AI app (MCP)**, **Make a token**. It shows once.
|
||||
2. Run the command it shows on your computer:
|
||||
|
||||
```bash
|
||||
claude mcp add --transport http brokeless https://brokeless.mangavalk.com/api/mcp --header "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
3. Start a new Claude Code session and ask, for example: "Which of my brokeless rules catch too much?"
|
||||
|
||||
It is summary only, like broke ai: rounded amounts, months not days, names as placeholders (⟨M1⟩, ⟨A1⟩), never single transactions. Changes act on your real data, and Claude says what it will change first. Revoke a token on the same page. With AI switched off in Settings the endpoint refuses.
|
||||
|
||||
## How AI stays private
|
||||
|
||||
Every AI path goes through one gate. A cloud model gets a summary: rounded amounts, names replaced by tokens. Full detail goes only to a local model, which is what Ollama is here. You can turn AI off in Settings. Each answer runs with no way to change your data.
|
||||
|
||||
Reference in new issue
Block a user