bankstatementparser-mcp
Parse, detect, validate, and summarize bank statements in multiple formats directly through an AI agent using the Model Context Protocol (MCP). All tools process statement content provided inline as a string, avoiding shared filesystem dependencies.
Tools:
list_supported_formats: Discover all supported format identifiers (e.g.,camt,pain001,csv,ofx,qfx,mt940).detect_format: Automatically identify the format of a statement payload using its content and an optional filename hint.parse_statement: Extract full transaction rows plus balances/totals. Supports optional format override and a row limit for large statements.validate_statement: Dry-run check whether a statement is well-formed and parseable — returns a structured pass/fail with transaction count or error details, without returning transaction rows.summarize_statement: Retrieve only the opening/closing balances, currency, and summary fields, without per-transaction rows.
Resource:
bankstatementparser://formats: Read-only catalogue of supported formats and their file extensions.
Prompt:
analyze_statement: Guided multi-step prompt that walks an AI agent through reading and reconciling a bank statement end-to-end.
Supported formats:
ISO 20022 CAMT.053 (
.xml)ISO 20022 pain.001 (
.xml)SWIFT MT940 (
.mt940,.sta)OFX (
.ofx), QFX (.qfx)CSV (
.csv)
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bankstatementparser-mcpRead and summarize this bank statement"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Contents
Getting started
What is bankstatementparser-mcp? — the problem it solves
Install — PyPI, virtualenv, Docker
Quick start — register with Claude Desktop in 30 seconds
Library reference
Tools — the five tools, one resource, one prompt
Using the tools — call them in-process from Python
Operational
When not to use bankstatementparser-mcp — honest boundaries
Development — gates, make targets
Security — sandboxing posture
Documentation — examples, guides
Contributing — how to get changes in
License — Apache-2.0
Related MCP server: Financial Data MCP Server
What is bankstatementparser-mcp?
The Model Context Protocol (MCP) is
an open standard that lets AI agents discover and call external tools in
a uniform way. bankstatementparser-mcp is the MCP server that turns the
bankstatementparser
library into first-class agent tools — so an assistant can read,
validate, and summarise bank statements in formats such as ISO 20022
CAMT.053, SWIFT MT940, OFX/QFX, and CSV directly from a conversation.
Every tool is a thin wrapper over the bankstatementparser parser core
(create_parser, detect_statement_format), so the results behave
identically to the CLI. Because an MCP client does not share the
server's filesystem, the tools take inline statement content (plus a
filename hint) and materialise it in a private temporary file for the
duration of a single call. Tools return JSON-serialisable data.
Concern | How bankstatementparser-mcp handles it |
Transport | stdio (FastMCP default); zero config beyond the client manifest |
Input model | Inline content + filename hint; no shared filesystem required |
Format fidelity | Tools delegate to |
Format detection |
|
Validation |
|
Isolation | Each call writes to a private temp file that is deleted on exit |
Install
Channel | Command | Notes |
PyPI |
| Pulls in |
Source |
| For development |
Docker (GHCR) |
| Multi-arch (linux/amd64, linux/arm64); runs |
Requires Python 3.10 or later. Works on macOS, Linux, and Windows.
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
python -m pip install -U bankstatementparser-mcpQuick start
Register the server with any MCP client (Claude Desktop shown):
{
"mcpServers": {
"bankstatementparser": { "command": "bankstatementparser-mcp" }
}
}That's it. Restart the client and the tools are available to the agent.
The server speaks JSON-RPC over stdin/stdout — it is meant to be launched by an MCP client, not used interactively.
Tools
All tools delegate to the bankstatementparser parser core, so they
behave identically to the library.
Tool | Purpose |
| List every bank statement format the parser can read |
| Detect which statement format an inline payload is |
| Parse a statement into structured transactions plus a summary |
| Dry-run check whether a statement parses cleanly |
| Return only the statement summary (no per-transaction rows) |
Plus one resource and one prompt:
Kind | Name | Purpose |
Resource |
| Read-only catalogue of supported formats and their file extensions |
Prompt |
| Guided multi-step prompt that walks an agent through reading and reconciling a statement |
Supported formats: camt (ISO 20022 CAMT.053, .xml), pain001
(ISO 20022 pain.001, .xml), csv (.csv), ofx (.ofx), qfx
(.qfx), and mt940 (SWIFT MT940, .mt940 / .sta).
Using the tools
The tools are plain functions on the bankstatementparser_mcp.server
module, so you can call them in-process:
from bankstatementparser_mcp.server import (
detect_format,
parse_statement,
summarize_statement,
)
csv = (
"date,description,amount,currency,balance\n"
"2023-01-02,Salary,500.00,EUR,1500.00\n"
"2023-01-03,Groceries,-40.50,EUR,1459.50\n"
)
# 1. Detect the format from the filename hint + content.
print(detect_format(csv, "statement.csv"))
# -> csv
# 2. Parse the statement into structured rows + a summary.
parsed = parse_statement(csv, "statement.csv")
print(parsed["transaction_count"], parsed["columns"])
# 3. Read just the opening/closing balances.
print(summarize_statement(csv, "statement.csv"))The resource and prompt are plain functions too: formats_resource
backs bankstatementparser://formats, and analyze_statement returns
the guided multi-step prompt.
from bankstatementparser_mcp.server import (
analyze_statement,
formats_resource,
)
print(formats_resource()) # the supported-formats catalogue
print(analyze_statement("statement.csv")) # the guided analysis promptSee the examples/ folder for runnable walkthroughs,
including 04_resource_and_prompt.py.
When not to use bankstatementparser-mcp
You're not driving an MCP-aware agent. Use the
bankstatementparserCLI or library directly — it exposes the same surface with less indirection.You need to parse files already on disk in bulk. The library's CLI reads paths directly and avoids the inline-content round-trip the MCP tools use.
Development
bankstatementparser-mcp uses Poetry and
mise.
git clone https://github.com/sebastienrousseau/bankstatementparser-mcp.git
cd bankstatementparser-mcp
mise install
poetry installA Makefile orchestrates the quality gates (kept in lockstep with CI):
Target | What it runs |
| All gates (REQUIRED before commit) |
|
|
|
|
|
|
|
|
Current state (v0.0.13): 100% line + branch coverage against a 100%
enforced floor, mypy --strict clean, interrogate 100%.
Security
No persistent filesystem writes from tools. Each call writes the inline content to a private temporary file that is deleted as soon as the call returns.
Validation failures from
validate_statementare returned as structured{"is_valid": false, "error": ...}payloads — never as stack traces.Dependencies are pinned via
poetry.lockand audited bypip-auditand Bandit in CI.
To report a vulnerability, please use GitHub private vulnerability reporting rather than a public issue.
Documentation
Runnable examples:
examples/Release history: CHANGELOG.md
MCP specification: modelcontextprotocol.io
Contributing
Contributions are welcome — see the
contributing instructions.
Thanks to all the
contributors
who have helped build bankstatementparser-mcp.
Related MCP Servers
Part of the ISO 20022 MCP Suite — open-source, Apache-2.0 licensed MCP servers for banking and financial-services AI agents:
Server | Purpose |
Generate & validate ISO 20022 pain.001 payment files (v03–v12, pain.008, SEPA) with rulebook checks | |
Generate, validate, parse & scheme-check ISO 20022 pacs.008 FI-to-FI credit transfers + Nov-2026 address linting | |
Parse & reconcile ISO 20022 camt.053 bank-to-customer statements — CBPR+/HVPS+ ready | |
Generate & validate ISO 20022 acmt account-management messages | |
Lossless YAML 1.2 parsing, formatting & validation (Rust, 100% spec compliance) |
MCP Registry
mcp-name: io.github.sebastienrousseau/bankstatementparser-mcp
License
Licensed under the Apache License, Version 2.0. Any contribution submitted for inclusion shall be licensed as above, without additional terms.
Maintenance
Latest Blog Posts
- 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/sebastienrousseau/bankstatementparser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server