Skip to content

feat: add MainBook Bank Statement Converter (remote) - #1500

Closed
va89st wants to merge 1 commit into
stacklok:mainfrom
va89st:add-mainbook
Closed

feat: add MainBook Bank Statement Converter (remote)#1500
va89st wants to merge 1 commit into
stacklok:mainfrom
va89st:add-mainbook

Conversation

@va89st

@va89st va89st commented Aug 26, 2026

Copy link
Copy Markdown

Closes #1499

Adds the MainBook Bank Statement Converter as a remote MCP server under registries/toolhive/servers/.

It converts PDF bank and credit-card statements into Excel, CSV or JSON and reconciles every transaction against the statement's own opening and closing balances, so rows that do not add up are reported rather than silently shipped. It reads the PDF it is given — it never connects to a bank account and never asks for banking credentials.

Endpoint https://mcp.mainbook.ai/mcp (streamable-http)
Tools convert_bank_statement, get_conversion, list_conversions, get_balance
Paid calls only convert_bank_statement — one page credit per statement page
Auth OAuth 2.1 + PKCE, browser sign-in to the user's own MainBook account
Source https://github.com/human-beyond/mainbook-mcp (MIT)
Tier Community

On the pinned oauth_config

Every remote entry currently in the catalogue leaves oauth_config out and lets discovery do the work. This one does not, and the reason is specific rather than stylistic: our authorization server implements client-ID metadata documents and pre-registered clients, but not RFC 7591 dynamic client registration. Falling through to DCR would fail, and the card would look correct while authorising nothing.

So the entry pins:

  • client_id: mainbook-toolhive — registered on our side for ToolHive specifically, with the loopback callback http://localhost:8765/callback. Loopback callbacks are accepted on any port per RFC 8252, so changing callback_port will not break it.
  • resource — our authorization server requires the RFC 8707 indicator and answers invalid_request without it.

Verified against production: an authorization request with this client_id reaches the consent screen, an unregistered client_id is rejected, and a redirect URI on a non-loopback host is rejected.

If you would rather entries did not pin a client_id, tell me and I will take it out — but the connection will not complete without it until we ship dynamic registration.

Validation

server.json and its _meta block validate clean against toolhive-core's own server.schema.json and publisher-provided.schema.json. Go and Task were not available on this machine, so task catalog:validate was not run locally — please let CI be the judge there.

Icon

icon.svg is a purpose-made simplification of our brand mark: solid fills instead of hairlines, three tones and no background plate, so it holds up at 16px and reads on both light and dark cards. Checked side by side with icons already in this catalogue at 16, 24, 40 and 64px.

Converts PDF bank and credit-card statements to Excel, CSV or JSON and
reconciles every transaction against the statement's own opening and closing
balances, so rows that do not add up are reported rather than silently shipped.
It reads the PDF it is given and never connects to a bank account.

Four tools over the hosted endpoint; only convert_bank_statement spends
anything (one page credit per statement page).

The entry pins an oauth_config rather than relying on discovery. Our
authorization server implements client-ID metadata documents and pre-registered
clients but not RFC 7591 dynamic registration, so a DCR fallback would fail; the
pinned client_id is registered on our side for ToolHive specifically, with the
loopback callback on port 8765, and carries the resource indicator (RFC 8707)
our authorization server requires. Discussed in the linked issue.

Validated against toolhive-core's own schemas (server.schema.json and
publisher-provided.schema.json) — both clean. Go and Task were not available
locally, so `task catalog:validate` was not run.

Refs: stacklok#1499
Signed-off-by: Vadim Starchenko <va89st@gmail.com>
@blkt

blkt commented Aug 27, 2026

Copy link
Copy Markdown

See #1499 (comment).

@blkt blkt closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MainBook Bank Statement Converter (remote MCP server)

2 participants