Skip to main content
Glama
bartosz-kuc

mbank-parser-mcp

mbank-parser-mcp

Local MCP server that parses mBank CSV operation exports — the exact file you can download from the mBank web app under "Historia" → "Eksportuj do CSV". Runs entirely offline. Nothing leaves your machine.

Part of the honest-mcp family of small, auditable, local-first MCP servers.

Why

Anyone using mBank in Poland — private, JDG, sp. z o.o. — does the same monthly ritual:

  1. Log into mBank, download the CSV.

  2. Open in Excel, squint at Polish-locale amounts (space-thousands, comma-decimals, PLN suffix).

  3. Filter by date, sum by category for VAT / income tax reconciliation.

This server automates step 2 and 3 through your AI. You keep your bank data on disk; the AI just calls a tool that reads and filters it locally.

Zero network calls. The requirements.txt is one line — the MCP SDK. No dependency footprint to audit.

Related MCP server: mcp-upbank

Features

Three tools:

  • read_statement_header — quick preview of a file: client name, date range, listed accounts, inflow/outflow totals, operation count. No operation rows loaded.

  • list_operations — parse + filter operations. Combine any of: date_from, date_to, category, account, contains (description substring), min_amount, max_amount, limit.

  • summarize_operations — aggregate by category, account, or month. Returns count, inflow, outflow, net per bucket plus grand totals.

Amounts come back as signed floats (negative = expense), currency separate. Polish-locale numbers (-3 283,33 PLN) and non-breaking-space thousand separators are handled.

Supported files

  • CSV export from mBank web banking ("Historia operacji" → "Eksportuj do CSV")

  • ❌ PDF statements — mBank's layout varies too much per statement type for reliable parsing. Skipped intentionally.

Requirements

  • Python 3.10+

Setup

git clone https://github.com/bartosz-kuc/mbank-parser-mcp.git
cd mbank-parser-mcp
python3 -m venv venv
./venv/bin/pip install -r requirements.txt

Register with Claude Code:

