diff --git a/AutopilotWorkQueue.md b/AutopilotWorkQueue.md index 2807cbc..3c578d9 100644 --- a/AutopilotWorkQueue.md +++ b/AutopilotWorkQueue.md @@ -5,26 +5,6 @@ ## Queue -```yaml -id: AWQ-010 -title: "Qonto MCP integration: connect the company bank account to our agent infrastructure" -lane: green -pulls_from: [mailmeta/mail-log.md 2026-07-18, OH-2026-003] -notes: "Founder direction 2026-07-18: 'integrations like this should help - with the automated company approach a lot' — arrange soon. Prepare the - integration package: (a) Qonto MCP capabilities/docs review (read scopes - first; payments are Red-lane forever); (b) credential lane via ops-warden/ - OpenBao (tenants/binky/qonto — same custody pattern as company-email; - provisioning founder Red lane; NO claude.ai native integrations, harness/ - MCP lane only); (c) consumer design: rhythm sessions + finance/ - CostRunRate.md feeds (real balance/transactions replace manual Qonto - pulls, part of OH-2026-003's cost-vs-usage answer — the MCP is an - argument FOR keeping Qonto); (d) note main accounting stays DATEV - Unternehmen Online (DUO) — Qonto MCP complements, does not replace, - the DUO/StB lane. Output: integrations/qonto-mcp.md design + DecisionQueue - entry for the Red-lane provisioning." -``` - ```yaml id: AWQ-002 title: "Map self-billed Eigenentwicklung invoices to ecosystem capabilities as IP evidence" @@ -63,6 +43,12 @@ with a one-line outcome. ## Completed +- **AWQ-010** (2026-07-19, agt-claude-workstation): promoted to workplan + **BINKY-WP-0005** (registered in hub). Integration package delivered: + `integrations/qonto-mcp.md` design (self-hosted qonto-mcp-server, NOT the + hosted OAuth connector; read-only via harness allow-list; OpenBao lane + `tenants/binky/qonto/api`) + DEC-2026-004 for the founder Red-lane API-key + provision. First pull (T05) waits on the decision. - **AWQ-009** (2026-07-17, agt-claude-workstation): Stripe webhook failure diagnosed — stale endpoint `api.preprod.blobr.dev` from the defunct Blobr integration, DNS dead, monthly Stripe digests since April. Fix is a diff --git a/DecisionQueue.md b/DecisionQueue.md index edcdb48..4294844 100644 --- a/DecisionQueue.md +++ b/DecisionQueue.md @@ -44,6 +44,32 @@ fallback_if_no_response: "cron bridge keeps running; no degradation, but workstation-independence milestone stalls" ``` +### DEC-2026-004 — Qonto MCP: create API key, provision OpenBao lane (read-only use) + +```yaml +id: DEC-2026-004 +title: "Provision Qonto API credentials for the self-hosted Qonto MCP server (read-only harness lane)" +lane: red +status: prepared +state_hub_decision_id: "a2a9de69-5bc1-434a-9a61-508ff3c12edf" +created_at: "2026-07-19" +needed_by: "soft — pairs naturally with OH-2026-003 (next Qonto dashboard visit)" +attention_cost: "~10 min: approve design, create API key in Qonto /settings/integrations, one bao kv put" +agent_recommendation: "approve — self-hosted qonto/qonto-mcp-server via + ops-warden/OpenBao (tenants/binky/qonto/api), NOT the hosted mcp.qonto.com + OAuth connector (violates no-native-integrations policy). Qonto API keys + are full-scope, so read-only is enforced by harness tool allow-list; + payments stay founder-only forever. While in the dashboard: note plan tier + + monthly cost and API prerequisites (OH-2026-003). Main accounting stays + DUO — this complements, does not replace, the StB lane." +evidence: + - integrations/qonto-mcp.md + - workplans/BINKY-WP-0005-qonto-mcp-integration.md +options: [approve, reject, revise, defer] +fallback_if_no_response: "no degradation — CostRunRate TBC rows stay manual; + cost-vs-usage answer for OH-2026-003 stays unquantified" +``` + ## Resolved decisions ### DEC-2026-002 — Agent harness: one shared runtime repo diff --git a/integrations/qonto-mcp.md b/integrations/qonto-mcp.md new file mode 100644 index 0000000..3fc7731 --- /dev/null +++ b/integrations/qonto-mcp.md @@ -0,0 +1,112 @@ +# Qonto MCP Integration — Design + +> Status: design v1 — 2026-07-19 (BINKY-WP-0005, from AWQ-010). +> Goal: the company Qonto account becomes an agent-readable finance source +> (balance, transactions, statements) through the sanctioned harness/MCP +> lane. **Read scopes first; payments/transfers are Red lane forever.** +> Credential provisioning is a single founder Red-lane step (DEC-2026-004). + +## Variant decision (T01) + +Two Qonto MCP options exist as of 2026-07: + +| | Hosted connector | Self-hosted server | +| --- | --- | --- | +| Endpoint | `https://mcp.qonto.com/mcp` | `qonto/qonto-mcp-server` (GitHub), Docker image `qonto/qonto-mcp-server:latest` | +| Auth | OAuth (user identity, Business-API scopes) | `QONTO_API_KEY` + `QONTO_ORGANIZATION_ID` env vars (from Qonto `/settings/integrations`) | +| Transport | remote streamable-HTTP only | stdio (default) or `--transport streamable-http` | +| Tool surface | curated subset incl. **write** tools (cards, invoicing, requests); no transfers | organization info, accounts, transaction history, business operations | +| Custody fit | credentials live in the AI client's connector settings | env-name pattern — identical to email-connect | + +**Chosen: self-hosted `qonto/qonto-mcp-server`.** The hosted connector is +exactly the "native integration" the corporate access policy forbids (OAuth +grant held by claude.ai/the client, outside OpenBao custody, write tools +bundled in). The self-hosted server consumes credentials only via env +*names*, runs inside the harness, and rides the existing warden delivery +path unchanged. + +**Read-only enforcement:** Qonto API keys are not scope-limited server-side, +so read-only is enforced at **harness level**: tool allow-list restricted to +read tools (organization, accounts, transactions, statements, attachments, +labels). Card, invoicing, request and any future transfer tools are never +allow-listed. This mirrors the Green/Blue tool allow-list of +`scripts/rhythm-session.sh`. Any payment initiation stays founder-only in +the Qonto app — Red lane forever, not an automation target. + +**Prerequisite check (founder, while in the dashboard — OH-2026-003):** +confirm the current Qonto plan exposes API keys under +`/settings/integrations`; note plan tier + monthly cost for +`finance/CostRunRate.md` row 4. + +## Credential lane (T02) — ops-warden/OpenBao custody + +Same pattern as `integrations/company-email-openbao.md` +(WARDEN-WP-0028 tenants custody): + +| Item | Value | +| --- | --- | +| Mount | `tenants` | +| Path | `tenants/binky/qonto/api` | +| Fields | `QONTO_API_KEY`, `QONTO_ORGANIZATION_ID` | +| Policy | `workload-kv-read-binky-qonto-api` (to be created, warden playbook) | +| Catalog | `binky-qonto-api` (draft until provision) | +| Risk | high (full-scope bank API key — read-only is harness-enforced) | + +```text +founder (Red lane, once) + └─ bao kv put tenants/binky/qonto/api QONTO_API_KEY=@file QONTO_ORGANIZATION_ID=@file + └─ OpenBao: tenants/binky/qonto/api + └─ warden access binky-qonto-api --exec + └─ qonto-mcp-server (env names only) → harness read tools + └─ finance/CostRunRate.md + rhythm session feeds +``` + +### Founder provision (Red lane — interactive human shell) + +```bash +# In the Qonto dashboard: /settings/integrations → create API key, note org ID +umask 077 +# key into /tmp/qonto.key, org id into /tmp/qonto.org — private terminal only +bao kv put tenants/binky/qonto/api \ + QONTO_API_KEY=@/tmp/qonto.key \ + QONTO_ORGANIZATION_ID=@/tmp/qonto.org +shred -u /tmp/qonto.key /tmp/qonto.org +``` + +The organization ID is low-secrecy but lives with the key so consumers get +one fetch surface (same rule as IMAP username). **Key never in git/chat.** + +## Consumer design (T03) + +| Consumer | Use | Cadence | +| --- | --- | --- | +| Finance Steward rhythm session | balance snapshot + new-transaction triage → `finance/` metadata | weekly (harness-scheduled, after cutover) | +| `finance/CostRunRate.md` | resolve **TBC** rows: desk rent (HUB31 debit), Qonto plan fee; verify DATEV pass-through, railiance01 debit | first pull, then on statement events | +| OH-2026-003 package | real cost-vs-usage numbers; the working MCP is itself an argument FOR keeping Qonto | once, next office hour | +| Runway view (CostRunRate finding 2) | month-end balance series → liquidity awareness | monthly | + +Rules: + +- Transaction **metadata** (dates, counterparties, amounts) may land in + `finance/` evidence tables; no bulk statement exports into git. +- Read-only tool allow-list per above; sessions run Green/Blue. +- **DUO boundary:** main accounting stays DATEV Unternehmen Online via the + StB lane. Qonto MCP complements it (operational awareness, run-rate, + runway); it does not replace Belegablage or bookkeeping. + +## Execution checklist + +1. [x] Variant + read-only enforcement decided (this doc) +2. [x] OpenBao lane designed (`tenants/binky/qonto/api`) +3. [x] DecisionQueue package prepared (DEC-2026-004) +4. [ ] **Red lane — founder:** approve DEC-2026-004; create API key; `bao kv put` via `@file` +5. [ ] Warden catalog `binky-qonto-api` draft → active after provision +6. [ ] First read-only pull; update CostRunRate TBC rows (BINKY-WP-0005-T05) +7. [ ] Wire Finance Steward recurring session (post-cutover, harness lane) + +## See also + +- `integrations/company-email-openbao.md` — custody pattern being mirrored +- `AutopilotWorkQueue.md` AWQ-010 (origin), `OfficeHourQueue.md` OH-2026-003 +- Qonto docs: , + diff --git a/workplans/BINKY-WP-0005-qonto-mcp-integration.md b/workplans/BINKY-WP-0005-qonto-mcp-integration.md new file mode 100644 index 0000000..9c259a8 --- /dev/null +++ b/workplans/BINKY-WP-0005-qonto-mcp-integration.md @@ -0,0 +1,98 @@ +--- +id: BINKY-WP-0005 +type: workplan +title: "Qonto MCP integration: bank account as agent-readable finance source" +domain: infotech +repo: binky-control +status: active +owner: codex +topic_slug: the-custodian +created: "2026-07-19" +updated: "2026-07-19" +state_hub_workstream_id: "6139db83-5d4b-4492-a77f-fc9550a0a4f9" +--- + +Connect the company Qonto account to the agent infrastructure via the +**self-hosted** `qonto/qonto-mcp-server` (API key + organization ID), read +scopes first — **payments/transfers are Red lane forever**. Originates from +AWQ-010 (founder direction 2026-07-18: "integrations like this should help +with the automated company approach a lot" — arrange soon). Credential lane +via ops-warden/OpenBao (`tenants/binky/qonto`), same custody pattern as +company-email (`integrations/company-email-openbao.md`); **no claude.ai +native integrations** — harness/MCP lane only. Main accounting stays DATEV +Unternehmen Online (DUO): Qonto MCP complements, does not replace, the +DUO/StB lane. The working MCP is a substantive argument FOR keeping Qonto +despite plan cost (OH-2026-003). + +## Task: Qonto MCP capabilities and docs review + +Review the Qonto MCP options (hosted `mcp.qonto.com` OAuth connector vs. +self-hosted `qonto/qonto-mcp-server` with API key), tool surface (read vs. +write), authentication shape, transports, and plan/API prerequisites. +Recommend the variant compatible with the corporate access policy +(harness/MCP lane, no native claude.ai connectors). Output lands in +`integrations/qonto-mcp.md`. Green lane (docs only). + +```task +id: BINKY-WP-0005-T01 +status: done +priority: high +state_hub_task_id: "e066a222-1608-45ce-96a7-cbf191a39a9b" +``` + +## Task: Credential lane design — ops-warden/OpenBao custody + +Design the OpenBao lane `tenants/binky/qonto` (fields `QONTO_API_KEY`, +`QONTO_ORGANIZATION_ID`), warden catalog entry, and the founder Red-lane +provision procedure — mirroring the company-email-imap pattern. Metadata and +design only; no secret values, provisioning is founder Red lane. Green lane. + +```task +id: BINKY-WP-0005-T02 +status: done +priority: high +state_hub_task_id: "261e4b34-24a2-4324-950d-881d78333b5d" +``` + +## Task: Consumer design — rhythm sessions and CostRunRate feeds + +Specify how rhythm/finance sessions consume the MCP: real balance and +transaction pulls replace manual Qonto statement pulls; resolve the **TBC** +rows in `finance/CostRunRate.md` (desk rent, Qonto plan cost); feed the +OH-2026-003 cost-vs-usage answer. Read-only tool allow-list at harness +level; write tools (cards, invoicing) stay disabled. Green lane. + +```task +id: BINKY-WP-0005-T03 +status: done +priority: medium +state_hub_task_id: "6c4a475d-9db7-4488-8563-10c82fa78f51" +``` + +## Task: DecisionQueue entry for Red-lane provisioning + +Prepare the founder approval package: DEC entry covering API key creation in +the Qonto dashboard, OpenBao provision, and the read-only boundary. Note the +DUO complement (not replacement) and the OH-2026-003 tie-in (check API/plan +prerequisites while in the dashboard). Green lane. + +```task +id: BINKY-WP-0005-T04 +status: done +priority: medium +state_hub_task_id: "51364e7c-e842-4bcb-a0bb-6f4ceebe264b" +``` + +## Task: First read-only pull and CostRunRate update + +After founder provisioning: promote the warden catalog to active, run the +first read-only balance/transaction pull through the harness lane, update +`finance/CostRunRate.md` TBC rows (desk rent, Qonto plan) with verified +figures, and log evidence metadata. Blue lane. + +```task +id: BINKY-WP-0005-T05 +status: wait +priority: medium +state_hub_task_id: "e4b2119b-6f89-44d8-879d-73bf225307f7" +```