Mercoa MCP by usefulapi

v1.41.1
io.usefulapi/mercoa Checked 2 days ago Published 1 day ago

Query and manage Mercoa AP/AR bill-pay: entities, invoices, transactions and payment methods.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mercoa_find_entities Find entities

Find/search entities (buyers, vendors, payors, payees). Use to look up counterparties by name/email/foreignId or list all. GET /entity.

ParameterTypeDescription
foreignIdYour system's ID(s) for the entity.
isCustomerbooleanIf true, only entities with a direct relationship to your organization.
isPayeebooleanFilter entities marked as payees.
isPayorbooleanFilter entities marked as payors.
limitintegerMax entities to return (1-100, default 10).
paymentMethodsbooleanIf true, include payment methods in the response.
returnMetadataMetadata key(s) to include in the response.
searchstringSearch by name, email, emailTo, entity ID, or foreign ID (partial matches).
startingAfterstringEntity ID cursor for pagination.
statusEntity status filter (e.g. verified, pending).

mercoa_get_entity Get entity

Get a single entity by ID (or foreign ID). GET /entity/{entityId}.

ParameterTypeDescription
entityId *stringEntity ID (e.g. ent_...) or foreign ID.

mercoa_get_entity_events Get entity events

Get the event/audit log for an entity. GET /entity/{entityId}/events.

ParameterTypeDescription
entityId *stringEntity ID or foreign ID.
endDatestringEnd date filter (ISO 8601).
limitintegerMax events to return (1-100).
startDatestringStart date filter (ISO 8601).
startingAfterstringEvent ID cursor for pagination.

mercoa_get_entity_invoice_metrics Get entity invoice metrics

Get aggregate invoice metrics (totals/counts, grouped by currency) for an entity's payables/receivables — for AP/AR dashboards and aging. GET /entity/{entityId}/invoice-metrics.

ParameterTypeDescription
entityId *stringEntity ID or foreign ID.
approverIdFilter by assigned approver user ID(s).
currencyCurrency code(s) to filter on, e.g. USD.
dateTypestringDate type to filter by (e.g. CREATED_AT, DUE_DATE).
endDatestringEnd date filter (ISO 8601).
excludePayablesbooleanOnly return receivables (exclude payables).
excludeReceivablesbooleanOnly return payables (exclude receivables).
groupByAdditional grouping (e.g. by status).
invoiceIdFilter by invoice ID(s) or foreign ID(s).
payerIdFilter by payer ID(s).
returnByDatestringGroup metrics by date, e.g. CREATION_DATE or DUE_DATE.
returnByDateFrequencystringFrequency for date grouping (e.g. DAILY, MONTHLY).
searchstringSearch by vendor name, invoice number, check number, or amount.
startDatestringStart date filter (ISO 8601).
statusInvoice status filter (e.g. NEW, SCHEDULED, PAID).
vendorIdFilter by vendor ID(s).

mercoa_list_entity_payment_methods List entity payment methods

List an entity's payment methods (bank accounts, cards, check, etc.). GET /entity/{entityId}/paymentMethods.

ParameterTypeDescription
entityId *stringEntity ID or foreign ID.
typestringFilter by payment method type (e.g. bankAccount, card, check).

mercoa_get_payment_method Get payment method

Get a single payment method for an entity. GET /entity/{entityId}/paymentMethod/{paymentMethodId}.

ParameterTypeDescription
entityId *stringEntity ID or foreign ID.
paymentMethodId *stringPayment method ID (e.g. pm_...).

mercoa_list_entity_users List entity users

List the users belonging to an entity (approvers, admins, etc.). GET /entity/{entityId}/users.

ParameterTypeDescription
entityId *stringEntity ID or foreign ID.

mercoa_find_invoices Find invoices

Find/search invoices (bills) across payers and vendors. Filter by status, entity, date, approver and more. GET /invoices (plural list endpoint).

ParameterTypeDescription
approverActionFilter by approver action (use with approverId), e.g. APPROVE.
approverIdFilter by assigned approver user ID(s).
creatorUserIdFilter by the user ID(s) that created the invoice.
dateTypestringDate type to filter by (e.g. CREATED_AT, DUE_DATE).
endDatestringEnd date filter (ISO 8601).
entityGroupIdstringFilter by entity group ID.
entityIdFilter by entity (payer or vendor) ID(s) or foreign ID(s).
invoiceIdFilter by invoice ID(s) or foreign ID(s).
invoiceTemplateIdFilter by invoice template ID(s).
limitintegerMax invoices to return (1-100, default 10).
orderBystringField to order by (e.g. CREATED_AT, AMOUNT, DUE_DATE).
orderDirectionstringasc or desc.
payerIdFilter by payer ID(s) or foreign ID(s).
paymentTypeFilter by payment type (e.g. recurring).
returnPayerMetadatabooleanInclude payer metadata in the response.
returnPaymentTimingbooleanInclude payment timing in the response.
returnVendorMetadatabooleanInclude vendor metadata in the response.
searchstringSearch by vendor name, invoice number, check number, or amount.
startDatestringStart date filter (ISO 8601).
startingAfterstringInvoice ID cursor for pagination.
statusInvoice status filter (e.g. DRAFT, NEW, APPROVED, SCHEDULED, PAID).
vendorIdFilter by vendor ID(s) or foreign ID(s).

