AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

1c Fresh Mcp

mcp-xrat-dev-1c-fresh-mcp · by XRAT-dev

MCP server for 1C:Fresh (Russian cloud accounting) — OData REST API wrapper with VAT 22% handling, INN lookup, and PDF invoice generator.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add mcp-xrat-dev-1c-fresh-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-xrat-dev-1c-fresh-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of 1c Fresh Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

1c-fresh-mcp

MCP server for 1C:Fresh (Russian cloud accounting). Lets AI agents (Claude, Cursor, or any MCP client) talk to cloud 1C via its standard OData REST API. Works around the known OData 1C:Fresh limitations (INN filter, $expand=Товары, tabular sections), accounts for the 22 % VAT (in force since 2025), and keeps document times in the server's timezone.

Ships with an optional PDF renderer for the «Счёт на оплату» (invoice for payment) printable form.

🇷🇺 Русская версия → [README.ru.md](README.ru.md)


Features

  • Catalogs: counterparties, products/services, organizations, bank payments.
  • Documents: outgoing invoices (СчетНаОплатуПокупателю), sales (РеализацияТоваровУслуг) — create, read (incl. tabular section), post, unpost, mark for deletion.
  • Address handling: counterparty address uses the correct Вид_Key = ЮрАдресКонтрагента so it lands in the printable form (1C:Fresh silently drops it otherwise).
  • One-shot invoice POST: the tabular section Товары goes inside the document body (1C:Fresh returns 400 on POST and 405 on PATCH to _Товары).
  • INN lookup: get_counterparty_by_inn works around the HTTP 500 that 1C:Fresh returns on $filter=ИНН eq '…' by fetching the list and filtering client-side.
  • PDF invoice: standalone generator with two flavors — email (with optional brand banner) and print (no banner). Long tables auto-paginate with a repeating header row.

Available MCP tools

| Group | Tools | |---|---| | Health | check_connection, now_nsk | | Lookups | list_organizations, list_products, search_counterparties, get_counterparty_by_inn | | Create | create_counterparty, create_counterparty_full, make_invoice_item, create_invoice | | Read | get_invoice, get_sale, list_invoices, list_sales, list_payments | | Control | post_document, unpost_document, mark_for_deletion | | Low-level | odata_get, odata_post, odata_patch |

Every tool carries its own docstring — see @mcp.tool() decorators in server.py.

Installation

git clone https://github.com/XRAT-dev/1c-fresh-mcp.git
cd 1c-fresh-mcp

# 1. Fill in .env
cp .env.example .env
$EDITOR .env           # set FRESH_BASE_URL, FRESH_PASSWORD, etc.

# 2. Install deps and verify connectivity
bash install.sh

Requirements

  • Python ≥ 3.10 (uses PEP 604 X | None syntax)
  • 1C:Fresh must have the OData interface enabled and a user with the "OData access" role (usually odata.user).

Environment variables

| Variable | Required | Purpose | |---|---|---| | FRESH_BASE_URL | ✅ | https://.1cfresh.com/a/ea/ (no trailing slash) | | FRESH_USERNAME | | Defaults to odata.user | | FRESH_PASSWORD | ✅ | OData user password | | FRESH_VERIFY_SSL | | True (default) | | FRESH_TIMEOUT | | Seconds, default 30 | | FRESH_TZ_OFFSET | | Hours from UTC (MSK = 3, Novosibirsk = 7) | | PDF_BANK_NAME | | Bank name for the PDF header | | PDF_BANK_BIK | | BIK code | | PDF_BANK_CORR_ACC | | Correspondent account | | PDF_BANK_SETTLEMENT_ACC | | Settlement account | | PDF_SIGNER_TITLE | | "Director" / "Entrepreneur" / etc. | | PDF_SIGNER_NAME | | Name printed on the signature line | | PDF_BANNER_PATH | | Path to a PNG banner (optional) |

Connect to an MCP client

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "1c-fresh": {
      "command": "python3",
      "args": ["/ABSOLUTE/PATH/TO/1c-fresh-mcp/server.py"],
      "env": {"PYTHONIOENCODING": "utf-8"}
    }
  }
}

Claude Code — same block under mcpServers in ~/.claude/settings.json.

See mcp-config.example.json for a copy-pasteable example.

Using the Python connector directly

from connector import Fresh1C
import config

config.assert_configured()
api = Fresh1C(config.BASE_URL, config.USERNAME, config.PASSWORD)

cp = api.get_counterparty_by_inn("1234567890")

item = Fresh1C.make_item(
    nom_guid="",
    qty=1, price=3903.70,
    description="Circuit breaker 63A 3P ABB",
)
inv = api.create_invoice(
    counterparty_guid=cp["Ref_Key"],
    items=[item],
    org_guid="",
)
api.post_document("СчетНаОплатуПокупателю", inv["Ref_Key"])

PDF invoice

Once PDF_BANK_* and PDF_SIGNER_* are set in .env:

python3 pdf_invoice.py 
# → Счёт_.pdf          (email variant)
#   Счёт__print.pdf    (print variant, no banner)

Known 1C:Fresh OData quirks handled here

| Limitation | Workaround | |---|---| | $filter on ИНН returns HTTP 500 | get_counterparty_by_inn filters client-side | | $expand=Товары returns HTTP 501 | get_invoice returns the full document; Товары is already inside | | POST to .../_Товары → 400 | create_invoice sends Товары inside the document body | | PATCH to .../_Товары → 405 | Update by replacing the whole document | | DELETE → 500 | Soft-delete via mark_for_deletion (PATCH DeletionMark=true) | | Dates come as /Date(…)/ | Parsed automatically by connector.parse_date() |

Contributing

Issues and PRs welcome. Keep .env.example in sync with any new env variables you add.

License

MIT — see [LICENSE](LICENSE).

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.