Skip to main content
Glama
MihasikPro

pbu-fsbu-mcp

by MihasikPro

pbu-fsbu-mcp

ci

MCP server with the texts of Russian accounting standards — all 29 PBU and FSBU from the Ministry of Finance registry, accurate down to the clause, date-aware, and mapped onto the objects of the "1C:Enterprise Accounting 3.0" configuration.

It answers questions like "what does FSBU 6/2020 require regarding residual value" and the reverse — "which regulation underlies the ПараметрыАмортизацииОС register".

Quick start

git clone https://github.com/MihasikPro/pbu-fsbu-mcp.git
cd pbu-fsbu-mcp
docker compose -f deploy/compose.local.yml up --build
curl http://127.0.0.1:18010/healthz

Expected response: {"status":"ok"}. The MCP endpoint is http://127.0.0.1:18010/mcp.

The corpus is not stored in git: it is built from YAML sources at the docker build stage and validated there by the validator, so an invalid corpus fails the build instead of making it into runtime. Nothing needs to be installed before the first run — neither Python nor Tesseract.

Related MCP server: onec-meta-mcp

Tools

Tool

Answers the question

list_standards

Which standards exist, which are in effect on a given date

get_standard

Metadata and table of contents of a single standard

get_clause

Exact text of a clause with order requisites and revision number

search_clauses

Which clause answers a question asked in plain words

get_1c_mapping

Which BP 3.0 objects implement a clause

find_by_1c_object

Which regulation underlies a configuration object

get_its_references

Which ITS articles discuss this clause

The pbu-fsbu://registry resource is a compact table of all standards that the client can load once at the start of a session instead of repeatedly calling list_standards.

What's inside

29 standards, 1768 clauses. The entire Ministry of Finance registry: current and repealed PBU and FSBU, one revision each.

The answer is always given as of a date. Every tool accepts on_date and returns the standard's status as of that date. This is not decoration: PBU 9/99 and 10/99 lose force on 01.01.2027, FSBU 9/2025 and 10/2026 take effect at the same time, and an answer without a date would be wrong on that horizon.

The 1C mapping is human-verified. FSBU 6/2020 is linked to BP 3.0 objects: 18 links across 17 clauses, each with a confidence rating and an explanation of exactly how the object implements the regulation. All records have verified: true — they were checked by a human, not just by code. The other 28 standards have no mapping yet, and the tools respond with an explicit message rather than an empty list.

The mapping is an interpretation, not a regulation. It always lives in a separate field from the clause text and comes with a disclaimer. Unverified records additionally raise a separate warning, and it does not disappear while any such record is included in a response.

The server does not access the network. Neither at startup nor while processing a request. The database is opened strictly read-only, and the image is immutable.

What it does not do

  • It does not advise or interpret regulations beyond the exact text of the standard.

  • It does not store the full texts of ITS articles — only identifiers, titles, and brief summaries in its own words. Full text is read under a subscription.

  • It does not replace a lawyer and does not make accounting decisions.

Connecting clients

The client connects to an already running server — local or on an internal server.

Codex CLI

~/.codex/config.toml:

[mcp_servers.pbu_fsbu]
url = "http://127.0.0.1:18010/mcp"

Claude Code

claude mcp add --transport http pbu-fsbu http://127.0.0.1:18010/mcp

Claude Desktop

Claude Desktop cannot connect to an HTTP endpoint: the application rejects the http:// scheme, and a custom connector connection is established from the Anthropic cloud, which cannot reach either localhost or an address on the local network. Codex CLI and Claude Code are local processes and do not have this problem.

For Claude Desktop, the server is run locally over stdio, from a checkout with an already built corpus — %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "pbu-fsbu": {
      "command": "uv",
      "args": ["--directory", "C:\\path\\to\\pbu-fsbu-mcp", "run", "pbu-fsbu-mcp"]
    }
  }
}

Installing directly from a git address (uvx --from git+...) does not work for this: data/build/ does not end up in the repository, the corpus will not build, and the server will refuse to start. A local checkout is required — see "Development".

Deploying on a server

deploy/compose.server.yml is designed for an internal server accessible only from the local network:

git clone https://github.com/MihasikPro/pbu-fsbu-mcp.git
cd pbu-fsbu-mcp/deploy
docker compose -f compose.server.yml up -d --build

Before the first run, replace the port publication address in the file with your server's address. The port is published to a specific LAN address, not to 0.0.0.0: if the host gains a second interface — VPN or public IP — binding to 0.0.0.0 would silently expose the service there, and this record cannot do that.

TLS and authentication are intentionally absent: the corpus is public regulatory texts with no secrets, and the network is closed. The service should not be exposed externally without TLS and authorization.

