keycrm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KEYCRM_EMAIL | Yes | Your KeyCRM account email address used for authentication | |
| KEYCRM_DOMAIN | Yes | Your KeyCRM account domain, used to access https://<domain>.api.keycrm.app | |
| KEYCRM_PASSWORD | Yes | Your KeyCRM account password used for authentication | |
| KEYCRM_API_TOKEN | No | Optional KeyCRM API token. If not provided, the server can retrieve it automatically through /config/api-client. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
KeyCRM (your-account). Two channels: 'internal' (full web-UI API, ids are CRM ids) and 'official' (openapi.keycrm.app/v1, documented, 20 req/min). Use the typed tools for daily work and crm_api only for endpoints that have no dedicated tool (discover them with crm_endpoints). All dates from the CRM are UTC. Money values are in the account currency (UAH) and are returned in minor units where the API does so; check grand_total vs products_total when comparing.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| crm_statusA | Check KeyCRM connectivity and show account summary. Returns the authenticated profile, which channels work (internal/official), the API token owner and live counters for orders, pipeline cards, clients, products and users. Start every session with this call. |
| crm_capabilitiesA | What this CRM account can do right now. Returns active modules (orders, leads, conversations, ...), plan-level flags, the API request limit and the list of known broken or quirky endpoints, so the model does not waste calls on dead routes. |
| crm_snapshotA | Save a local JSON snapshot of the account before any risky operation. Dumps pipeline cards (with contacts), orders, products, clients, users, sources, statuses and settings into keycrm-mcp/backups/.json. Use it before experiments with write endpoints: this is how the 26 lost cards were recovered on 01.11.2026. |
| crm_endpointsA | Search the reverse-engineered endpoint catalog (572 internal API routes). Use it to find the exact path+method before calling crm_api, e.g. query="tags", group="finance", query="export". |
| crm_apiA | Raw request to any KeyCRM endpoint (escape hatch). api='internal' -> https://.api.keycrm.app (572 routes, ids are CRM ids) api='official' -> https://openapi.keycrm.app/v1 (documented, filter[field]=value, 20 req/min) method: GET/POST/PUT/PATCH/DELETE, path starts with '/', query are plain query params (use 'filter[status_id]' style keys for official filters). |
| ordersA | Work with orders (замовлення). actions: list - official /order with filters + pagination (compact rows) get - full order by id (client, products, payments, shipping, tags) create - body needs source_id (+ buyer {full_name, phone/email} + products[]) update - PUT /orders/{id} with a partial body set_status - move order to status_id add_product / update_product / remove_product - product_id for last two add_tag / remove_tag - tag_id remove - delete orders by ids[] statuses / groups / totals / tags / sources - dictionaries (include_disabled=True shows hidden statuses and tags too) filters example: {"status_id": [1,2], "created_between": ["2026-10-01","2026-11-01"]} |
| leadsA | Pipeline cards (лиды / сделки / заявки). actions: list - cards with pagination; filters go through the official API ({"status_id": 1, "pipeline_id": 1, "created_between": ["...","..."]}) get - full card (contact, source, products, payments) create - required: status_id, communicate_at, currency_code optional: title, pipeline_id, source_id, manager_id, contact{...} update - PUT /leads/{id} with a partial body move - set status_id (moves between pipelines too) pipelines - list of pipelines with their statuses desk - kanban board: statuses grouped with cards complete - convert card into an order (PUT /leads/{id}/order) add_product / copy remove - BLOCKED on purpose: the batch endpoint removes whole status columns when ids do not match exactly. Delete cards in the UI. |
| clientsA | Buyers / clients (покупці). IMPORTANT: POST /clients ignores phone and email. Contacts live in separate profiles: POST /clients/{id}/profiles {"client_id", "field": "phone"|"email", "value"}. create() accepts phone/email and writes the profiles right after the client, update() does the same when phone/email are passed. actions: list - paginated clients with meta get - full client (phones, emails, profile list, shipping addresses) create - data{full_name, note, manager_id, ...} plus optional phone/email update - data{...} plus optional phone/email delete - DELETE /clients/{id} search - by name/phone/email set_profile - client_id + field ("phone"/"email"/custom) + value orders - order history of the client leads - pipeline cards of the client |
| productsC | Catalog products (товари). actions: list (with stock quantity), get, create (name required), update, delete, categories (tree), warehouses, search. |
| tasksA | Tasks (задачі). Creating a task really works on this account. The API wants this body: name, priority, type, description, status, scheduled_at (ISO), assigned_to_id, tasked, attachments, period, checklist, settings. actions: list - paginated tasks; tab="actual" (open) or "closed", mine=True only own tasks get - task by id for_entity - tasks attached to a card/order/client: entity_type (lead/order/client/task) + entity_id expired_count create - title, description, assigned_to_id, scheduled_at (ISO), priority, task_type; or pass data{} to override the whole body update - data{} with fields to change complete - mark as done (status=done) delete - DELETE /tasks/{id} |
| conversationsC | Chats (переписки): list, get, messages, unread, send (reply into a chat). |
| auditA | Change history (історія змін, /auditing). actions: list - recent changes of the whole account (paginated, newest first) by_entity - changes of one object: entity_type (order/lead/task/manufacturing) + entity_id by_manager - changes made by a manager: manager_id Each record has action, model_type, model_ids, initiator and a changes list. |
| usersC | Team: list (members with roles), roles, permissions. |
| settingsB | Account settings (config/settings). section: general, orders, products, leads, currencies, shipment, notifications, companies, suppliers, ai, manufacturing, conversations, tables, order_fields, allowed_fields or empty for the whole object (large). |
| reportA | Aggregate report over a date range (UTC, YYYY-MM-DD). kind='sales' - orders: count, revenue (grand_total), average check, breakdown by status_id / manager_id / payment_status. kind='leads' - pipeline cards: count, sum of products_total, breakdown by status_id / pipeline_id / manager_id, plus finished/active split. kind='funnel' - live funnel: cards per status per pipeline, closed share and conversion percent (no date range needed, taken from the pipeline board). kind='managers' - load per manager: cards, closed, active, conversion, products_total. kind='stale' - cards with no updates for more than days (default 7) days. |
| financeA | Finance (фінанси): bills, payments, dictionaries, currency, billing. Read only on purpose: creating or moving money objects is risky, so the tool never writes. Actions: bills / accounts - list finance bills (рахунки), filters passed as-is payments - list payments (answers 500 on this tenant, server side) payment_config - payment form config: min/max amounts, methods, managers expense_types - expense type dictionary payment_methods - payment method dictionary payment_gateways - connected payment gateways currency_rates - account currency rate table rates_common - common currency rates; currency="USD,UAH" narrows it fiscals - fiscal receipts / registers transactions - bank transactions (answers 500 on this tenant) transactions_config / transactions_unlinked - bank import config / unlinked rows billing - account balance, tariff and usage counters billing_invoices / billing_payments - subscription invoices and charges Example filters: {"filter[status]": "new"}; keys are sent as-is. |
| deliveryA | Delivery (доставка): connected services, prep centers, templates, carrier lookups. Actions: services - connected delivery services (empty on this tenant) prep_centers - packing/prep centers, paginated prep_centers_active - active prep centers shipment_templates - waybill templates warehouses - carrier warehouse/office list: Nova Poshta, Ukrposhta and Meest need location_ref (from locations), Rozetka takes query locations - carrier city/place search for service + query streets - Nova Poshta street search: query + location_ref suggest - address suggestion by query (500 on this tenant) price - POST shipment-price for order_id on service (dry run) print - GET waybill document for order_id on service (text preview) service: novaposhta, novaposhta_international, ukrposhta, meest_express, rozetka, rozetka_delivery, dhl_express, fedex, ups. This tool never creates a shipment; that would push data to a carrier. |
| publicationsA | Marketplace publications (публікації): list, variations. Actions: list - publications with marketplace/status/product columns variations - publication_id required, per-marketplace variations Empty on this tenant (no marketplaces connected). Sync/load actions are omitted on purpose: they push products to a live marketplace. |
| stocksA | Stock (склад): stock rows, movements, inventories, warehouses, stat, history. Actions: list - stock rows per offer (sku, quantity, in_reserve, available, price) movements - stock movements, paginated movement - one movement by movement_id inventories - movement_id required: inventory lines of that movement warehouses - warehouses (read only here, stock writes are in crm_api) stat - totals: quantity / purchased_price / price, positive vs negative filters - filter bounds for the stock table history - offer_id required: movement history of one offer filters keys are sent as-is, e.g. {"filter[warehouse_id]": 1}. |
| commentsA | Object comments (коментарі): list, add, edit, delete. entity_type: lead, order, client or deal; entity_id is the CRM id of that object. Actions: list - comments of the object, paginated add - message required (or pass a full body in data) edit - comment_id required, new message or data body delete - comment_id required (the CRM keeps a soft-deleted flag) |
| custom_fieldsA | Custom fields (кастомні поля): definitions and values. Actions: list - all custom fields; model filters them (lead / order / client) values - entity_id + model required; values of that object field - field_id required; one definition from the list Note the values path order: /config/custom-fields/{entity_id}/{model}/values. |
| documentsA | Printed documents (документи): templates, preview, print. Actions: list - document templates of the account (empty on this tenant) by_scope - scope required (order / lead / client), templates for it export_template / export_formats - xlsx export template and formats print_layouts - list printing layouts (config/print) preview - data required: {"type": "order", "structure": }; structure may be a dict/list and is stringified for you; returns rendered HTML view preview_pdf- same body, returns a short text head of the PDF (the client truncates binary bodies) print - template_id + scope + model_id, returns document text head attach - template_id + scope + model_id + data, attaches a document Document writes are limited to preview/print/attach; templates are not created or edited here. |
| automationsA | Automation triggers (автоматизації), read only. Actions: list - all triggers, compact; event / group / is_active filter locally get - trigger_id required; one trigger from the list Creation, editing and toggling are not exposed: a trigger changes live CRM behaviour. |
| filesA | Files and attachments (файли) of orders. actions: list_order - attachments of an order (GET /orders/{id}, field attachments) validate - size limit check before upload: order_id + path attach_order - upload a file to an order: order_id + path (local file) or content_base64, optional filename/mime; multipart, single chunk, limit 250 MB per order download - save a file by file_id into keycrm-mcp/exports/, returns local path, size and content type detach - remove attachment from its entity (attachment_id) delete_file - delete file itself (file_id), cascades attachments Note: deleting an order does NOT delete its files, remove orphans with delete_file explicitly. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 24 tools
Tools are grouped by resource domain (orders, leads, clients, products, stocks, finance, delivery) and each has a clearly distinct purpose, with meta tools (crm_status, crm_capabilities, crm_snapshot, crm_endpoints, crm_api) distinguished by role. There is minor cross-tool overlap in sub-actions: 'warehouses' appears in products, stocks, and delivery, and 'list' recurs everywhere, but the surrounding domain context disambiguates them. crm_api as a raw escape hatch could in principle shadow any domain tool, though it is framed as a last resort.
All names are lowercase snake_case noun phrases naming the resource domain (orders, leads, clients, products, stocks, comments, custom_fields, documents), which is a coherent, predictable convention for action-dispatch tools. The only deviation is the 'crm_' prefix on the five meta/utility tools, which is a sensible grouping rather than an inconsistency. It does not use a verb_noun pattern, but the top-level style itself is consistent.
24 tools is on the heavy side, but each is a domain-level dispatcher containing many actions, so the count reflects a compact grouping rather than one-tool-per-endpoint sprawl. For a full CRM spanning orders, leads, clients, products, stock, finance, delivery, tasks, chats, files, and reporting, the surface is well scoped. A few tools (publications, automations) are thin on this tenant but still conceptually justified.
Coverage is broad and deep: full CRUD on orders, clients, products, tasks, comments, plus read surfaces for finance, delivery, stocks, documents, audit, reports, and settings. Intentional read-only or blocked operations (finance writes, delivery shipment creation, automation toggles, lead removal) are explicitly documented with risk rationale, which is good design rather than a silent gap. Remaining gaps are minor: order payment creation, custom-field definition writes, and document template management are not exposed.