Skip to main content
Glama
ilyautov

moysklad-mcp-ru

by ilyautov

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MOYSKLAD_ALLOW_WRITENoSet to '1' to allow writing (creating documents). Default is '0'.
MOYSKLAD_WRITE_CABINETSNoComma-separated list of cabinet IDs or names for which write is allowed. Optional.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
ms_check_authA

Check whether the required credentials are present in the environment.

Does NOT reveal secret values — only reports which variables are set. Returns JSON: {"ready": bool, "missing": [str], "required": [str]}.

ms_list_sectionsA

List API sections and how many catalog endpoints each contains.

ms_get_sectionA

List all endpoints in one section.

Args: section: section name (see {svc}_list_sections), e.g. "statistics". Returns JSON list of {operation_id, method, path, safety, summary}.

ms_search_methodsA

Search the endpoint catalog by keyword (works in Russian and English).

Args: query: free text, e.g. "остатки", "stocks", "update price". limit: max results (1-50). Returns JSON list of matching endpoints (best first).

ms_mapA

The big picture: business entities this API covers and the go-to methods for each. Call with no args to see the whole map ("you are here"); pass entity="reviews" (or stocks/prices/orders/…) to list every method of one entity. Use this before guessing — it orients you fast.

ms_describe_methodA

Return the full catalog record for one endpoint: method, host, path, scope, safety level, pagination style, rate limit, params and doc URL.

ms_call_methodA

Execute one catalog endpoint by operation_id.

Read endpoints run immediately. WRITE endpoints require confirm_write=true. DESTRUCTIVE endpoints require confirm_write=true AND i_understand_this_modifies_data=true (nothing is sent otherwise).

Args: operation_id: id from the catalog (see {svc}_search_methods). path_values: values for {placeholders} in the path. query: query-string parameters. body: JSON request body. confirm_write: required for write/destructive operations. i_understand_this_modifies_data: required for destructive operations. Returns JSON: {"ok": true, "status", "data"} or the error envelope.

ms_call_rawA

Execute ANY endpoint, even ones not in the catalog (full API coverage).

Safety is inferred from the HTTP verb: GET=read, POST/PUT/PATCH=write, DELETE=destructive. Same confirmation rules as {svc}_call_method.

Args: method: HTTP verb (GET/POST/PUT/PATCH/DELETE). path: full path beginning with '/', e.g. "/api/v1/supplier/sales". host: host override; defaults to the service's default host. query: query-string parameters. body: JSON request body. confirm_write / i_understand_this_modifies_data: confirmations. Returns JSON: {"ok": true, "status", "data"} or the error envelope.

ms_fetch_allA

Auto-paginate a read endpoint and return every row in one response.

Handles offset, last_id, cursor (Ozon v4/v5), page and WB lastChangeDate styles. The array path is taken from the catalog automatically.