claude mcp add mbank /absolute/path/to/venv/bin/python /absolute/path/to/server.py

Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "mbank": {
      "command": "/absolute/path/to/venv/bin/python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

Example usage

"How much did I spend on 'Ubezpieczenia' in Q2?"

summarize_operations(file_path=".../lista_operacji.csv", group_by="category", date_from="2026-04-01", date_to="2026-06-30") → totals per category, including "Ubezpieczenia".

"List all incoming transfers over 10 000 PLN this year."

list_operations(file_path=".../lista_operacji.csv", min_amount=10000, date_from="2026-01-01")

"Show me every card purchase mentioning Anthropic."

list_operations(file_path=".../lista_operacji.csv", contains="ANTHROPIC")

Data flow

Your AI client
     ↕  MCP stdio
This server (Python, on your machine)
     ↕  local filesystem
Your mBank CSV

No HTTP, no external service — the server has no requests or httpx dependency at all.

Author

Bartosz Kuć — Warsaw-based developer, JDG owner running skanfirmy.pl.

Consulting

Available for consulting on Polish tax and business integrations (KSeF, GUS/NFZ/GIOŚ APIs, mBank data), MCP server design, and AI-assisted tooling for JDGs and small teams. See skanfirmy.pl/uslugi for productized packages (audit 3k PLN, setup 8-15k PLN, retainer 2-4k PLN/mo), or reach out via email.

License

MIT — see LICENSE.

Available Tools

3 tools
list_operationsA

Parse an mBank CSV operations export and return the operation rows (date, description, account, category, signed amount, currency). All filters are optional; combine them freely. Amounts are already parsed to floats (negative = expense). For big statements consider a limit to keep response size in check.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax operations to return (default: all)
accountNoSubstring match against account label (case-insensitive)
date_toNoYYYY-MM-DD, inclusive
categoryNoSubstring match against mBank's assigned category (case-insensitive)
containsNoSubstring match against operation description (case-insensitive)
date_fromNoYYYY-MM-DD, inclusive
file_pathYesAbsolute path to the mBank CSV file
max_amountNoMaximum amount (inclusive)
min_amountNoMinimum amount (inclusive). Signed — negative for expenses.
include_headerNoIf true, include the header block alongside operations

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It usefully states that amounts are parsed to floats, negative amounts represent expenses, and large result sets can be constrained with a limit. This goes beyond the schema by clarifying parsed data semantics and response-size behavior, though it does not mention ordering or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no filler. The purpose is front-loaded, the comma-separated output fields are compact, and the performance tip about limit earns its place. Every sentence adds useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters and no output schema, the description is reasonably complete: it lists the returned fields, explains filter behavior, and flags response-size concerns. It does not describe ordering, error behavior, or exact filter match semantics, but the schema covers formats and defaults, and the core invocation is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents every parameter. The description adds marginal context about signed amounts and filter combinability, but it mostly restates what the parameter descriptions already convey. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb-resource pair: 'Parse an mBank CSV operations export and return the operation rows'. It enumerates the exact fields returned (date, description, account, category, signed amount, currency), which distinguishes it from the sibling tools that read the header or summarize operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context: filters are optional and combinable, and a limit is recommended for large statements. However, it does not explicitly contrast this tool with read_statement_header or summarize_operations, so the when-to-use vs alternative guidance is only implied by the function name and return rows.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_statement_headerA

Read only the header block of an mBank CSV export — client name, date range, listed accounts, inflow/outflow totals — without loading the operation rows. Fast preview to confirm you have the right file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the mBank CSV file

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool is read-only (only reads the header block), avoids loading operation rows, and behaves as a lightweight preview. This is meaningful behavioral information beyond what the schema conveys, though edge cases like error handling or return format are not addressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly written sentence with no filler. The main purpose is front-loaded, the content scope is enumerated concisely, and the behavioral caveat ('without loading the operation rows') earns its place by clarifying what the tool does not do.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read tool with no output schema, the description is sufficiently complete: it names the file type, the fields contained in the header, and the typical usage intent. It stops short of describing the exact return format, but the listed fields give the agent a solid expectation of what will come back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single parameter file_path is already well documented as 'Absolute path to the mBank CSV file'. The tool description adds no extra detail about the parameter, so the schema carries the weight and the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Read'), a precise resource ('header block of an mBank CSV export'), and enumerates the exact content (client name, date range, listed accounts, inflow/outflow totals). It also distinguishes itself from operation-focused siblings by explicitly saying it does not load operation rows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Fast preview to confirm you have the right file' clearly establishes the intended use case: verifying file identity before deeper processing. It implies that when operation rows or summaries are needed, the sibling tools list_operations and summarize_operations would be appropriate, though it does not name them explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

summarize_operationsA

Aggregate operations by category, by account, or by month. Returns count, total inflow, total outflow, net per bucket, plus the grand totals over the filtered set. Ideal for building a monthly expense report or checking VAT-relevant categories.

ParametersJSON Schema
NameRequiredDescriptionDefault
accountNoSubstring match against account label (case-insensitive)
date_toNoYYYY-MM-DD, inclusive
categoryNoSubstring match against mBank's assigned category (case-insensitive)
containsNoSubstring match against operation description (case-insensitive)
group_byNocategory
date_fromNoYYYY-MM-DD, inclusive
file_pathYesAbsolute path to the mBank CSV file
max_amountNoMaximum amount (inclusive)
min_amountNoMinimum amount (inclusive). Signed — negative for expenses.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries full behavioral burden. It discloses the aggregate outputs (count, total inflow, total outflow, net per bucket, grand totals) and notes that filtering applies. It does not explicitly state that the file is not modified, but the read-only nature is strongly implied by 'aggregate.'

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences deliver the action, the grouping options, the output summary, and realistic use cases without filler. The key behavior is front-loaded and every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description compensates for the missing output schema by enumerating the returned aggregates and grand totals, and it covers the filtering/grouping behavior. It is complete enough for invocation, though it could more explicitly connect the file_path requirement or clarify absence of mutation given there are no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 89%, so the schema already explains the parameters. The description adds the grouping concept that maps to group_by and 'filtered set' for filters, but it does not add meaning beyond what the schema provides for the individual parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Aggregate operations' with explicit grouping dimensions (category, account, month). It also names the output shape, distinguishing this from sibling tools like list_operations and read_statement_header.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear use cases: 'building a monthly expense report' and 'checking VAT-relevant categories.' However, it does not explicitly say when not to use it or point to list_operations for raw detail, so it stops short of full exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedlist_operations
    • First observedread_statement_header
    • First observedsummarize_operations

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct stage of working with an mBank CSV: header preview, operation rows, and aggregations. There is no meaningful overlap between reading metadata, listing transactions, and summarizing them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: read_statement_header, list_operations, summarize_operations. The verbs clearly indicate the action and the nouns clearly indicate the target resource.

Tool Count5/5

Three tools is well-scoped for a focused CSV parser server. Each tool covers a necessary capability without redundancy or feature bloat.

Completeness5/5

For the stated purpose of parsing mBank CSV exports, the surface is complete: preview the header, retrieve operations with filtering, and summarize them. No obvious missing operation is implied by the domain.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Connects Notion databases with LLMs to manage and analyze personal finances through natural language queries and bank statement uploads.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables querying Up Bank account transactions and spending habits through natural language, using the Up Bank API in read-only mode.
    20
    8
    Do What The F*ck You Want To Public
  • A
    license
    B
    quality
    A
    maintenance
    Enables local-first personal finance management through deterministic tools for importing, categorizing, and analyzing bank transactions.
    36
    MIT

Latest Blog Posts

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/bartosz-kuc/mbank-parser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server