corpus_meta.built_at is fixed at the moment of docker build, not when the container starts. The corpus staleness warning counts 90 days from the image build date; restart and up without --build do not update the corpus — a rebuild is required.

Sources

The primary source of the text is the standard's own page on the Ministry of Finance website (https://minfin.gov.ru/ru/document?id_4=NNNN, the link is in the registry): there the text is served as plain server-side HTML, without scans and without OCR, and is available even for standards older than the publication.pravo.gov.ru archive — that one starts around November 2011 and therefore does not contain 19 of the 29 standards at all.

The exception is FSBU 27/2021: its page on the Ministry of Finance website contains no text, only an <iframe> with a PDF viewer. For this single standard, the text was obtained by recognizing the official scan of the order (Tesseract 5.x, rus model from tessdata_best) followed by line-by-line proofreading. OCR is a documented fallback path, not the primary method.

The text is verified against the official act before the file is moved from data/drafts/ to data/sources/standards/. The test test_html_sourced_standard_reproduces_byte_for_byte regenerates the corpus from committed HTML snapshots and requires a byte-for-byte match, so the corpus is reproducible by construction, not on trust.

What is not included in the corpus

Appendices to the standard itself — sample reporting forms and detailed numerical examples formatted as a separate appendix with its own numbering — are not included in the corpus. Formally they are part of the act, but their numbering ("1.", "2." …) starts over and conflicts with the standard's clauses.

The difference from working examples inside clauses is only in the source markup: a real appendix has its own heading "Appendix to the Accounting Regulation «…»". Numerical examples in clauses 14–15 of PBU 18/02 have no such heading; they are part of the clause text and are present in the corpus in full.

Standard

Cut off

PBU 8/2010

12,010 chars

PBU 24/2011

4,062 chars

PBU 16/02

3,814 chars

PBU 19/02

3,208 chars

PBU 7/98

2,768 chars

PBU 18/02

2,372 chars

PBU 3/2006

1,508 chars

License

Regulatory legal acts are not subject to copyright (Art. 1259 of the Civil Code of the Russian Federation). The code is MIT; the terms for the data are in data/LICENSE.

Updating the corpus

When a new Ministry of Finance order is issued:

  1. uv run --group etl python -m etl.watch --live — compares the registry on the Ministry of Finance website with the corpus and shows the differences.

  2. uv run --group etl python -m etl.draft_yaml --live — pulls the clause texts and puts a draft into data/drafts/.

  3. Proofread the text against the official order, move it to data/sources/standards/, remove the # ЧЕРНОВИК banner.

  4. uv run python -m etl.build_db && uv run python -m etl.validate

  5. uv run --group etl pytest

Once a week, the etl-watch workflow performs the same comparison and, on a difference, opens a pull request with a report. There is no automatic merge: a new order is read by a human.

The rules for adding 1C links and ITS references are in CONTRIBUTING.md.

Development

uv sync --all-groups
uv run python -m etl.build_db
uv run python -m etl.validate
uv run --group etl pytest

The source of truth is the YAML in data/sources/. The file data/build/pbu_fsbu.db is built from them and is not committed to the repository.

The server can also be run without a container:

uv run pbu-fsbu-mcp                                    # stdio
uv run pbu-fsbu-mcp --transport http --port 18010      # HTTP

OCR tests and Tesseract

The recognition tests (tests/test_ocr_text.py) require a locally installed Tesseract 5.x with the rus model. Without it they are skipped — the rest of the suite does not depend on it. To actually run them:

  • TESSERACT_CMD — path to tesseract, if the binary is not in PATH;

  • TESSDATA_PREFIX — directory with *.traineddata models, if it is non-standard.

$env:TESSERACT_CMD = "C:\Program Files\Tesseract-OCR\tesseract.exe"
$env:TESSDATA_PREFIX = "C:\Users\<user>\.tessdata"
uv run --group etl pytest

In CI, Tesseract and the rus model are installed via apt-get — see .github/workflows/ci.yml.

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    MCP server for 1C:Enterprise ERP with 35 tools: metadata inspection, document CRUD, register queries, and BSP integration. First MCP server for Russian ERP systems (300,000+ organizations). JSON-RPC 2.0 compliant BSL implementation.
    51
    30
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for searching and analyzing 1C enterprise metadata and BSL code using a SQLite backend. Enables querying configuration structure, code routines, and performing compliance checks via natural language.
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for RAG-based search over 1C Enterprise configuration documentation, enabling natural language queries to find objects like справочники, документы, and отчеты.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP сервер с встроенным AI агентом для поиска по графу метаданных и кода конфигураций 1С
    88
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.

  • Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.

  • AI-native ERP MCP: ES/EU fiscal compliance (VeriFactu/TicketBAI/Facturae), invoicing, tax, banking

View all MCP Connectors

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/MihasikPro/pbu-fsbu-mcp'

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