EspoCRM MCP server for AI agents

Live

API KEY

CRM

CRM & Sales

EspoCRM gives your agent CRM access in your EspoCRM instance: read and manage accounts, contacts, leads, opportunities, cases, calls, meetings, and tasks, and read campaigns, documents, emails, and knowledge base articles.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
EspoCRM
agent · Acme Q3
Run
Which opportunities are linked to the Northwind account?
S
espocrm_account_opportunities_list
143ms
CRM agent
3 opportunities are linked to Northwind. The largest is in the Proposal stage.
Sources: EspoCRM Northwind account, 3 opportunities
espocrm
3 opportunities
18:29
Message Claude...

Tools your CRM agent reaches for on EspoCRM, scoped per user.

CALL ANY TOOL
58 tools for CRM in EspoCRM: read and manage accounts, contacts, leads, opportunities, cases, calls, meetings, and tasks, and read campaigns, emails, and documents.
espocrm_account_cases_list
List account cases
List the Case records linked to an account. Returns total and list of records. Use this to see an account's cases. Get the account ID from espocrm_accounts_list.
Parameters
Name
Type
Required
Description
id
string
Required
Account record ID, from espocrm_accounts_list. Example: 6650f1a2b3c4d5e6f.
max_size
integer
Optional
Maximum records to return, up to 200. Example: 20.
offset
integer
Optional
Number of records to skip, for paging. Example: 0.
order
string
Optional
Sort direction. Example: desc. One of: `asc`, `desc`.
order_by
string
Optional
Field to sort by. Example: createdAt.
espocrm_account_contact_link
Account contact link
espocrm_account_contacts_list
List account contacts
espocrm_account_create
Create account
espocrm_account_delete
Delete account
espocrm_account_get
Get account
espocrm_account_update
Update account
espocrm_accounts_list
List accounts
espocrm_call_get
Get call
espocrm_campaigns_list
List campaigns
espocrm_case_create
Create case
espocrm_case_delete
Delete case
espocrm_case_get
Get case
espocrm_case_update
Update case
espocrm_contacts_list
List contacts
espocrm_document_get
Get document
espocrm_emails_list
List emails
espocrm_knowledge_base_article_get
Get knowledge base article
espocrm_lead_create
Create lead
espocrm_lead_delete
Delete lead
espocrm_lead_update
Update lead
espocrm_leads_list
List leads
espocrm_meeting_get
Get meeting
espocrm_opportunities_list
List opportunities
espocrm_opportunity_create
Create opportunity
espocrm_opportunity_delete
Delete opportunity
espocrm_opportunity_update
Update opportunity
espocrm_target_lists_list
List target lists
espocrm_task_get
Get task
espocrm_teams_list
List teams

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// EspoCRM tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["espocrm"], toolNames: [
    "espocrm_accounts_list",
    "espocrm_account_opportunities_list",
    "espocrm_task_create"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Find the Northwind account, list its open opportunities, and create a follow-up task" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["espocrm"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Find the Northwind account, list its open opportunities, and create a follow-up task" }],
  tools,
});

// Execute the tool call with the user's vaulted EspoCRM API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["espocrm"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Find the Northwind account, list its open opportunities, and create a follow-up task" }],
  tools,
});

// Tool call runs with the user's vaulted EspoCRM API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["espocrm"] }, pageSize: 100,
});

const agent = new Agent({
  name: "crm_agent",
  model: "gemini-2.5-pro",
  instruction: "EspoCRM tools scoped to this user",
  tools,
});

await agent.run("Find the Northwind account, list its open opportunities, and create a follow-up task");
Try these prompts
Copy any prompt into your agent. Each maps directly to a EspoCRM tool. Click to copy, paste into your agent, done.
Accounts and contacts
Copy the prompt
Copied
Find the Northwind account and list its contacts.
Copy the prompt
Copied
Create a new contact and link it to this account.
Copy the prompt
Copied
List the cases linked to this account.
Leads and opportunities
Copy the prompt
Copied
Create a lead from this inquiry.
Copy the prompt
Copied
List open opportunities sorted by amount.
Copy the prompt
Copied
Update the stage of this opportunity.
Activities
Copy the prompt
Copied
Create a task to follow up with this contact.
Copy the prompt
Copied
Schedule a meeting with this lead.
Copy the prompt
Copied
List my tasks that are not completed.
SEE HOW AUTH WORKS
Each user connects their own EspoCRM API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
EspoCRM
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
EspoCRM
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
EspoCRM
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
EspoCRM
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other CRM and sales connectors.
GTM and RevOps Teams
CRM AI agent
Reads the Granola transcript after every call, extracts next steps and updates the HubSpot record, drafts the follow-up in Gmail, and confirms in Slack, all on the rep's own delegated OAuth.
Test other agents
See the same per-user auth pattern across other CRM and sales connectors.
GTM
CRM AI agent
Turn each Granola call transcript into a HubSpot record update, a drafted Gmail follow-up, and a Slack recap.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared EspoCRM API key looks fine in a demo. In production every record update and delete looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
EspoCRM today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access EspoCRM as the user or through a shared key?
As the user. Each user connects their own EspoCRM API key once, and Scalekit sends it with every call. Audit logs attribute every record create, update, and delete to that user, not a shared service account.
Where is the EspoCRM API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in EspoCRM?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the list and get tools without espocrm_account_delete, espocrm_contact_delete, or espocrm_lead_delete. Scalekit also enforces scope checks before every API call.
What happens when a user revokes EspoCRM access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent see everything linked to an account in EspoCRM?
Yes. espocrm_account_contacts_list, espocrm_account_opportunities_list, and espocrm_account_cases_list return the contacts, opportunities, and cases linked to an account.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""espocrm"": {
""url"": ""https://mcp.scalekit.com/espocrm"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.espocrm]
url = ""https://mcp.scalekit.com/espocrm""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""espocrm"": {
""url"": ""https://mcp.scalekit.com/espocrm"",
""type"": ""http""
}
}
}