feat(plugin): /accounted:setup command, CONNECTORS.md, v1.1.0 (#1902)

The Claude plugin is the one-click install for Cowork and Claude Code,
so it should also be the entry to agent-first onboarding (#1814).
/accounted:setup connects the bundled connector (creating the account on
the sign-in screen if needed), hands off to the server-side onboarding
skill when the account has no company, then the bank and Skatteverket
links. CONNECTORS.md documents the single bundled connector the way
Anthropic's own plugins do. Version 1.1.0 so marketplaces that sync on
version bumps pick it up. The plugin-refs guard now also validates
commands/*.md against the server.


Claude-Session: https://claude.ai/code/session_018wCdzRTatKiDByKB8hCNT6

Co-authored-by: Jakob Wennberg <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Jakob Wennberg
2026-08-25 18:39:01 +02:00
committed by GitHub
co-authored by Jakob Wennberg Claude Fable 5
parent a46957167c
commit 159823583c
6 changed files with 68 additions and 4 deletions
+1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "accounted",
"displayName": "Accounted",
"description": "Official Accounted plugin: Swedish double-entry bookkeeping flows for Claude. Connects your ledger over MCP and ships short workflow skills (daily bookkeeping, health check, month close, VAT, payroll, year-end) that work from the company's live data and load Swedish accounting knowledge from the product when needed. Every write is staged for your approval; nothing is booked on its own.",
"version": "1.0.0",
"version": "1.1.0",
"author": {
"name": "Accounted (erp-mafia)"
},
+18
View File
@@ -0,0 +1,18 @@
# Connectors
This plugin bundles exactly one connector: the Accounted MCP server, the same server that backs the Accounted connector in Claude.ai and the `accounted-mcp` stdio bridge.
| Connector | Server | Auth | What it reaches |
|-----------|--------|------|-----------------|
| Accounted | `https://app.accounted.se/api/extensions/ext/mcp-server/mcp?tool_namespace=accounted` | OAuth 2.1 (PKCE). Read-only scopes by default; write scopes are ticked explicitly on the consent screen. | The user's own companies in Accounted: ledger, transactions, invoices, VAT, payroll, reconciliation, year-end. |
## How the connection works
- **Lazy authentication.** The server answers `initialize`, `tools/list` and the documentation tools (`accounted_search_tools`, `accounted_list_skills`, `accounted_load_skill`) without any credentials. The first company-scoped call returns an authentication challenge, which Claude Code surfaces as `/mcp` → authenticate.
- **Account creation inside the sign-in.** A user who has no Accounted account creates one on the sign-in screen the challenge opens (BankID or e-mail + 2FA). No visit to the website first. `/accounted:setup` walks the whole flow, including creating the company from the conversation.
- **Every write is staged.** Write tools create a pending operation with a preview; nothing is booked until the user approves, either in chat via `accounted_approve_pending_operation` or in the web app.
- **Data stays in the user's tenant.** The connector only ever sees companies the signed-in user is a member of, enforced server-side per call.
## Self-hosted Accounted
Point the plugin at your own instance: remove the bundled server and add yours with `claude mcp add --transport http accounted "https://your-host/api/extensions/ext/mcp-server/mcp?tool_namespace=accounted"`. The same OAuth flow, skills and commands apply.
+2 -1
View File
@@ -12,12 +12,13 @@ The official plugin for [Accounted](https://app.accounted.se), the open-source S
/plugin install accounted@accounted
```
Then run `/mcp` and authenticate with Accounted (OAuth consent screen; read-only scopes by default, write scopes are ticked explicitly). No account yet? Create it on that same screen, with BankID or e-mail. Start with `/accounted:start`: for a brand-new account it walks you through setting up the company (company form, organisationsnummer, VAT, fiscal year) right here in the conversation, then hands you the bank and Skatteverket connect links.
Then run `/accounted:setup`. It connects the Accounted connector (`/mcp` → authenticate; no account yet? create it on that sign-in screen, with BankID or e-mail), and for a brand-new account it sets up the company right here in the conversation (company form, organisationsnummer, VAT, fiscal year), then hands you the bank and Skatteverket connect links. After that, `/accounted:start` orients you in the books.
## Skills
| Command | What it does |
|---|---|
| `/accounted:setup` | First run: connect (create the account if needed) and set up the company from the conversation |
| `/accounted:start` | Connect, orient, and surface what needs attention |
| `/accounted:bookkeep` | Clear unbooked bank transactions and receipts (daily) |
| `/accounted:check` | Read-only health check with a prioritized fix list |
File diff suppressed because one or more lines are too long
@@ -15,6 +15,7 @@ import { discoverAtoms } from '@/scripts/lib/atom-discovery'
const repoRoot = join(__dirname, '..', '..', '..', '..')
const skillsDir = join(repoRoot, 'claude-plugin', 'skills')
const commandsDir = join(repoRoot, 'claude-plugin', 'commands')
function readPluginSkills(): { file: string; body: string }[] {
return readdirSync(skillsDir).map((dir) => {
@@ -23,14 +24,24 @@ function readPluginSkills(): { file: string; body: string }[] {
})
}
const pluginSkills = readPluginSkills()
// Slash commands (commands/*.md) reference the same server surface as the
// skills and get the same guard; /accounted:setup is the install-time entry
// (issue #1814) that hands off to the onboarding skill.
function readPluginCommands(): { file: string; body: string }[] {
return readdirSync(commandsDir)
.filter((f) => f.endsWith('.md'))
.map((f) => ({ file: `commands/${f}`, body: readFileSync(join(commandsDir, f), 'utf8') }))
}
const pluginSkills = [...readPluginSkills(), ...readPluginCommands()]
const serverSource = readFileSync(join(__dirname, '..', 'server.ts'), 'utf8')
describe('claude-plugin wrapper references', () => {
it('ships the seven v1 skills', () => {
it('ships the seven v1 skills and the setup command', () => {
expect(pluginSkills.map((s) => s.file).sort()).toEqual([
'bookkeep/SKILL.md',
'check/SKILL.md',
'commands/setup.md',
'month-close/SKILL.md',
'payroll/SKILL.md',
'start/SKILL.md',