Connecting AI Agents to Business Systems: The Complete Guide
An agent that can only chat answers questions. An agent that can reach your ERP, CRM and document store gets work done: it reads an order, checks stock, drafts a quote. This guide sets out the four ways agents connect to business systems and which one fits which kind of system, so that you can make the choice per system rather than by habit.
What does connecting an AI agent actually mean?
Connecting an agent means giving it a defined set of tools that read data from a system or trigger actions in it. The model decides which tool to call; your code executes the call, with your credentials and your permissions. Integration is therefore mostly a question of interface and authorisation, not of the model itself.
In business workflows, tools tend to fall into four groups:
- Read: fetch a customer record, list open orders, retrieve a product data sheet.
- Search: find tickets with a similar fault description, find past quotes for a part number.
- Draft: create a draft quote, save a reply as an email draft.
- Act: place an order, change a status, send an email.
The further down the list, the more damage a wrong call can do. That gradient drives every decision in this guide. For what such agents look like inside sales, service and knowledge teams, see the overview of AI agents for business workflows.
What are the four integration options?
There are four basic options: call the system's API directly (usually REST or OData), put an MCP server in between, use an integration platform as a broker, or go straight to the database. Most organisations end up combining them. What matters is choosing one deliberately for each system instead of defaulting to whatever was used last time.
| Option | Good fit | Main risk |
|---|---|---|
| REST/OData API | Documented API, one agent uses it | Over-broad permissions |
| MCP server | Several agents or tools share the same functions | Trusting tool descriptions blindly |
| Integration platform | Many systems, existing workflows, few developers | Platform becomes a master key |
| Database | Legacy system without API, reporting only | Bypasses the application's business rules |
Option 1: Call the REST or OData API directly
Many current business applications expose an HTTP API. Microsoft Graph and a number of ERP systems use OData, a protocol for REST APIs that, according to the OData documentation, has been standardised by OASIS and approved as an ISO/IEC International Standard. Your agent code defines a tool such as get_open_orders(customer_id) and calls exactly one endpoint behind it.
The upside is full visibility: every call sits in your own code. The downside is duplication: each new function is new code, and if you build several agents you end up writing the same tools more than once.
Option 2: An MCP server in between
The Model Context Protocol is an open protocol for exposing tools and data to language models. The specification, revision 2026-07-28, defines hosts, clients and servers; servers offer resources, prompts and tools, and messages use JSON-RPC 2.0. You wrap system functions once in a server, and any MCP-capable agent can use them.
Setting up, securing and running such a server is covered in MCP Servers: Connecting AI Agents to Systems the Standard Way. This guide only answers when MCP is the right option out of the four.
Option 3: An integration platform as broker
Integration platforms such as n8n already connect many systems through ready-made connectors. Instead of calling the ERP itself, the agent triggers a platform workflow. The n8n MCP Server Trigger documentation describes how n8n can make workflows available as tools to MCP clients, with bearer or header authentication for clients.
This reuses connectors you already maintain and lets operations teams contribute. The catch is that the platform often holds credentials for many systems. An agent with broad access to the platform may effectively reach everything connected to it, unless you expose only narrowly scoped workflows.
Option 4: Direct database access
When a system has no usable API, the database is what is left. For reporting, that is fine: a read-only role, a view over the relevant tables, done. Writing is a different matter, because it bypasses validation, posting logic and audit trails in the application. An order inserted straight into a table may be invalid from the application's point of view.
Which option fits which type of system?
Three questions decide it: does the system have a documented API, how many agents will use the functions, and does the agent need to write? For common system types this gives a sensible default. Deviate from it when you have a concrete reason, and write that reason down.
ERP (for example SAP S/4HANA or Microsoft Dynamics 365): use the official OData or REST APIs with a dedicated service user. Purchase orders, postings and similar writes only as drafts or behind approval. SAP-specific points such as API choice, communication users and roles are covered in Connecting an AI Agent to SAP S/4HANA.
CRM: usually solid REST APIs. Reading is low-risk, and writes such as activities, notes or stage changes are easy to scope. If a sales agent and a service agent share the same CRM functions, a shared MCP server starts to make sense. See how an agent supports the pipeline on the page about AI agents for sales.
Document and knowledge stores (SharePoint, Confluence, file shares): the interface matters less than inherited permissions. The agent should only find what the person asking could open themselves. That argues for delegated access on behalf of the user rather than a service account that can read everything. More on this use case under AI agents for knowledge management.
Ticketing and service systems: REST APIs, usually well documented. The agent reads tickets and history and writes draft replies and categories. Sending anything to customers stays behind approval, as described for AI agents in technical service.
Legacy systems without an API: read through a database view or scheduled exports; write through the system's import interface, or not at all. If an integration platform already talks to the legacy system, it is often the cleaner broker.
One workflow, many systems: when a process such as quotation touches CRM, ERP and documents, a layer of MCP servers or platform workflows gives the agent one consistent tool list instead of three different styles of API.
How does an integration work under the hood?
Every integration is built from the same parts: a tool definition the model sees, execution code that calls the interface, an identity with permissions in the target system, and logging. The model only proposes calls. Execution and checks happen outside the model, in code you control and can test.
The parts in more detail:
- Tool definition: name, description, typed parameters. Narrow beats generic:
get_order_status(order_id)rather thanrun_query(sql). - Execution: code or an MCP server that validates parameters, builds the API request and returns only the fields needed.
- Identity: a service account, or delegated rights on behalf of the signed-in employee.
- Approval: for write tools, a step where a person confirms, either in the agent or in the target system.
- Audit log: which tool was called with which parameters, what came back, who approved it.
A narrowly scoped tool definition, in the shape most agent frameworks and model APIs expect in some form:
{
"name": "get_open_orders",
"description": "Lists open sales orders for one customer. Read-only.",
"input_schema": {
"type": "object",
"properties": {
"customer_id": { "type": "string", "description": "Customer number from the CRM" }
},
"required": ["customer_id"]
}
}
This tool cannot change orders, read other tables or run arbitrary filters. That narrowness is not a limitation to work around; it is the actual protection.
What permissions should a connected agent have?
Exactly those its workflow needs, and nothing more. OWASP names excessive functionality, excessive permissions and excessive autonomy as the root causes of "Excessive Agency", and recommends minimal tools, minimal permissions and human approval for high-impact actions, among other measures.
The mitigations from OWASP LLM06:2025 Excessive Agency, applied to business systems:
- Only the tools needed: an agent that prepares quotes has no business holding a tool that cancels invoices.
- Only the functionality needed: read where reading is enough. A summarising agent gets no write access.
- No open-ended tools: no free-form SQL, no shell, no generic HTTP request tool.
- Minimal permissions downstream: a read-only database role, an API user that sees only the objects in scope.
- Run in the user's context when personal data or documents are involved.
- Human approval for anything with external effect or financial impact.
- Enforce authorisation in the target system, not in the model's judgement.
In Microsoft 365, the two permission types make the difference. The Microsoft Graph permissions overview explains that an app with delegated permissions cannot access anything the signed-in user could not, whereas an app with the Files.Read.All application permission can read any file in the organisation. Microsoft recommends the delegated model from a least-privilege perspective whenever it meets the requirements.
For databases, row-level security helps. The PostgreSQL documentation on row security policies states that once row security is enabled on a table and no policy exists, a default-deny policy applies. Note the exception: superusers, roles with BYPASSRLS and normally the table owner bypass the policies, so the agent's role must be none of these.
-- Read-only role for the agent
CREATE ROLE agent_reader LOGIN PASSWORD :'agent_pw';
GRANT SELECT ON v_open_orders TO agent_reader;
-- nothing else, no BYPASSRLS
What should you watch for with MCP servers?
MCP standardises the connection, not the security. The specification states that tools represent arbitrary code execution and must be treated with caution, and that tool descriptions should be considered untrusted unless they come from a trusted server. Enforcing the rest is the implementer's job, and the specification says so plainly.
Three points matter most in a business setting:
- Consent before tool calls: the MCP specification says hosts must obtain explicit user consent before invoking any tool. In automated runs, that translates into deciding up front which tools may run without asking.
- No token passthrough: the authorization specification (revision 2025-06-18) requires an MCP server to accept only tokens issued for itself and forbids passing the client's token on to upstream APIs. Calling your ERP needs a separate token.
- Vet third-party servers: a community MCP server for your CRM is someone else's code running with your credentials. Review it like any other software before it goes near production data.
Mind the versions, too. MCP revisions are dated; the versioning page lists 2026-07-28 as the current revision (as of November 2026), with a documented compatibility path for servers and clients built on older revisions.
What needs to be in place first?
Before connecting an agent you need three things: a clearly scoped process with defined inputs and outputs, access to a test or sandbox instance of the target system, and someone who is allowed to grant permissions in that system. Missing any of them, the project stalls on coordination long before it stalls on code.
In more detail:
- Process description: what the agent reads, what it produces, who checks the result. One sentence per tool is enough.
- Interface documentation: API reference, authentication method, rate limits. For legacy systems, the data model of the relevant tables.
- Test environment: agents make mistakes while you tune them. A test tenant or copy keeps those mistakes out of production.
- Service identity and permission model: agreed with IT and the system owner.
- Data protection and employee representation: if the agent processes personal data or evaluates employees' work, involve your data protection officer early, and in countries such as Germany the works council as well. This is orientation, not legal advice.
- Where the model runs: whether the language model runs in a public cloud or in your own data centre determines which data it may see at all. Background on that choice under sovereign AI.
How do you roll it out step by step?
Move from read to write and from one system to several. The first agent reads from one system and produces drafts; only once its results are stable do write permissions and further systems follow. That way each step can be checked on its own before the next one adds risk.
- Define the process and tools. Three to five tools, each with one job. Flag the ones that write.
- Pick the option per system. Using the logic above: API, MCP, platform or database.
- Create a service identity. Minimal rights, separate from personal accounts, with its own audit trail in the target system.
- Build a read-only prototype. Against the test system, with realistic sample data. Check that the agent picks the right tools with the right parameters.
- Trim the responses. Return only the fields the agent needs. That protects data and keeps the context small.
- Introduce write tools as drafts. The agent creates drafts; a person approves.
- Add logging and limits. Record every call, cap calls per time window, alert on unusual patterns.
- Only then add more systems. Move tools that recur across agents into an MCP server or platform workflow.
In our own operations, the move from draft to automatic execution works best as a per-tool decision rather than a per-agent one: an agent can file notes on its own and still need approval for every outgoing email.
What are the limits and risks?
The biggest risks come from over-broad permissions and manipulated input, not from the interface itself. An agent that reads emails or documents can encounter hidden instructions and follow them. Whatever the agent is technically allowed to do, it may end up doing on someone else's behalf.
Concrete limits:
- Prompt injection via content: a supplier quote with hidden text can nudge the agent into a tool call. Defence: narrow tools, approvals, authorisation checks in the target system.
- Database writes skip business rules: direct inserts can create records the application considers invalid. Write through the application.
- Master-key effect: an integration platform or central MCP server with rights across many systems is an attractive target. Scope access per agent.
- API changes: system upgrades rename fields or retire endpoints. Without tests, nobody notices until the agent returns wrong data.
- Runaway loops: an agent calling the same tool again and again with slightly different parameters loads the target system and the model budget. Set rate limits.
- Not every process needs an agent: if the sequence never changes, a conventional workflow without a language model is simpler, cheaper and more predictable.
Where should you start?
Start with a process in which the agent only reads and drafts, on a system with a documented API. In most organisations that is the CRM or the ticketing system. You sort out permissions, test environment and logging once, and the next agent builds on that groundwork instead of starting over.
A short starting checklist:
- Can the process be described in one paragraph, with input and output?
- Does the target system have a documented API and a test environment?
- Who creates the service identity, and who approves its permissions?
- Which tools read, and which write?
- Where are calls logged, and who reviews them?
To go deeper, the guide to MCP servers covers the standardised route, and the guide on connecting an agent to SAP S/4HANA covers the ERP side using SAP as the example. Further system guides are listed in the guides section.
Frequently asked questions
Do I need an MCP server for every agent?
No. MCP pays off when several agents or tools share the same system functions. A single agent with a handful of well-defined calls can often call the REST API directly from its own code.
Can an agent use an admin account to save time?
It should not. Give the agent its own service identity with only the permissions its workflow needs, because a manipulated input can trigger anything the account is allowed to do.
What usually slows down the first integration?
Access and approvals rather than code: getting a service account, agreeing a permission model and finding a test environment. A read-only prototype against a documented API is the smallest technical step.
What about legacy systems without an API?
Read through a database view, scheduled exports or an integration platform that already talks to the system. Writes should go through the system's own import or posting logic, never through direct table updates.
Sources
- Model Context Protocol – Specification, revision 2026-07-28 modelcontextprotocol.io
- Model Context Protocol – Versioning modelcontextprotocol.io
- Model Context Protocol – Authorization (revision 2025-06-18) modelcontextprotocol.io
- OWASP Top 10 for LLM Applications 2025 – LLM06: Excessive Agency raw.githubusercontent.com
- Microsoft Learn – Overview of Microsoft Graph permissions learn.microsoft.com
- OData – Documentation odata.org
- PostgreSQL 18 Documentation – Row Security Policies postgresql.org
- n8n Docs – MCP Server Trigger node docs.n8n.io