feat(settings): API & MCP tab: correct connector URL namespace, plugin path, Swedish guide (#2105)

* feat(settings): API & MCP tab: correct connector URL namespace, plugin path, Swedish guide

The in-product MCP URLs omitted `tool_namespace=accounted`, and
resolveMcpToolNamespace() falls back to the legacy `gnubok_` prefix when the
param is absent. Every connection made from Settings therefore got `gnubok_*`
tool names while the docs, the accounted-api skill, and
claude-plugin/.mcp.json all reference `accounted_*`.

- Add `tool_namespace=accounted` to the Claude.ai, Claude Code, and
  Claude Desktop snippets.
- Move the Claude Desktop bridge from `npx gnubok-mcp` / `GNUBOK_API_KEY` to
  `npx -y accounted-mcp` / `ACCOUNTED_API_KEY`, and emit `ACCOUNTED_URL` so
  self-hosted and white-label instances get a config pointing at their own
  host. The `gnubok_sk_` key prefix is unchanged: it is wire format.
- Surface the Claude Code plugin, the only path that configures the
  connection and the seven workflow commands in one step.
- Rename the settings tab "API" to "API & MCP" and rewrite its intro: the
  MCP connection is what most users come here for, not API keys.
- Link the step-by-step guide from the panel, locale-aware.

Docs: add a Swedish /docs/api/anslut-claude alongside the English page (the
docs site has no locale routing, so each language is its own URL), give both
the Claude Code plugin path, and teach the export and freshness scripts about
the new page so cross-repo drift is caught.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HfZgiZmNN6qGEfgvXqxAeg

* fix(settings,docs): Cursor is not Claude Code; use the accounted_ tool name

Review follow-up on #2105.

`claude mcp add` is a Claude Code command. Cursor does not read it, so the
"Claude Code / Cursor" row and the docs sentence pointing Cursor users at that
command were both wrong (the row predates this PR; the docs sentence did not).
Cursor now gets its own row and its own `~/.cursor/mcp.json` snippet with the
`url` field, in the panel and in both docs pages.

Also `vat_close_check` -> `accounted_vat_close_check` in the reviewer test on
both pages, matching the identifier used in the prompts section above it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HfZgiZmNN6qGEfgvXqxAeg

* feat(settings,docs): one-click Connect to Claude, and cut the panel to one action

Anthropic documents an install link for custom connectors:
https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=NAME&connectorUrl=ENCODED
(claude.com/docs/connectors/building/directory-vs-custom). It opens claude.ai
with the connector name and URL prefilled; the user still reviews and confirms,
and it grants nothing on its own. We were telling people to copy a URL and go
paste it somewhere else instead.

Settings panel, rendered and reviewed:
- "Connect to Claude" button is now the only thing above the fold. Everything
  that needs a config file or a terminal (claude.ai manual paste, Claude Code,
  the plugin, Cursor) moved into one "Other clients" disclosure, and the
  API-key methods keep theirs. Four code blocks -> one button, 1057px -> 719px.
- The connect group renders above the API-keys group. Connecting is why users
  open this tab; the tab's own intro says so.
- Each entry inside the disclosures shows its instruction as visible text.
  They were `?` HelpPopovers, so the panel read as opaque code blobs with no
  instructions on screen.
- Prose interpolates the brand's real casing, not the lowercased config key.

Docs, both languages: Path A leads with the install link and drops from five
manual steps to a link plus three short paragraphs, with the manual paste kept
under a subheading. No raw HTML: the docs renderer has no rehype-raw, so
<details> would have been silently dropped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HfZgiZmNN6qGEfgvXqxAeg

* fix(settings,docs): correct claude mcp add syntax and the SSR install link

Review follow-up. Both findings verified before acting on them.

`claude mcp add --help` gives `claude mcp add [options] <name> <commandOrUrl>`:
the URL is positional and there is no `--url` flag, so the API-key snippet
would have failed on a missing argument. Both commands now put
`--transport http` before the name and pass the URL positionally, in the panel
and in both docs pages.

The panel is server-rendered before it hydrates and window.location has no
server equivalent, so the install link was built from a relative mcpBase in the
first paint. A click in that window would hand claude.ai a connectorUrl it
cannot resolve. The origin now resolves after mount and the anchor carries no
href until it is known, which also makes it unclickable rather than wrong.
Verified: the SSR HTML contains no claude.ai href and no relative connectorUrl,
post-hydration the href is absolute, and there are no hydration warnings.

DECISIONS.md: code-span the `gnubok_*`/`accounted_*` wildcards so they stop
rendering as emphasis, and drop the "no one-click deeplink" claim from the
earlier entry rather than leave a false statement standing two lines above its
own correction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HfZgiZmNN6qGEfgvXqxAeg

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-09-01 16:56:19 +02:00
committed by GitHub
co-authored by Claude Opus 5 Jakob Wennberg
parent cd40127f0e
commit b5da51ea0a
11 changed files with 488 additions and 145 deletions
+11 -5
View File
@@ -392,7 +392,7 @@
"templates": "Reusable postings and patterns learned from your bookkeeping.",
"banking": "Transactions are fetched automatically. {appName} can only read, never move money.",
"assistant": "What the assistant knows, remembers and can do.",
"api": "Keys for MCP clients like Claude and Cursor, and for your own integrations.",
"api": "Connect Claude, Cursor, and other AI assistants over MCP. API keys for your own integrations live here too.",
"whatsapp": "Link your mobile number and send receipts as photos or PDFs straight from WhatsApp."
},
"settings_nav": {
@@ -414,7 +414,7 @@
"assistant": "Assistant",
"backup": "Backup",
"account": "Account",
"api": "API",
"api": "API & MCP",
"billing": "Subscription",
"whatsapp": "WhatsApp",
"group_account": "Account",
@@ -2838,13 +2838,19 @@
"copy_aria": "Copy",
"copy_failed": "Could not copy. Select the text above and copy it manually.",
"connect_mcp_title": "Connect MCP client",
"connect_to_claude": "Connect to Claude",
"connect_to_claude_help": "Opens claude.ai with the URL prefilled. You review and confirm there; no API key needed. Your instance must be reachable from the internet.",
"other_clients": "Other clients: Claude Code, Cursor, plugin",
"claude_ai_manual": "claude.ai (manual)",
"works_with_ai": "Works with Claude, ChatGPT, and other AI assistants.",
"recommended_badge": "Recommended",
"claude_ai_instructions": "Go to <path>Settings → Connectors → Add custom connector</path> and paste the MCP server URL. You sign in via your {connectorName} account: no API key needed.",
"claude_code_cursor": "Claude Code / Cursor",
"cursor_instructions": "Add to <code>~/.cursor/mcp.json</code> (global) or <code>.cursor/mcp.json</code> (per project). Cursor does not read <code>claude mcp add</code>.",
"terminal_runs_browser_login": "Run in the terminal, sign in via the browser:",
"connect_with_api_key": "Connect with an API key instead",
"connect_with_api_key": "Connect with an API key",
"claude_desktop_instructions": "Add to <code>claude_desktop_config.json</code> (Settings → Developer):",
"claude_plugin_label": "Claude Code plugin",
"claude_plugin_instructions": "Installs both the connection and seven ready-made workflows (/accounted:start, /accounted:vat, /accounted:year-end). Run these lines in Claude Code, then approve the sign-in with /mcp.",
"full_guide_link": "Full guide: connect Claude step by step",
"terminal_with_api_key": "Run in the terminal with an API key:",
"create_dialog_title": "Create API key",
"create_dialog_description": "Name the key so you remember what it's for.",
+11 -5
View File
@@ -392,7 +392,7 @@
"templates": "Återanvändbara konteringar och mönster som lärts in från din bokföring.",
"banking": "Transaktioner hämtas automatiskt. {appName} kan bara läsa, aldrig flytta pengar.",
"assistant": "Vad assistenten vet, minns och kan.",
"api": "Nycklar för MCP-klienter som Claude och Cursor, och för egna integrationer.",
"api": "Anslut Claude, Cursor och andra AI-assistenter via MCP. Här skapar du också API-nycklar för egna integrationer.",
"whatsapp": "Koppla ditt mobilnummer och skicka kvitton som foto eller PDF direkt i WhatsApp."
},
"settings_nav": {
@@ -414,7 +414,7 @@
"assistant": "Assistenten",
"backup": "Säkerhetsbackup",
"account": "Konto",
"api": "API",
"api": "API & MCP",
"billing": "Abonnemang",
"whatsapp": "WhatsApp",
"group_account": "Konto",
@@ -2838,13 +2838,19 @@
"copy_aria": "Kopiera",
"copy_failed": "Kunde inte kopiera. Markera texten ovan och kopiera manuellt.",
"connect_mcp_title": "Anslut MCP-klient",
"connect_to_claude": "Anslut till Claude",
"connect_to_claude_help": "Öppnar claude.ai med adressen ifylld. Du granskar och godkänner där; ingen API-nyckel behövs. Kräver att din instans går att nå från internet.",
"other_clients": "Andra klienter: Claude Code, Cursor, plugin",
"claude_ai_manual": "claude.ai (manuellt)",
"works_with_ai": "Fungerar med Claude, ChatGPT och andra AI-assistenter.",
"recommended_badge": "Rekommenderat",
"claude_ai_instructions": "Gå till <path>Settings → Connectors → Add custom connector</path> och klistra in MCP-serverns URL. Du loggas in via ditt {connectorName}-konto: ingen API-nyckel behövs.",
"claude_code_cursor": "Claude Code / Cursor",
"cursor_instructions": "Lägg till i <code>~/.cursor/mcp.json</code> (globalt) eller <code>.cursor/mcp.json</code> (per projekt). Cursor läser inte <code>claude mcp add</code>.",
"terminal_runs_browser_login": "Kör i terminalen, loggar in via webbläsaren:",
"connect_with_api_key": "Anslut med API-nyckel istället",
"connect_with_api_key": "Anslut med API-nyckel",
"claude_desktop_instructions": "Lägg till i <code>claude_desktop_config.json</code> (Inställningar → Developer):",
"claude_plugin_label": "Claude Code-plugin",
"claude_plugin_instructions": "Installerar både anslutningen och sju färdiga arbetsflöden (/accounted:start, /accounted:vat, /accounted:year-end). Kör raderna i Claude Code och godkänn sedan inloggningen med /mcp.",
"full_guide_link": "Full guide: anslut Claude steg för steg",
"terminal_with_api_key": "Kör i terminalen med en API-nyckel:",
"create_dialog_title": "Skapa API-nyckel",
"create_dialog_description": "Ge nyckeln ett namn så du vet vad den används till.",