Args: operation_id: a read endpoint from the catalog. query / body / path_values: base parameters (cursor fields are managed). items_path: override the array path (default: the endpoint's own). limit: page size to request. max_items: hard cap to protect context (default 10000). Returns JSON: {"ok", "items", "total_fetched", "pages_fetched", "truncated"}.

ms_list_cabinetsA

List configured cabinets for this marketplace and which one is active.

Returns JSON: {"active": str|null, "cabinets": [names], "fields_needed": [...]}. Secret values are never returned.

ms_add_cabinetA

Add or update a cabinet (a named set of API credentials), from chat.

⚠️ This puts the key into the chat transcript — requires i_understand_key_goes_to_chat=true. The terminal-free safe alternative is the installer (install.py / double-click), where the key never enters chat.

Args: credentials: dict with the required fields for this service ({fields}). For Ozon: {{"client_id": "...", "api_key": "..."}}; for WB: {{"token": "..."}}. name: optional label. If omitted, the cabinet is named after the real shop name fetched from the marketplace (falls back to "main"). i_understand_key_goes_to_chat: must be true to proceed. Saved to ~/.marketplace-mcp/cabinets.json (local, chmod 600), never echoed.

ms_set_keyA

Change / rotate the API key from chat (e.g. the old one expired or leaked).

⚠️ The key goes into the chat transcript — requires i_understand_key_goes_to_chat=true. The safe, terminal-free alternative is the installer, where the key never enters chat. Use a scoped key and rotate it in the seller cabinet if it was exposed.

Args: credentials: dict with the required fields ({fields}). cabinet: which cabinet to update. Default: the active one (so "my key expired" just works). If there is none, the cabinet is named from the marketplace's shop name, else "main". i_understand_key_goes_to_chat: must be true to proceed. On success the key is validated against the marketplace and the shop name is reported. Saved locally (chmod 600), never echoed back.

ms_use_cabinetA

Switch the active cabinet. Subsequent API calls use its credentials.

Args: name: the cabinet to activate (see {svc}_list_cabinets).

ms_remove_cabinetA

Delete a stored cabinet. If it was active, another becomes active.

Args: name: the cabinet to remove.

ms_list_workflowsA

List ready-made analytical workflows (recipes) for this marketplace.

Returns JSON: [{name, category, when_to_use}]. Use {svc}_get_workflow to fetch the full step-by-step plan for one.

ms_get_workflowA

Return the full plan for one workflow: ordered steps (each naming a catalog operation_id and why), interpretation guidance, and common mistakes to avoid.

Args: name: workflow name (see {svc}_list_workflows).

ms_get_stockA

Current stock snapshot, grouped by product (fast /report/stock/all/current).

Args: stock_type: quantity | freeStock | reserve | inTransit | stock. Default quantity. include_zero: include zero-stock lines (adds include=zeroLines). Returns JSON: {"ok": true, "data": [ {assortmentId, }, ... ]}. No money in this report, so values are returned as-is (quantities).

ms_get_productsA

List products/services/bundles (assortment) with prices and stock.

Args: limit: page size, max 1000. offset: pagination offset. filter: optional MoySklad filter expression (e.g. "archived=false"). rubles: convert kopeck money fields to rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ products ]}}. Sale prices and buy price are kopecks in the raw API; rubles=true converts them.

ms_get_ordersA

List customer orders. Document total is "sum" (kopecks in raw API).

Args: limit: page size, max 1000. offset: pagination offset. filter: optional MoySklad filter (e.g. "moment>=2026-06-01 00:00:00"). rubles: convert "sum" and money fields to rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ orders ]}}.

ms_get_profitA

Profitability by product (sale, cost, profit, margin). Money in kopecks.

Args: moment_from / moment_to: period bounds "YYYY-MM-DD HH:MM:SS" (report needs them). limit/offset: pagination (rows under "rows"). rubles: kopecks→rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ ... ]}}.

ms_get_moneyA

Cash balances by account/cashbox (kopecks). For cashflow over time use ms_call_method('ms_get_report_money_plotseries', ...) from the map.

Args: rubles: convert kopeck balances to rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ {account, balance, ...} ]}}.

ms_get_turnoverA

Turnover by product: opening/income/outcome/closing in qty and money (kopecks).

Args: moment_from / moment_to: period bounds "YYYY-MM-DD HH:MM:SS" (required by the report). limit/offset: pagination. rubles: kopecks→rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ ... ]}}.

ms_get_counterpartiesA

Counterparties (customers and suppliers). Balance fields in kopecks.

Args: limit/offset: pagination. filter: MoySklad filter (e.g. "name~ООО"). rubles: convert kopeck balance fields to rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ counterparties ]}}.

ms_get_storesB

Warehouses/stores (small dictionary). No money fields.

Returns JSON: {"ok": true, "data": {"meta", "rows": [ {name, id, ...} ]}}.

ms_get_documentsA

List a role document by type. Document total in "sum" (kopecks).

