bankstatementparser-mcp
bankstatementparser-mcp is a read-only MCP server that lets AI agents detect, parse, validate, and summarize bank statements (CAMT.053, pain.001, MT940, OFX, QFX, CSV) from inline content.
list_supported_formats— list the six validformatidentifiers (camt,pain001,csv,ofx,qfx,mt940).detect_format— identify a payload's format from its content plus a filename-extension hint.parse_statement— parse a statement into row dicts,columns, fulltransaction_count, and asummary, with an optionallimitto cap returned rows.validate_statement— dry-run parse returning structuredis_valid/format/transaction_count/error; never raises and returns no rows.summarize_statement— return only balances/totals (opening/closing balances, currency) with Decimals stringified.Beyond tools — also ships the
bankstatementparser://formatsresource and theanalyze_statementguided prompt, plus LangChain/CrewAI/LlamaIndex adapters.Safety profile — every tool is read-only, idempotent, closed-world, takes inline text (not paths), writes only a transient temp file, and never touches the network.
Deployment — stdio by default, or streamable HTTP (
/mcp) and HTTP+SSE (/sse), loopback-bound with no built-in auth.
Allows parsing of SWIFT MT940 bank statements to extract transactions and balances.
Click on "Deploy 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-mcp Read 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
Install: PyPI, source, Docker (GHCR), the MCP Registry
Requirements: toolchain floor, platforms
Quick Start: register the server with an MCP client
The bankstatementparser-mcp ecosystem
The bankstatementparser-mcp ecosystem: the core library, the LSP, the ISO 20022 MCP servers
Library reference
Capabilities at a glance: the current surface by theme
Ecosystem comparison: short matrix; full table at
docs/COMPARISON.mdBenchmarks: headline numbers; full table at
docs/BENCHMARKS.mdFeatures: module-level capability list
Configuration: core options
Examples: runnable example index
Operational
When not to use bankstatementparser-mcp: limitations
Development: make targets, fuzzing, CI
Security: guarantees and compliance
Documentation: all reference docs
Stability guarantees: SemVer axis, output stability, minimum toolchain discipline
Related MCP server: MCP Toolkit Server
Install
As a Python library
pip install bankstatementparser-mcpThat installs the bankstatementparser-mcp command, bankstatementparser >= 0.0.35 and the MCP SDK.
Channel | Command | Notes |
PyPI |
| Add |
Source |
| For development |
Docker (GHCR) |
| Multi-arch (linux/amd64, linux/arm64); runs |
An isolated virtual environment keeps the server's dependencies apart:
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
python -m pip install -U bankstatementparser-mcpMCP Registry
The server is listed in the MCP Registry under this name, which the registry checks against this README:
mcp-name: io.github.sebastienrousseau/bankstatementparser-mcp
Shell completions
Bash and zsh completions for the command line live in completions/, generated from the server's own argument parser (make completions).
Packaging status
Repology lists every repository that packages bankstatementparser-mcp. PyPI and GHCR are the channels this project publishes to itself.
Requirements
Python 3.10 or later. CI tests CPython 3.10, 3.11, 3.12, 3.13 and 3.14 on Linux, macOS and Windows;
docs/POLICIES.mdsays when the floor moves.bankstatementparser0.0.35 or later, the parser core every tool delegates to.The MCP SDK,
mcp >= 1.30on the 1.x line or>= 2.2on 2.x (2.0 and 2.1 are excluded for GHSA-84m7-p3x7-pcfv).An MCP client (Claude Desktop, Claude Code, an IDE, or an agent framework) to launch it. The Docker image needs only a container runtime.
Quick Start
{
"mcpServers": {
"bankstatementparser": { "command": "bankstatementparser-mcp" }
}
}Add this to your MCP client's configuration (Claude Desktop shown) and restart the client: the five tools, the resource and the prompt are then available to the agent. By default the server speaks JSON-RPC over stdin/stdout, so it is meant to be launched by an MCP client, not used interactively. For a shared deployment over HTTP, see Configuration.
The bankstatementparser-mcp ecosystem
bankstatementparser-mcp is the agent-facing layer of the bankstatementparser suite, whose packages ship one version together, and the multi-format ingestion server of the ISO 20022 MCP servers. Dependency ranges are kept aligned, so the servers co-install in one Python environment. The full tables are in The suite.
Component | Purpose | Use case |
The parser core: CAMT, pain.001, CSV, OFX, QFX, MT940 and PDF statements | Parsing statements from Python or the CLI | |
| This server: five MCP tools, one resource, one prompt | An agent reading statements in mixed or legacy formats |
Language server with live MT940 diagnostics | Editing MT940 files | |
Loaders, writers and transport | BAI2, MT942, CFONB, CAMT.054, SEPA and BACS loaders; XLSX, QIF, OFX and SWIFT writers; EBICS transport | Formats beyond the core, and retrieval over EBICS |
ISO 20022 | Deep camt.05x work | |
Matches | Statement and payment reconciliation |
Capabilities at a glance
Area | Capability | Status |
Tools |
| Shipped |
Resource |
| Shipped |
Prompt |
| Shipped |
Formats |
| Shipped |
Transports | stdio; streamable HTTP (2026-07-28 and 2025-11-25); HTTP+SSE (2024-11-05) | Shipped |
Adapters | LangChain, CrewAI, LlamaIndex tool objects | Shipped |
Distribution | PyPI wheel and sdist, multi-arch GHCR image, MCP Registry entry | Shipped |
Ecosystem comparison
The choice is between this server, the library it wraps, and a deeper single-format server. Every cell comes from the projects' own READMEs.
Project | Input formats | Interface | Input model |
bankstatementparser-mcp | CAMT.053, pain.001, MT940, OFX, QFX, CSV | MCP (stdio, streamable HTTP, SSE) | Inline content and a filename hint |
| The same, plus PDF | Python library and CLI | Paths on disk |
|
| MCP (stdio, authenticated streamable HTTP) | Tool arguments |
See docs/COMPARISON.md for the evidence and complete matrix.
Benchmarks
benches/bench_detect_and_parse.py times detect_format and parse_statement on generated statements. Detection costs 5 to 11 ms per call whatever the size, because it peeks at the head of the document; parsing grows with the document.
Scenario | Result | Environment |
| 6.6 ms | Apple M1 Pro, macOS 27.2.1, CPython 3.12.16 |
| 132.8 ms | Apple M1 Pro, macOS 27.2.1, CPython 3.12.16 |
| 40.7 ms | Apple M1 Pro, macOS 27.2.1, CPython 3.12.16 |
| 9.4 ms | Apple M1 Pro, macOS 27.2.1, CPython 3.12.16 |
See docs/BENCHMARKS.md for methodology and full results.
Features
bankstatementparser_mcp.server: the MCP server. Five tools (list_supported_formats,detect_format,parse_statement,validate_statement,summarize_statement), one resource and one prompt. Every tool is a thin wrapper over thebankstatementparserparser core (create_parser,detect_statement_format), so results behave identically to the library.Inline content. An MCP client does not share the server's filesystem, so the tools take the statement text plus a filename hint and write it to a private temporary file for the duration of one call.
Errors as data.
detect_format,parse_statementandsummarize_statementrefuse an unparseable payload with aToolErrornaming the filename and the parser's reason;validate_statementreturns{"is_valid": false, "error": ...}instead of raising.bankstatementparser_mcp.adapters: the same tools as LangChain, CrewAI and LlamaIndex tool objects, each framework imported only when its adapter is called.bankstatementparser_mcp._cliand_transports: the command line shared by the suite's servers, and the stdio, streamable HTTP and SSE launchers.bankstatementparser_mcp._mcp_compat: one codebase on MCP SDK 1.x (FastMCP) and 2.x (MCPServer).
The tools, resource and prompt are described in full in the manual.
Configuration
The server has no configuration file and reads no environment variables. Everything is a command-line flag:
Flag | Default | Effect |
|
|
|
|
| Interface the HTTP transports bind |
|
| Port the HTTP transports bind |
| Print the version and exit |
The HTTP transports carry no authentication of their own: bind loopback, or put the server behind a gateway you trust before binding a routable address. A client registers the HTTP endpoint with {"mcpServers": {"bankstatementparser": {"url": "http://127.0.0.1:8000/mcp"}}}. See Transports and ADR 0001.
Examples
The tools are plain functions on bankstatementparser_mcp.server, 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 promptexamples/ holds four runnable walkthroughs, each run in CI:
Example | Demonstrates |
| |
| |
Detecting and parsing an inline SWIFT MT940 statement | |
The |
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.
You need authentication on the HTTP transports. The server adds none; it belongs on loopback or behind a gateway you trust.
Your format is not one of the six. BAI2, MT942, CFONB, CAMT.054, SEPA and BACS are read by the suite's loader packages, not by this server.
Development
git clone https://github.com/sebastienrousseau/bankstatementparser-mcp.git
cd bankstatementparser-mcp
mise install
poetry install
make checkmake check runs the local gates: ruff and black, mypy --strict, the complexity baseline (scripts/check_complexity.py), pytest with a 100% line + branch coverage floor, interrogate at 100% docstring coverage, and the examples. Other targets: make fuzz (Atheris, 60 s, Linux x86_64 with Python 3.12+), make docs (the MkDocs manual, --strict), make completions, make demo (re-renders the GIF above with VHS from .github/demo.tape) and make security (Bandit). CI adds the OS by Python matrix, the Docker build, CodeQL, pip-audit on the locked requirements, the Docs Lint gates, and MCP protocol conformance. CONTRIBUTING.md covers branches, commit signing and sign-off.
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.Loopback by default. The HTTP transports bind
127.0.0.1unless--hostsays otherwise.Fuzzing.
fuzz/fuzz_tools.pydrives every payload-taking tool with Atheris in CI and fails on any exception other than theToolErrorthe tools promise.Supply chain. Dependencies are locked in
poetry.lock, CI installs hash-pinned exports of it, andpip-audit, Bandit and CodeQL run on every change. Releases publish to PyPI through OIDC trusted publishing and carry cosign signatures, SLSA provenance and SBOMs; every workflow action is pinned by commit SHA except the SLSA generator, which must be referenced by tag.
Report vulnerabilities according to SECURITY.md.
Documentation
User manual: sebastienrousseau.com/bankstatementparser-mcp, built from
docs/with MkDocsAPI reference: the manual's API page, generated from the docstrings
Developer docs:
CONTRIBUTING.md,ARCHITECTURE.md,RELEASING.md,AGENTS.mdThe suite:
docs/suite.md, with everybankstatementparserpackage and ISO 20022 MCP serverDecisions and history:
docs/adr/,ROADMAP.md,CHANGELOG.mdDirectory listing: Glama
MCP specification: modelcontextprotocol.io
Stability guarantees
Versioning. Releases stay on the
0.0.xline and step by exactly0.0.1, in lockstep with the rest of thebankstatementparsersuite. Under SemVer a0.0.xrelease may break anything; this project names each break in the CHANGELOG instead.The breaking axis is the MCP surface: tool, resource and prompt names, their arguments, and the shape of what they return. Renaming or removing any of them, or changing a returned field, is a breaking change and is called out in the CHANGELOG, even though no Python signature moves.
Output stability. Parsing is deterministic: the same statement and filename hint give the same result on the same
bankstatementparserversion. A change in what a tool returns for the same input is treated as breaking.Command line.
--transport,--host,--portand--versionkeep their names and defaults; the shell completions are regenerated from the parser so they cannot drift.Minimum toolchain. Python 3.10 is the floor; it moves only in a release, for the whole suite at once, with the reason in the CHANGELOG (
docs/POLICIES.md).
License
Dual-licensed under Apache License, Version 2.0 or MIT, at your option (SPDX-License-Identifier: Apache-2.0 OR MIT). Any contribution submitted for inclusion in the work shall be dual-licensed as above, without additional terms or conditions.
Available Tools
5 toolsdetect_formatDetect statement formatARead-onlyIdempotent
Detect which bank statement format an inline payload is.
Use this when you hold statement text but do not yet know its format,
to resolve the ``format`` identifier from the content plus filename
hint. Once the format is known, use ``parse_statement`` to read the
transactions.
Args:
content: The raw statement text.
filename: Original filename; its extension is the primary hint.
Returns:
The detected format identifier.
Raises:
ToolError: If the format cannot be detected.
Inputs: content (required), filename. Returns: result
list_supported_formatsList supported statement formatsARead-onlyIdempotent
List every bank statement format identifier this server can parse.
Use this first to discover the valid ``format`` strings accepted by
``detect_format``, ``parse_statement``, ``validate_statement``, and
``summarize_statement``. For the file extensions and a human-readable
description of each format, read the ``bankstatementparser://formats``
resource instead.
Returns:
The supported format identifiers.
Inputs: no named parameters. Returns: result
parse_statementParse statement transactions and summaryARead-onlyIdempotent
Parse an inline statement payload into transaction rows and a summary.
Use this to read the full transaction detail plus the statement
balances from a payload. When you only need the balances/totals use
``summarize_statement`` instead, and to merely confirm a payload parses
without returning any rows use ``validate_statement``.
Args:
content: The raw statement text.
filename: Original filename; its extension selects the format
when ``format`` is omitted.
format: Explicit format override.
limit: Optional cap on returned transaction rows.
Returns:
A dict with the resolved ``format``, ``columns``, full
``transaction_count``, the (possibly truncated) ``transactions``
as row dicts, and the statement ``summary``.
Raises:
ToolError: If the format is unsupported, cannot be detected, or
the payload does not parse.
Inputs: content (required), limit, format, filename. Returns: object
summarize_statementSummarize statement balancesARead-onlyIdempotent
Summarize an inline statement's balances and totals only.
Use this when you need just the opening/closing balances, currency, and
other summary fields without the per-transaction rows. For the full
transaction detail alongside the summary, use ``parse_statement``
instead.
Args:
content: The raw statement text.
filename: Original filename; its extension selects the format.
format: Explicit format override.
Returns:
The summary record with Decimal values stringified.
Raises:
ToolError: If the format is unsupported, cannot be detected, or
the payload does not parse.
Inputs: content (required), format, filename. Returns: object
validate_statementValidate statement (dry run)ARead-onlyIdempotent
Dry-run parse an inline statement to check it parses cleanly.
Use this to confirm a payload is well-formed and parseable before
committing to a full read; it returns a structured pass/fail with the
transaction count but never the rows themselves, and never raises on a
parse error. To actually read the transactions use ``parse_statement``.
Args:
content: The raw statement text.
filename: Original filename; its extension selects the format.
format: Explicit format override.
Returns:
A dict with ``is_valid``, the resolved ``format``, the
``transaction_count`` on success, and an ``error`` on failure.
Inputs: content (required), format, filename. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct role: discovery, format detection, full parse, summary-only, and validation dry-run. The descriptions explicitly cross-reference each other (e.g. use summarize_statement instead of parse_statement when you only need balances), leaving no realistic chance of misselection.
All five tools are snake_case verb_noun identifiers that map cleanly onto their action (list_, detect_, parse_, summarize_, validate_ + format/statement). The pattern is predictable and self-describing.
Five tools is a tight, well-scoped surface for a statement parser: discovery, detection, parse, summarize, validate. Each tool earns its place and none is redundant padding.
The read-side lifecycle is well covered (list formats, detect, validate, parse, summarize) with no dead ends. Minor gaps: only inline payloads are accepted (no file path or URL input), and there is no export/conversion operation, though these are reasonable omissions for a read-only parser.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.57-
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing tools for DB queries, API calls, file I/O, and text transformations, enabling AI agents like Claude to perform real-world actions.10MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT

Cerevox MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceModel Context Protocol server for Cerevox AI that exposes document parsing (Lexa), RAG and semantic search (Hippo), and account management APIs, enabling AI agents to parse documents, search and query document collections with RAG, and manage accounts.MIT