kontist-mcp
kontist-mcp
An OAuth2 client and a typed GraphQL layer over Kontist business banking, exposed over the Model Context Protocol so balances, transactions and tax reserves can be read and annotated from a tool client instead of the web app.
Why it exists
Kontist is a German business account aimed at freelancers, and it keeps two things most banks do not expose usefully: automatic VAT and income-tax reserve sub-accounts, and a per-transaction annotation field used for bookkeeping. Both matter at Steuererklärung time and both are tedious to work with by hand.
The interesting part is the auth chain rather than the queries. Kontist gates its long-lived refresh token behind an interactive consent plus an MFA push confirmed on the phone, so the token has to be captured once through a local callback server and then treated as the only credential worth persisting. Everything after that is token exchange, caching and expiry handling.
Tools
Tool | Does |
| Account identity and IBAN, the auth smoke test |
| Current balance |
| Recent transactions, filtered by date, amount or category |
| One transaction in full |
| VAT and income-tax reserve sub-account balances |
| Write the bookkeeping note back onto a transaction |
| Inflows, outflows, top counterparties and category totals over a range |
Every tool input is validated with a zod schema before a query goes out, so a malformed date range
fails locally rather than as a GraphQL error.
How it works
tool client
| MCP over stdio
kontist-mcp (Node + TypeScript)
| GraphQL over fetch, OAuth2 bearer, token refreshed and cached
api.kontist.com/api/graphqlAuth is OAuth2 with a one-time interactive consent that yields a long-lived refresh token. Only
that refresh token goes in .env. Access tokens are fetched on demand, cached in
.tokens-cache.json and refreshed when they expire, so the interactive flow runs exactly once.
Run it
npm install
cp .env.example .env # client id, client secret
npm run setup # one-time OAuth consent, writes the refresh token
npm run test:auth # confirms the token works
npm run buildThen register it with your MCP client, pointing at dist/index.js. Full walkthrough including the
Kontist developer-app registration is in SETUP.md.
Stack
Node 18+, TypeScript, @modelcontextprotocol/sdk, graphql-request, the official kontist SDK
for the OAuth dance, zod for tool input validation. No ORM and no framework.
The one-time consent step needs the Kontist mobile app installed and logged in, because the refresh token is only issued after an MFA push is confirmed on the phone.
Limitations
Read-mostly by design. The only write is the annotation field. Transfers are deliberately not exposed, even though the API supports them and the
transfersscope exists, because an agent that can move money is a bad idea.Not yet exercised against a live account. The OAuth2 flow, the GraphQL client and all seven tools are written and typecheck, but the account itself opens once the Gewerbeanmeldung clears. Expect the first real run to turn up schema drift in the transaction fields.
No test suite. Two smoke scripts,
test:authandtest:balance, and nothing else.Single account. No multi-account handling, no pagination beyond what Kontist returns by default.
License
Apache 2.0. See LICENSE and NOTICE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fabi-SPL/kontist-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server