Repository navigation
v0.4.0
The project is now published as comdirect-mcp (previously comdirect-api-wrapper) and
focuses on the MCP server, while keeping the typed Python client.
Changed (breaking)
- Renamed the PyPI distribution to
comdirect-mcpand the import package tocomdirect_mcp. - The generated OpenAPI client is vendored as
comdirect_mcp._openapiinstead of a top-level
openapi_clientpackage, so it cannot clash with other generated clients. - MCP server rebuilt on the MCP Python SDK v2 (
MCPServer), implementing the MCP specification
2026-07-28; older clients are supported through version negotiation. - Login is an explicit
logintool. The push TAN is confirmed through an MCP elicitation dialog
(multi round-trip request) instead of a fixed 10 s wait. Other tools no longer log in implicitly. mcpis a regular dependency,pillowmoved to thephototanextra.- Missing values are
Noneinstead of1970-01-01or0(Transaction.booking_date,
depot and position values,Transaction.type,Depot.display_id). - The repository root
mcp_server.pyis gone; start the server withcomdirect-mcpor
python -m comdirect_mcp.
Added
- Credentials in the OS keychain:
comdirect-mcp configurestores them (macOS Keychain, Windows Credential
Manager, Secret Service); lookup order environment → keychain →.env. MCP client configs need no secrets. comdirect-mcpcommand line:serve(default),configure [--delete],--version.- Automatic access token refresh (
ComdirectClient.refresh_token(), refresh before expiry). - Two-step login API:
ComdirectClient.start_login()/complete_login(). - MCP tool annotations (
readOnlyHintetc.), structured output with output schemas, and proper
isErrorresults. download_documentreturns an embedded resource; size limit viaCOMDIRECT_MCP_MAX_DOCUMENT_BYTES.- Counterparty IBANs are masked by default (
COMDIRECT_MCP_UNMASK_IBANS). DepotPosition.isin; instrument names are now actually returned (with-attr=instrument).Document.already_read/already_readinlist_documents.logout(and server shutdown) revokes the session at comdirect (DELETE /oauth/revoke): the refresh token is
rejected right away, so the session cannot be extended; the last access token stays valid until it expires
(at most 10 minutes; measured live, the API documentation claims immediate invalidation).- The MCP server refuses new logins after three unconfirmed TAN challenges; comdirect locks the online access
after five. - Logins request photoTAN Push explicitly (
ComdirectClient.start_login(tan_type=...)). server.jsonfor the official MCP Registry and automated registry publishing on release.py.typedmarker,python -m comdirect_mcp,scripts/live_check.py.- Documentation in
docs/following Diátaxis (tutorial, how-to guides, reference, explanation), including how
to get comdirect API access and how to use a local model. AGENTS.md,SECURITY.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md, issue forms and a pull request template.
Fixed
Compared against comdirect's PDF documentation (REST API – Schnittstellenspezifikation, April 2020):
-
A non-existent valuta date such as
2019-02-30(documented by comdirect) made the whole transaction list fail;
Transaction.valuta_dateis now the raw string. -
download_documentwas annotated read-only although comdirect marks the document as read. -
Push TAN confirmation no longer sends a
x-once-authenticationheader (the CLI callback sent a dummy TAN). -
Request ids are 9-digit
HHmmssSSSnumbers and client session ids are hex, as specified. -
Depot balance mapping: the API nests the depot id (
aggregated.depot.depotId); found in a live test. -
Depot positions had no instrument names because instrument data was never requested.
-
truncatedwas reported for transaction lists with exactlylimititems. -
Lists no longer crash when the API omits
values.
Tooling
- uv_build backend, dependency groups, ruff (replaces flake8 and black), mypy in CI.
- CI on Python 3.12-3.14, actions pinned to commit SHAs, Dependabot, release tag/version check,
gitleaks-actionv3 (v2 stopped working when GitHub removed Node 20).
Install: uvx comdirect-mcp@0.4.0 · Getting started · Full changelog