MCP serverAvailable tools
Read contacts
Search customers/suppliers or retrieve one contact. Choose operation search or get, then choose kind customer or supplier.
MCP tool
get_contactsPurpose
Search or retrieve customers and suppliers.
- Use when
- You need a contact identifier or current customer/supplier details.
- Do not use when
- You need to create or update a contact.
- Required permissions
- Side effects
- None
- Idempotency
- Idempotent
Input schema
JSON Schema{ "type": "object", "properties": { "input": { "oneOf": [ { "type": "object", "properties": { "operation": { "type": "string", "const": "search" }, "kind": { "$ref": "#/definitions/__schema0" }, "query": { "description": "Legal name, RFC, code, or email", "allOf": [ { "$ref": "#/definitions/__schema1" } ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "operation", "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "operation": { "type": "string", "const": "get" }, "kind": { "$ref": "#/definitions/__schema0" }, "contactId": { "type": "string" } }, "required": [ "operation", "kind", "contactId" ], "additionalProperties": false } ] } }, "required": [ "input" ], "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "type": "string", "enum": [ "customer", "supplier" ], "description": "customer is a buyer; supplier is a business you pay" }, "__schema1": { "type": "string", "minLength": 1 } }}Output schema
JSON Schema{ "type": "object", "properties": { "data": { "anyOf": [ { "type": "object", "properties": { "contacts": { "type": "array", "items": { "$ref": "#/definitions/__schema0" } }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hasMore": { "type": "boolean" } }, "required": [ "contacts", "nextCursor", "hasMore" ], "additionalProperties": false }, { "$ref": "#/definitions/__schema0" } ] }, "error": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "code": { "type": "string", "enum": [ "validation_error", "unauthenticated", "forbidden", "not_found", "method_not_allowed", "conflict", "idempotency_conflict", "operation_in_progress", "recovery_required", "rate_limited", "provider_unavailable", "internal" ] }, "message": { "type": "string" }, "details": { "type": "object", "properties": { "issues": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } }, "message": { "type": "string" }, "code": { "type": "string" } }, "required": [ "path", "message" ], "additionalProperties": false } }, "retryable": { "type": "boolean" }, "retryAfterSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": [ "code", "message" ], "additionalProperties": false } }, "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "__schema0": { "oneOf": [ { "type": "object", "properties": { "contactId": { "$ref": "#/definitions/__schema1" }, "legalName": { "$ref": "#/definitions/__schema2" }, "code": { "$ref": "#/definitions/__schema3" }, "email": { "$ref": "#/definitions/__schema4" }, "rfc": { "$ref": "#/definitions/__schema5" }, "taxSystem": { "$ref": "#/definitions/__schema6" }, "phone": { "$ref": "#/definitions/__schema7" }, "address": { "$ref": "#/definitions/__schema8" }, "updatedAt": { "$ref": "#/definitions/__schema9" }, "kind": { "type": "string", "const": "customer" }, "cfdiUse": { "type": "string" }, "creditEnabled": { "type": "boolean" }, "creditByDefault": { "type": "boolean" }, "defaultPaymentTermDays": { "type": "integer", "minimum": 1, "maximum": 365 } }, "required": [ "contactId", "legalName", "updatedAt", "kind" ], "additionalProperties": false }, { "type": "object", "properties": { "contactId": { "$ref": "#/definitions/__schema1" }, "legalName": { "$ref": "#/definitions/__schema2" }, "code": { "$ref": "#/definitions/__schema3" }, "email": { "$ref": "#/definitions/__schema4" }, "rfc": { "$ref": "#/definitions/__schema5" }, "taxSystem": { "$ref": "#/definitions/__schema6" }, "phone": { "$ref": "#/definitions/__schema7" }, "address": { "$ref": "#/definitions/__schema8" }, "updatedAt": { "$ref": "#/definitions/__schema9" }, "kind": { "type": "string", "const": "supplier" } }, "required": [ "contactId", "legalName", "updatedAt", "kind" ], "additionalProperties": false } ] }, "__schema1": { "type": "string", "minLength": 1 }, "__schema2": { "type": "string" }, "__schema3": { "type": "string" }, "__schema4": { "type": "string" }, "__schema5": { "type": "string" }, "__schema6": { "type": "string" }, "__schema7": { "type": "string" }, "__schema8": { "type": "object", "properties": { "street": { "type": "string" }, "exterior": { "type": "string" }, "interior": { "type": "string" }, "neighborhood": { "type": "string" }, "city": { "type": "string" }, "municipality": { "type": "string" }, "state": { "type": "string" }, "postalCode": { "type": "string" }, "country": { "type": "string" } }, "required": [ "postalCode", "country" ], "additionalProperties": false }, "__schema9": { "type": "string", "format": "date-time" } }, "oneOf": [ { "required": [ "data" ] }, { "required": [ "error" ] } ]}Related workflow
See the canonical workflows in the introductionRelated tools
Get document file
Retrieve one document file as an MCP binary resource. Use preview_pdf to render an unstamped CFDI draft before stamping; the preview has no fiscal validity. CFDIs also support pdf, xml, zip, cancellation_pdf, and cancellation_xml; withholdings support pdf, xml, and zip; sales receipts and quotes support pdf; declarations support pdf, payment_pdf, and full_pdf; opinions support pdf.
Save contact
Create or update one customer/supplier. Use get_contacts to obtain contactId for updates. Credit fields apply only to customers.