MCP server for finvariant: deterministic financial-statement integrity checks for AI agents.
Project description
finvariant-mcp
An MCP server that exposes finvariant, the deterministic financial-statement integrity checker for Python, as a tool for AI agents: hand it income statement, balance sheet and cash flow data and it verifies that the balance sheet balances, the cash flow ties to the balance sheet, subtotals foot, and the three statements articulate.
Agents asked to build, read or summarise financial statements tend to produce the numbers themselves: a balance sheet that does not balance, a cash flow that does not tie, a retained-earnings figure that does not roll forward. Generated financial statements fail silently. The check belongs in a deterministic, versioned, validated library that the agent calls; the agent chooses what to verify and explains the verdict.
Tools
| Tool | Purpose |
|---|---|
check_statements |
Verify statements against the accounting invariants; return a verdict, the failing checks with expected vs actual, counts, provenance and a plain-language summary. |
describe_schema |
The canonical field names by statement, the sign convention, and the invariants checked; call it first to format the input. |
Both tools are read-only and return finvariant's JSON-safe payload, so a client can present and auto-run them safely.
Installation
Run it with uv (no install needed):
uvx finvariant-mcp
or install from PyPI:
pip install finvariant-mcp
Configuration
Add it to your MCP client. For example:
{
"mcpServers": {
"finvariant": {
"command": "uvx",
"args": ["finvariant-mcp"]
}
}
}
If you installed with pip, use "command": "finvariant-mcp" with no args.
Example
An agent verifying a model it just built:
describe_schema()
-> the field names, sign convention and the four invariant groups
check_statements(
periods=["FY2024"],
balance_sheet={"FY2024": {
"total_assets": 540, "total_liabilities": 158, "total_equity": 380
}},
)
-> { "ok": false,
"verdict": "FAIL - statements do not tie out",
"findings": [ { "rule_id": "EQ.accounting_equation",
"expected": 538, "actual": 540, "difference": 2 } ],
"summary": "finvariant audit - ...\n Verdict: FAIL ..." }
Design
The server is a thin, stateless wrapper. All accounting logic lives in the finvariant library, which computes the invariants from their definitions and is validated against the published statements of several real companies. The server adds the tool schema, read-only annotations and an input-schema helper so an agent can format the input and act on the result.
Related
- finvariant: the library this server wraps.
License
MIT. Written and maintained by Atakan Arikan, MSc Student at Tsinghua University and Politecnico di Milano.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file finvariant_mcp-0.1.1.tar.gz.
File metadata
- Download URL: finvariant_mcp-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5e092e987ac3d8dac6a65b54ebbc21c015e8aa78e1337096446725a246e623b
|
|
| MD5 |
d774147010e03d42ac278f0cc8b5bfc0
|
|
| BLAKE2b-256 |
52ed149eab5ef1e12ff0848dfec69a70dc24435bfd17af853508af5dfa8c11d9
|
Provenance
The following attestation bundles were made for finvariant_mcp-0.1.1.tar.gz:
Publisher:
release.yml on arikanatakan/finvariant-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
finvariant_mcp-0.1.1.tar.gz -
Subject digest:
a5e092e987ac3d8dac6a65b54ebbc21c015e8aa78e1337096446725a246e623b - Sigstore transparency entry: 1823654157
- Sigstore integration time:
-
Permalink:
arikanatakan/finvariant-mcp@410c3c607649e0d8dbe9e2305062edcc499149e2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/arikanatakan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@410c3c607649e0d8dbe9e2305062edcc499149e2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file finvariant_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: finvariant_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badb9aea997e280fbb8be30c8d55790ad32aea104e3b322b623f44bc0564020a
|
|
| MD5 |
b5a2e9d4fcc04caf801ee2814a657e0a
|
|
| BLAKE2b-256 |
79eb70eabb51cdf169d731c81abce670486d0b275238115ceb1fe435c27762f1
|
Provenance
The following attestation bundles were made for finvariant_mcp-0.1.1-py3-none-any.whl:
Publisher:
release.yml on arikanatakan/finvariant-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
finvariant_mcp-0.1.1-py3-none-any.whl -
Subject digest:
badb9aea997e280fbb8be30c8d55790ad32aea104e3b322b623f44bc0564020a - Sigstore transparency entry: 1823654239
- Sigstore integration time:
-
Permalink:
arikanatakan/finvariant-mcp@410c3c607649e0d8dbe9e2305062edcc499149e2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/arikanatakan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@410c3c607649e0d8dbe9e2305062edcc499149e2 -
Trigger Event:
push
-
Statement type: