Crunch Accounting (crunch-mcp)

io.github.mattoddie由 GitHub 帳號 mattoddie 發布v0.4.1更新於 Oct 29, 2026

Work with your Crunch Accounting books: expenses, receipts, invoices, clients, suppliers and banking

概覽

AI 產生的概覽

將助理連接到 Crunch Accounting 帳務,可讀取並在開啟後修改費用、收據、發票、客戶、供應商與銀行帳戶。

可以做什麼
  • 讀取公司資訊、銀行餘額,並一次取得業務總覽
  • 列出與篩選費用、合計、付款及缺少收據的項目,附加或下載收據
  • 建立、更新、開立、以電子郵件寄送銷售發票並下載 PDF,登錄付款
  • 管理客戶、供應商與週期性費用,包含封存與刪除
  • 查詢費用類型、營業稅類型、會計期間等參考值
  • 透過原始介面呼叫任一 Crunch 公開 API 端點
適用情境
適合使用 Crunch Accounting 的英國企業,想用自然語言詢問帳務狀況、催收逾期發票、登錄收據或草擬發票;預設為唯讀,寫入需手動開啟。
執行需求
透過 Docker 映像 ghcr.io/mattoddie/crunch-mcp 或桌面擴充套件在本機執行;需要已核准 API 存取權的 Crunch 帳戶、CRUNCH_CLIENT_ID,機密用戶端另需 CRUNCH_CLIENT_SECRET;需互動式 OAuth 登入;可選 CRUNCH_REFRESH_TOKEN;需要 Docker 與 MCP 用戶端。
安裝前請注意
預設唯讀;開啟 CRUNCH_ALLOW_WRITES 後助理可建立與修改紀錄,CRUNCH_ALLOW_DELETES 允許刪除,CRUNCH_ALLOW_EMAIL 會向客戶寄送發票與催款提醒。CRUNCH_CLIENT_SECRET 與 CRUNCH_REFRESH_TOKEN 屬敏感憑證,重複使用舊的更新權杖會使登入失效。沒有沙箱環境,建議先在免費帳戶試用,並使用試跑與稽核記錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Crunch Accounting (crunch-mcp),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[crunch-mcp logo]

crunch-mcp

Talk to your books.

An open-source Model Context Protocol server for Crunch Accounting, the UK online accounting service. It lets Claude and other AI assistants read and, if you allow it, update your expenses, receipts, invoices, clients, suppliers and bank accounts, all from one small Docker container.

[CI] [Release] [Container image] [License: MIT]

crunch-mcp.mattoddie.dev

Quick start · Documentation · Tool reference · Contributing


"How's the business looking this month?" You have £18,240 across your two bank accounts and £312 on the company credit card. Three sales invoices are unpaid, £7,800 in total. INV-0042 to Example Client Ltd (£2,400) is 12 days overdue; the other two aren't due yet. On the spending side, four September expenses have no receipt attached and one bill from Example Hosting Ltd (£96) is still unpaid. Want me to draft a polite chaser for INV-0042, or list the expenses that are missing receipts?

Ask about your business in plain English. The assistant picks from 70 tools to look things up and, if you allow it, make changes. Some examples:

  • 🩺 "Give me a health check of the business."
  • 🧾 "Here's a receipt for a train ticket to Leeds. Record it as an expense paid from the business account."
  • 📬 "Which invoices are overdue? Draft a chasing email for each customer."
  • 📊 "Summarise income and spending for the last quarter, with an estimate of the VAT."
  • 🔍 "Which expenses this year have no receipt attached?"
  • 📝 "Invoice Example Client Ltd for 5 days of consulting at £450 a day, on 30-day terms."

Highlights

  • 🐳 Docker-first and tiny. One image (ghcr.io/mattoddie/crunch-mcp) for linux/amd64 and linux/arm64, about 21 MB. It's a single static Go binary on a distroless base, with no shell or package manager, running as a non-root user. It serves Streamable HTTP for a long-running service, or stdio for docker run -i. You can also run the binary on its own.
  • 🛡️ Safe by default. The server is read-only unless you turn on writes. Deleting needs a second switch, and emailing invoices or payment reminders to customers needs a third. The switches also hold inside request bodies and the raw API tool, and the HTTP server requires a bearer token. Tools that aren't allowed aren't registered at all, and destructive tools, such as deletes and issuing an invoice, are labelled so your MCP client asks before running them.
  • 🔑 Least-privilege login. It logs in with Crunch's own OAuth 2.0 flow (with PKCE) and asks only for the scopes your settings need. Tokens never appear in tool output.
  • 🔄 Stays logged in. Crunch rotates refresh tokens, and reusing an old one revokes your login. crunch-mcp saves each new token before using it and never refreshes twice at once, so it keeps working across restarts.
  • ✏️ Careful updates. Changing an expense or invoice fetches the current record and changes only what you asked, so payments and attachments are never dropped by accident.
  • 🔍 Preview and audit. Every tool that changes something takes dry_run: true to show the request it would send, with a field-by-field diff for updates, without changing anything. CRUNCH_AUDIT_LOG records each change in a JSON Lines audit log.
  • 🖥️ One-click Claude Desktop install. Each release has an extension bundle (.mcpb) for macOS, Windows and Linux, with a settings form and no Docker needed.
  • 📎 Receipts and PDFs. Attach receipts and timesheets, download receipts as images the assistant can read, and fetch invoice PDFs.
  • 🎛️ Tunable. Expose only the toolsets you need, which keeps the model's context small and focused. List tools take search, fields and limit to fetch only what's needed.
  • 🧪 Tested. The test suite runs against a mock Crunch API and OAuth server on every build.

