v0.1.1: diagnostic env-var errors, 403 scope-detail parsing, README link cleanup - #1
Merged
Merged
Conversation
…ink cleanup
Addresses 4 UX issues raised by early reviewers:
1. RISEUP_PAT error messages now distinguish three cases — unset vs
empty-string vs wrong-format — and the wrong-format variant includes
a safe prefix snippet of the received value so users can spot
copy-paste mistakes. Old "token looks malformed" message was misleading
when the env var was actually just unset.
2. 403 responses now parse the JSON body and surface scope detail when
the upstream API provides it ("Missing scope: budget:read. Your token
has: transactions:read."). Falls back to the previous generic message
when the body is empty or not JSON.
3. README link cleanup: previous "Log into the [RiseUp web app](input...)"
wording invited readers to assume the URL was app.riseup.co.il (it's
input.riseup.co.il). Replaced with a single unambiguous link to the
tokens page. Same cleanup applied to docs/quickstart.md.
4. Config-change-needs-restart caveat made explicit in the Claude Desktop
setup section (Cmd+Q and reopen, not just close window).
Tests: 21 -> 25 (added empty-string, prefix-in-error, 403-with-JSON-body,
403-non-JSON-fallback). Build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
idan-shmuel
approved these changes
Jun 25, 2026
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
Addresses 4 UX issues raised by an early reviewer on v0.1.0 setup. All four bundled into one v0.1.1 patch release.
Reviewer feedback (1-by-1)
1. Misleading error when
RISEUP_PATis missingPreviously the code only distinguished "falsy" from "wrong prefix" — a
RISEUP_PAT=""(or any other falsy state) triggered the "is required" message, but if the env var was set to anything else that didn't start withriseup_pat_, you got "token looks malformed". Easy to misdiagnose "I haven't configured the env var" as "I have the wrong format".Fix: three distinct error messages now, one per failure mode:
RISEUP_PAT environment variable is not set. Add it to your MCP client config (e.g. claude_desktop_config.json under mcpServers.<name>.env.RISEUP_PAT). Create a token at https://input.riseup.co.il/developer/tokensRISEUP_PAT environment variable is empty. Set it to the actual token value, not an empty string. ...RISEUP_PAT doesn't look like a RiseUp token — expected prefix "riseup_pat_", got "sk-someother…". Each token is shown only once at ... — make sure you copied the full value.The wrong-format variant includes a 12-char snippet of what was actually received so users can spot copy-paste mistakes (truncated to avoid leaking what might be a valid token of another shape).
2. 403 without scope detail
Previously the MCP threw a generic
RiseUp PAT lacks the required scope (403)regardless of what the API actually said in the response body. The companion olaf PR will start returning structured{ required, availableOnToken }in the 403 body — this change makes the MCP read and surface those fields.Fix: new
_parse403Detailhelper:When the API responds with
{ "required": "budget:read", "availableOnToken": ["transactions:read"] }, the user sees:When the body is empty or not JSON, falls back to the previous generic message — so this change is forward-compatible with whatever olaf does or doesn't include in the response body.
3. README link confusion (
app.riseup.co.ilvsinput.riseup.co.il)Reviewer said the README pointed to
app.riseup.co.il. It didn't — but the previous wording was:The link text "RiseUp web app" naturally suggests the URL is
app.riseup.co.ilto a skimming reader, even though it's actuallyinput.riseup.co.il. So readers were typingapp.riseup.co.ilinto their browsers based on the mental model the link text created.Fix: drop the redundant first link entirely. Now:
Same cleanup applied to
docs/quickstart.md(which had the samethe RiseUp web app at https://input.riseup.co.ilpattern, replaced with a direct URL).4. Config changes don't take effect without a full restart
Claude Desktop reads
claude_desktop_config.jsononly at startup. ChangingRISEUP_PAT(e.g. after creating a new token) and just closing the window doesn't pick up the new value — you have to Cmd+Q and reopen. Reviewer wasted time on this; the README didn't flag it.Fix: previous one-liner
Restart Claude Desktop. The get_budget tool should appear.replaced with:What's also in this PR
CHANGELOG.md— new file. v0.1.1 entries above + v0.1.0 backfilled. Going forward every release gets an entry per the runbook.Version
package.json: 0.1.0 → 0.1.1. Patch release per semver (bug fixes only, no API changes for tool consumers).What's NOT in this PR (intentionally deferred)
GET /api/metoken-introspection endpoint (Batch C / future feature) — needs design work with security team, not a same-day fix.Test plan
npm run buildnpm testnpm publish --access public), update Claude Desktop config to use the published version, re-trigger the failure cases from the reviewer to verify the new messages🤖 Generated with Claude Code