MCP server for CRM and ERP: 10 controls before letting an AI agent act

Ten controls for securing identities, tools, approvals, and audit logs on an MCP server connected to CRM or ERP.

MCP server for CRM and ERP: 10 controls before letting an AI agent act

Short answer: an MCP server connected to a CRM or ERP must not become an all-powerful technical account controlled by text. Before production, identify every caller, restrict each tool to one business action, preserve source-system permissions, require approval for sensitive writes, and record the outcome. MCP standardizes the connection between an AI agent and tools; it does not replace OAuth or CRM and ERP controls.

Why an MCP server changes the security boundary

Model Context Protocol lets an AI application discover tools and resources and call them with structured parameters. In a business workflow, an MCP server may find a customer, read an invoice, prepare an order, or trigger an ERP action. The trust boundary now includes the user, MCP client, model, MCP server, downstream APIs, and every identity used.

The 28 July 2026 MCP revision introduced a stateless core and authorization hardening. This makes HTTP deployment easier but does not make an integration secure by default. The server remains a resource server and must verify tokens and permissions on every request. Kanteek’s guide to AI agents in Morocco helps define the process before tools are added.

10 controls before allowing an AI agent to act

1. Inventory MCP clients, servers, and tools

Maintain a register with owner, environment, protocol version, reachable systems, and purpose for every tool. Reject unapproved servers and tools that appear without review. A tool name, schema, or description change can alter agent behavior and should follow the same production change process as an API.

2. Select an explicit identity for each scenario

An assistant used by a person should usually act on behalf of that user so CRM or ERP rights remain effective. An autonomous agent needs its own workload identity with a documented scope. Avoid shared accounts and broad keys whose actions cannot be attributed.

3. Protect the server with OAuth and validate tokens

Treat a remote HTTP MCP server as an OAuth resource server. Validate signature, issuer, audience or resource, expiry, and scopes. Use PKCE for suitable authorization flows and reject tokens intended for another service. Never blindly pass the received token to a downstream API because this can create audience confusion and privilege escalation.

4. Keep scopes and tools narrow

Prefer crm.customer.read and erp.invoice.create over a generic scope. Separate reading, preparation, and execution. Do not expose a general query executor when a constrained business tool is enough. Read tools can be available more broadly; writes, deletion, and payments require stronger permissions and controls.

5. Preserve CRM or ERP authorization

The MCP server must not bypass roles, separation-of-duties rules, approvals, or record-level filters in the source system. Evaluate each call in the user or agent identity context. The guide to API integration in Morocco covers contracts, errors, and dependencies that should be documented.

6. Treat all retrieved content as untrusted

A CRM record, attachment, or web page can contain text asking the agent to disclose information or call another tool. Separate data from instructions, validate parameters server-side, and never let the model widen scope on its own. When comparing public material with private CRM data, collect public facts in a step without CRM access and pass only the necessary facts into a second private step.

7. Require approval for high-impact actions

Define a visible policy: automatic reading, preparation with a preview, then human confirmation to send, modify, delete, pay, or change permissions. The approval must show the action, target, and key parameters. Add idempotency keys so a retry or double click cannot create two invoices or orders.

8. Protect secrets, networks, and dependencies

Keep secrets out of prompts, source code, and logs. Use HTTPS, constrain outbound hosts, validate URLs, and protect HTTP transports from unexpected redirects or name resolution. Review SDKs and dependencies as a software supply chain. Kanteek’s guide to secrets management provides additional controls.

9. Log identity, decision, and outcome

Each call should record the user or workload identity, MCP client, server, tool, resource, authorization decision, approval if any, result, and correlation ID. Mask secrets and unnecessary data. Logs should reconstruct an action without retaining the entire conversation context.

10. Test abuse cases and prepare a stop mechanism

Before launch, test expired tokens, wrong audiences, insufficient scopes, unexpected parameters, prompt injection, repeated calls, and downstream outages. Verify client and tool revocation. Prepare a kill switch, secret rotation, read-only fallback, and incident procedure. The guide to prompt injection adds useful scenarios.

A decision matrix for CRM and ERP tools

  • Targeted read: may be automatic when identity and scope are verified.
  • Broad search or export: requires quotas, data filters, and traceability.
  • Create or update: needs preview, business validation, and idempotency.
  • Payment, deletion, or permission change: explicit approval and stronger control, or removal from the MCP catalogue.

Five production deliverables

  • Tool catalogue: owner, description, schema, risk, and downstream systems.
  • Access matrix: identities, roles, scopes, resources, and allowed actions.
  • Approval policy: automatic, confirmed, and prohibited actions.
  • Audit schema: logged fields, masking, retention, and alerts.
  • Test pack: normal flows, authorization failures, injections, retries, and revocation.

Kanteek can help frame these deliverables through its Artificial Intelligence, Automation, and Cloud & DevOps services. Production decisions must remain grounded in the company’s actual rules and data.

Mistakes to avoid

  • Sharing one broad API key across all users and agents.
  • Giving the MCP server more rights than the source system grants the user.
  • Confusing client authentication with authorization for each tool.
  • Allowing a write tool because its description tells the model to be careful.
  • Logging tokens, secrets, or complete records without a need.
  • Automatically enabling every new tool returned by a server.

Frequently asked questions

Does MCP replace a CRM or ERP API?

No. MCP standardizes how an agent discovers and calls capabilities. The MCP server often relies on existing APIs and must preserve their business controls.

Should an agent use a user account or service account?

An interactive agent should usually propagate the user identity. An autonomous agent needs its own limited identity. A shared all-powerful account should be avoided.

Is a read-only tool safe?

Not automatically. A read can expose personal data, pricing, or secrets. It still requires identity, scope, filters, and suitable logs.

When is human approval needed?

At minimum when an action creates a commitment, changes reference data, sends a message, makes a payment, deletes an object, or changes permissions.

Can a public MCP server connect directly to a CRM?

Only after verifying the server, dependencies, authorization model, and data policy. For a sensitive system, a governed gateway or private server is often easier to control.

Technical sources consulted