Quick start

Using Claude Desktop? Download the extension bundle for your computer from the latest release, open it, enter your Crunch client ID and ask Claude to "log in to Crunch". See Claude Desktop. The steps below set up the Docker server for every other client.

You need Docker, a Crunch account, Crunch API access and an MCP client such as Claude Code.

1. Get API access. Apply for access to Crunch's public API through the application form linked from Crunch's developer documentation. Crunch sends you a client ID, and a client secret if you're set up as a confidential client. There's no sandbox, so a free Crunch account is a good place to try things. Getting started has the details.

2. Set up the server.

sh
mkdir crunch-mcp && cd crunch-mcpcurl -fsSLO https://raw.githubusercontent.com/mattoddie/crunch-mcp/main/compose.yamlcurl -fsSL https://raw.githubusercontent.com/mattoddie/crunch-mcp/main/example.env -o .env# Edit .env: set CRUNCH_CLIENT_ID (and CRUNCH_CLIENT_SECRET if you have one)# and a random MCP_AUTH_TOKEN, which the HTTP server requires (e.g. `openssl rand -hex 32`)

3. Log in to Crunch and start the server.

sh
docker compose run --rm -p 127.0.0.1:8976:8976 crunch-mcp login   # open the URL it prints and click Allowdocker compose up -d

If your browser isn't on the Docker host, the page after Allow won't load. That's fine: copy the URL from the address bar and paste it into the terminal.

4. Connect your assistant.

sh
claude mcp add --transport http crunch http://<docker-host>:8080/mcp \  --header "Authorization: Bearer <MCP_AUTH_TOKEN>"

Now ask "How's my business doing?" in Claude Code.

Using Claude Desktop, VS Code, Cursor or Codex? See Connecting MCP clients. Prefer not to run a service? Use stdio mode with docker run -i or the local binary.

crunch-mcp is listed in the official MCP Registry as io.github.mattoddie/crunch-mcp, so clients that install servers from the registry can set it up for you, with the Docker image in stdio mode or an extension bundle.

Turning on changes

Out of the box the assistant can look but not touch. To let it make changes, add these to .env:

sh
CRUNCH_ALLOW_WRITES=true    # create and update expenses, invoices, clients, suppliers, payments, attachments…CRUNCH_ALLOW_DELETES=true   # also allow deleting records and removing payments (needs writes)CRUNCH_ALLOW_EMAIL=true     # also allow emailing invoices and payment reminders to customers (needs writes)CRUNCH_TOOLSETS=account,reference,expenses,invoices,clients,suppliers   # optional: expose fewer toolsCRUNCH_AUDIT_LOG=stderr     # optional: log every change (or an absolute file path; see docs/configuration.md)

The login needs matching scopes, so log in again after turning on writes or deletes:

sh
docker compose stopdocker compose run --rm -p 127.0.0.1:8976:8976 crunch-mcp logindocker compose up -d

Ask for a dry run first when it matters: "Record that receipt, but show me a dry run first."

Read Security before turning on writes for your real books.

What it can do

ToolsetWhat's covered
accountLogin status and the OAuth login flow, the logged-in user, company details (VAT number and scheme, addresses) and a one-call business overview
referenceThe values Crunch expects: expense types, VAT types, payment methods, countries, open accounting periods, directors and employees
bankingBank accounts and credit cards: balances, details, payments recorded against them, opening balances, default accounts, archiving
clientsClients (the customers you invoice): list, look up, create, update and delete
suppliersSuppliers: list, look up, create, update, archive and delete
expensesExpenses: list and filter, totals, create with lines, payments and receipts, update, record and remove payments, attach and download receipts, delete
recurringRecurring expenses that Crunch creates on a schedule: list, create, pause or change, delete
invoicesSales invoices: list and filter, totals, create drafts, update, issue, email to the customer, record and remove payments, attachments, PDF download, delete
rawAn escape hatch that calls any Crunch public API endpoint

See the tool reference for every tool and argument. Ready-made prompts like business_health_check, record_receipt and chase_overdue_invoices chain the tools together for common jobs.

Documentation

The docs are also published at crunch-mcp.mattoddie.dev/docs, with search.

🚀 Getting startedStep-by-step setup, from API access to first question
🔌 Connecting MCP clientsClaude Code, Claude Desktop, VS Code, Cursor, Codex, stdio mode
⚙️ ConfigurationEvery environment variable, how login and tokens work, Docker secrets, toolsets
🐳 DeploymentCompose, image tags, upgrades, TLS reverse proxy, hardening, running without Docker
💬 Using crunch-mcpExample conversations, prompts, how changes, receipts and PDFs work
🧰 Tool referenceEvery tool and prompt, generated from the code
🛡️ SecurityThreat model, least privilege, token storage, safe write setups
📡 CompatibilityThe Crunch API, its limits, and known gaps
🩹 TroubleshootingCommon errors and how to fix them
🛠️ DevelopmentArchitecture, adding a tool, testing

Contributing

Contributions are very welcome, whether that's bug reports, docs or new tools. Read the contributing guide to get started, and please follow the code of conduct. To report a vulnerability, see the security policy. Please don't open a public issue for one.

License

MIT © Matt Oddie

crunch-mcp is an independent community project. It is not affiliated with, endorsed by or sponsored by Crunch (E-Crunch Ltd). "Crunch" is a trademark of E-Crunch Ltd.

來源:README.md,提交 b5f70de

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v0.4.1最新Oct 22, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分