Args: doc_type: one of demand | supply | purchaseorder | invoiceout | invoicein | salesreturn | purchasereturn. limit/offset: pagination. filter: MoySklad filter (e.g. "moment>=2026-06-01 00:00:00"). rubles: convert "sum" and money fields to rubles (default true). Returns JSON: {"ok": true, "data": {"meta", "rows": [ documents ]}}.

ms_pingA

Live connectivity + auth check: GET assortment?limit=1.

Returns {"ok": true, "status": 200, "data": {...}} when the token works, or the canonical error envelope (auth/forbidden/network/...) otherwise. Use this on the cabinet to confirm the token before anything else.

ms_build_purchaseorderA

PREVIEW a purchase order: resolve names to refs and show the EXACT body ms_create_purchaseorder would send (money already kopecks). Performs READS to resolve names; sends NO write. Inspect the body/summary before creating.

Args: agent: supplier counterparty name (поставщик) — required. organization: own legal entity; omit to auto-use the only one on the cabinet. store: warehouse name (optional). positions: list of {"product": name, "quantity": n, "price": rubles, optional "discount" %, "vat" %}. moment/name/description: optional fields. moment is "YYYY-MM-DD HH:MM:SS". Returns {"ok": true, "body", "resolved", "summary"} or an error envelope.

ms_create_purchaseorderA

Create a purchase order as a DRAFT (applicable=false — not posted, moves nothing). WRITE — requires confirm_write=true. Posting is separate (ms_post_document). Writes also require MOYSKLAD_ALLOW_WRITE=1 (off by default).

Args: same as ms_build_purchaseorder, plus confirm_write. Returns the created document envelope {"ok": true, "data": {... "id" ...}}, or the guard/gate error (nothing sent).

ms_build_documentA

PREVIEW any role document: resolve names to refs and show the EXACT body ms_create_document would send (money already kopecks). READS only; no write.

Args: doc_type: one of demand | supply | purchaseorder | invoiceout | invoicein | salesreturn | purchasereturn. agent: counterparty name — supplier for supply/invoicein/purchasereturn/ purchaseorder, customer for demand/invoiceout/salesreturn. organization: own legal entity; omit to auto-use the only one on the cabinet. store: warehouse name. supply/demand move stock, so a store is expected; optional for the others. positions: list of {"product": name, "quantity": n, "price": rubles, optional "discount" %, "vat" %}. moment/name/description: optional. moment is "YYYY-MM-DD HH:MM:SS". Returns {"ok": true, "doc_type", "body", "resolved", "summary"} or an error.

ms_create_documentA

Create ANY role document as a DRAFT (applicable=false — not posted, moves nothing). WRITE — requires confirm_write=true AND MOYSKLAD_ALLOW_WRITE=1. Posting is a separate destructive step (ms_post_document). One body shape fits every order-like document (live-verified 2026-06-26 on all 6 types).

Args: doc_type: one of demand | supply | purchaseorder | invoiceout | invoicein | salesreturn | purchasereturn. agent / organization / store / positions / moment / name / description: same as ms_build_document. confirm_write: required (write gate). Returns the created document envelope {"ok": true, "data": {... "id" ...}}, or the guard/gate/validation error (nothing sent).

ms_post_documentA

POST / провести a document: sets applicable=true, which MOVES STOCK AND MONEY in the books. DESTRUCTIVE — requires confirm_write=true AND i_understand_this_modifies_data=true. Separate from creation on purpose.

Args: doc_type: one of demand|supply|purchaseorder|invoiceout|invoicein| salesreturn|purchasereturn. doc_id: document id (the "id" field returned by create). Returns the updated document envelope, or the guard/gate error (nothing sent).

ms_delete_documentA

DELETE a document — e.g. remove a test draft to clean up. DESTRUCTIVE — requires both confirmations.

Args: doc_type: one of demand|supply|purchaseorder|invoiceout|invoicein| salesreturn|purchasereturn. doc_id: document id. Returns {"ok": true, "status": 200} on success, or the guard/gate error.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/ilyautov/moysklad-mcp-ru'

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