MetorialDocs

Set up EspoCRM in Metorial for Claude, ChatGPT and Cursor

Share EspoCRM with your team in Claude, ChatGPT and Cursor through Metorial: API key or basic authentication sign-in, 19 tools (5 read-only).

To give your team EspoCRM in Claude, ChatGPT, Cursor and other AI clients, an admin shares the EspoCRM integration in a Metorial portal, and each person connects with an API key. Agents can manage contacts, accounts, leads, opportunities, support cases, meetings, calls, and tasks in your EspoCRM instance. The integration has 19 tools, 5 read-only, 1 write and 13 destructive, plus 1 trigger.

What you'll learn

  • How an admin shares EspoCRM in a portal and how each person connects
  • What EspoCRM asks for when you connect, and where to find it
  • How to keep the 5 read-only tools and reject the other 14

Before you start

Sign-in methods

MethodTypeWhat a person provides
API Key (default)API tokenapiKey
Basic AuthenticationCustom credentialsusername and password
HMAC AuthenticationCustom credentialsapiKey and secretKey

The portal and metorial setup use API Key unless someone picks another method.

API Key

To connect, a person enters:

  • apiKey: API Key from the EspoCRM API User detail view (Administration > API Users)

Basic Authentication

To connect, a person enters these values:

  • username: EspoCRM username
  • password: EspoCRM password or authentication token

HMAC Authentication

To connect, a person enters these values:

  • apiKey: API Key from the EspoCRM HMAC API User
  • secretKey: Secret Key from the EspoCRM HMAC API User

Setup settings

Whichever method you pick, setup also asks for:

  • siteUrl: The URL of your EspoCRM instance (e.g., https://crm.yourcompany.com). This is the same URL you use to access EspoCRM in your browser.

Admin: share EspoCRM in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose EspoCRM. Under Auth Method, keep API Key or pick another. For how members connect, choose Each person connects so everyone enters their own API key, or Shared connection to enter one API key for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from EspoCRM.

Choose who gets it

Add the access groups that should see EspoCRM. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user EspoCRM integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search espocrm

Employee: connect EspoCRM

In the portal

Open EspoCRM in the catalog

Sign in to your portal and open EspoCRM. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your API key (apiKey).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search espocrm
metorial setup <catalog-item-id>

catalog search prints the catalog item ID. metorial setup uses API Key. To connect with Basic Authentication instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.

Add it to your AI client

metorial install adds your EspoCRM connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list espocrm
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 5 read-only tools, such as get_record and list_stream, and lose the write tool manage_relationships, and the 13 destructive tools, such as send_email or convert_lead.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list espocrm
metorial tools <integration-id>
metorial call <integration-id> list_records -d '{"entityType":"<entity-type>"}'

metorial tools lists the 19 tools, minus any you rejected. list_records needs entityType, so replace the placeholders. It lists and filter records of any entity type in EspoCRM.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (5)

  • list_records: List and filter records of any entity type in EspoCRM. Needs entityType.
  • get_record: Retrieve a single record by its ID from any entity type in EspoCRM. Needs entityType and recordId.
  • get_current_user: Identify the authenticated EspoCRM user and retrieve their profile and team IDs.
  • list_stream: Read notes and activity updates from the authenticated user's EspoCRM stream, or from a specific record's stream.
  • generate_pdf: Generate a downloadable PDF document from a record in EspoCRM using a PDF template. Needs entityType, recordId and templateId.

Write tools (1)

  • manage_relationships: Link, unlink, or list related records in EspoCRM. Needs action, entityType, recordId and linkName.

Destructive tools (13)

  • manage_tasks: Create, update, or delete Task records in EspoCRM. Needs action.
  • convert_lead: Convert a Lead into a Contact, Account, and/or Opportunity in EspoCRM. Needs leadId.
  • manage_contacts: Create, update, or delete Contact records in EspoCRM. Needs action.
  • manage_calls: Create, update, or delete Call records in EspoCRM. Needs action.
  • manage_attachments: Upload, retrieve, or delete file attachments in EspoCRM. Needs action.
  • manage_cases: Create, update, or delete Case (support ticket) records in EspoCRM. Needs action.
  • send_email: Send an email through EspoCRM. Needs to, subject and body.
  • manage_opportunities: Create, update, or delete Opportunity records in EspoCRM. Needs action.
  • manage_record: Create, update, or delete an EspoCRM record of any supported entity type, including custom entities and entities without a dedicated management tool.
  • manage_meetings: Create, update, or delete Meeting records in EspoCRM. Needs action.
  • manage_leads: Create, update, or delete Lead records in EspoCRM. Needs action.
  • manage_accounts: Create, update, or delete Account records in EspoCRM. Needs action.
  • post_stream_note: Post a note to the activity stream of any record in EspoCRM. Needs entityType, recordId and post.

Triggers

EspoCRM has 1 trigger, which fire on events in EspoCRM:

  • record_events: Triggers when records are created, updated, or deleted in EspoCRM.

Next steps