mercoa_get_invoice Get invoice

Get a single invoice (bill) by ID. GET /invoice/{invoiceId}.

ParameterTypeDescription
invoiceId *stringInvoice ID (e.g. in_...) or foreign ID.

mercoa_get_invoice_events Get invoice events

Get the event/audit log for an invoice (status changes, approvals, payments). GET /invoice/{invoiceId}/events.

ParameterTypeDescription
invoiceId *stringInvoice ID or foreign ID.
endDatestringEnd date filter (ISO 8601).
limitintegerMax events to return (1-100).
startDatestringStart date filter (ISO 8601).
startingAfterstringEvent ID cursor for pagination.

mercoa_find_transactions Find transactions

List/search payment transactions. Filter by entity, invoice, status, type and date. GET /transactions.

ParameterTypeDescription
endDatestringCREATED_AT end date filter (ISO 8601).
entityGroupIdstringFilter by entity group ID.
entityIdFilter by entity ID(s) or foreign ID(s).
invoiceIdFilter by invoice ID(s) or foreign ID(s).
limitintegerMax transactions to return (1-100, default 10).
payerIdFilter by payer ID(s).
searchstringSearch by vendor name, invoice number, check number, or amount.
startDatestringCREATED_AT start date filter (ISO 8601).
startingAfterstringTransaction ID cursor for pagination.
statusTransaction status filter.
transactionIdFilter by transaction ID(s).
transactionTypeFilter by transaction type.
vendorIdFilter by vendor ID(s).

mercoa_get_transaction Get transaction

Get a single payment transaction by ID. GET /transaction/{transactionId}.

ParameterTypeDescription
transactionId *stringTransaction ID.

mercoa_get_organization Get organization

Get the caller's Mercoa organization configuration (settings, payment methods enabled, etc.). GET /organization.

mercoa_create_entity Create entity

WRITE — creates a real entity (customer/vendor/payor/payee) in Mercoa. Supply role flags, accountType, and a nested `profile` object (business or individual details). POST /entity.

ParameterTypeDescription
accountTypestringbusiness or individual.
emailstringPrimary email for the entity.
foreignIdstringYour system's ID for this entity.
isCustomerbooleanWhether this entity has a direct relationship with your organization.
isPayeebooleanWhether this entity can receive payments (AR / vendor).
isPayorbooleanWhether this entity can pay invoices (AP).
profileobjectNested profile object, e.g. { "business": { "legalBusinessName": "Acme Inc.", "email": "ap@acme.com", "businessType": "llc" } } or { "individual": { "name": {...}, "email": "..." } }.

mercoa_create_invoice Create invoice

WRITE — creates a real invoice/bill in Mercoa. Set status (DRAFT to stage, NEW to submit), amount, currency, payer/vendor, dates and line items. POST /invoice.

ParameterTypeDescription
amountnumberTotal invoice amount.
creatorEntityIdstringEntity ID on whose behalf the invoice is created.
creatorUserIdstringUser ID creating the invoice.
currencystringCurrency code, e.g. USD.
deductionDatestringScheduled payment/deduction date (ISO 8601).
dueDatestringDue date (ISO 8601).
invoiceDatestringInvoice date (ISO 8601).
invoiceNumberstringHuman-readable invoice number, e.g. INV-123.
lineItemsarrayLine items array, e.g. [{ "amount": 100, "currency": "USD", "description": "Product A", "quantity": 1, "unitPrice": 100 }].
metadataobjectArbitrary key/value metadata.
noteToSelfstringInternal note.
payerIdstringPayer entity ID (who owes).
paymentDestinationIdstringPayment method ID to pay to (vendor's).
paymentSourceIdstringPayment method ID to pay from (payer's).
statusstringInvoice status, e.g. DRAFT, NEW, APPROVED, SCHEDULED.
vendorIdstringVendor entity ID (who is paid).

mercoa_update_invoice Update invoice

WRITE — updates an existing invoice/bill (all fields optional). Commonly used to advance status (e.g. DRAFT→NEW→SCHEDULED) or change amounts, dates, or payment methods. POST /invoice/{invoiceId}.

ParameterTypeDescription
invoiceId *stringInvoice ID to update.
amountnumberTotal invoice amount.
currencystringCurrency code, e.g. USD.
deductionDatestringScheduled payment/deduction date (ISO 8601).
dueDatestringDue date (ISO 8601).
invoiceDatestringInvoice date (ISO 8601).
invoiceNumberstringHuman-readable invoice number.
lineItemsarrayReplacement line items array.
metadataobjectArbitrary key/value metadata.
noteToSelfstringInternal note.
payerIdstringPayer entity ID.
paymentDestinationIdstringPayment method ID to pay to.
paymentSourceIdstringPayment method ID to pay from.
statusstringNew invoice status, e.g. NEW, APPROVED, SCHEDULED.
vendorIdstringVendor entity ID.

mercoa_add_invoice_comment Add invoice comment

WRITE — adds a comment to an invoice (visible in its activity log). POST /invoice/{invoiceId}/comment.

ParameterTypeDescription
invoiceId *stringInvoice ID to comment on.
text *stringComment text.
userIdstringID or foreign ID of the user creating the comment.