How Do AI Agents Connect to Systems Safely: Tools, Skills and MCP?
AI agents connect to systems safely when every tool they can call is limited to what the use case needs, runs with the requesting user's access rights and waits for a person before consequential write actions. The Model Context Protocol (MCP) standardizes how agents reach tools; it does not make any tool safe by itself.
Quick facts
- Type
- Deployment control over an agent's capabilities
- Key idea
- Tools turn model errors into actions: grant the minimum and gate the writes
- Where it lives in the process
- Tool allow-list and credentials per agent; approval user task before write service tasks; tool-call log
- Protocol
- Model Context Protocol specification, version 2026-07-28
- Main legal hook
- No law regulates MCP itself; GDPR Art. 25 and 32 and, for high-risk systems, EU AI Act Art. 15 (cybersecurity) apply
- Related concepts
- Least privilege, excessive agency, indirect prompt injection, human approval
- IAPP® AIGP® reference
- Body of Knowledge v2.1, IV.C (governing deployment and use) and IV.A (deployment options)
Why do tools change an AI agent's risk?
A chat assistant that only answers can mislead, invent facts or expose data typed into it. Give the same model tools and a new risk appears: its errors, or outputs manipulated by someone else, become actions in other systems, such as an updated record, a sent message or a payment. Confabulation, personal data in prompts and provider retention of conversations existed before; action is what tools add.
So first ask whether the task needs an agent at all. An agentic design earns its added risk when the work needs open-ended, multi-step planning over varied inputs. Known, stable steps on structured inputs, with fixed rules and exceptions sent to a person, fit a deterministic workflow better: a model planning each step adds unpredictability for no gain.
When an agent is warranted, weigh one combination above all: untrusted input plus a write tool. An agent that reads an inbox anyone can write to, and holds a tool that changes records, can be steered by an outsider. Approval steps, or separating the agent that reads from the one that acts, usually settle it; spot checks after the fact find the damage only once it is done.
Tools change an AI agent's risk from wrong answers to wrong actions, which makes tool access a deployment decision in its own right.
What is the Model Context Protocol in plain language?
The Model Context Protocol (MCP) is an open protocol for connecting AI applications to data and tools. This entry cites the specification version 2026-07-28. It has three roles:
| Role | What it is | Example |
|---|---|---|
| Host | The AI application people use; it creates the clients, enforces security policies and consent, and handles authorization decisions | A staff assistant |
| Client | A connector inside the host, linked to exactly one server | The assistant's link to the HR system |
| Server | A program, local or remote, that exposes capabilities | A small service wrapping the HR system |
A server offers tools (functions the model can call, such as get_leave_balance), resources (data for the user or the model) and prompts (templated messages and workflows). The tool is what a server offers; the program offering it is the server. Tools are reached through the protocol, not built into the model, so access can be granted or removed without changing the model.
Some agent platforms package instructions and scripts as skills, which an optional MCP extension lets servers offer. Govern a skill that calls tools as tool access.
The specification says tools represent arbitrary code execution, that hosts must obtain explicit user consent before invoking any tool, and that a human should always be able to deny a tool invocation. The protocol cannot enforce this; implementers must.
The Model Context Protocol standardizes how agents reach tools; safety still depends on how each tool is scoped and approved.
How do you apply least privilege to agent tools?
Least privilege gives an agent only the tools and permissions its use case needs. The OWASP Top 10 for LLM Applications 2025 calls the failure Excessive Agency (LLM06), rooted in excessive functionality, permissions or autonomy. Its mitigations become five rules:
- Remove what the use case never needs. An agent that answers status questions needs a read-only credential, not one that can also cancel. Approval suits agents whose job includes high-impact actions; for a capability the job never uses, removal beats gating.
- Run tool calls in the user's context. One broad service account lets every request reach every record, whoever asks. Running each request with the requesting user's own access rights limits the agent to what that person may see. Narrowing the account's fields or network location does not fix that scope.
- Enforce authorization in the downstream system. An instruction in the prompt, such as "never cancel orders", is not a control; OWASP calls the principle complete mediation. Never reuse a person's credentials, least of all a manager's.
- Keep an allow-list of approved servers and tools per agent, owned by a named role; block everything else.
- Limit damage too. The MCP specification requires servers to rate limit tool invocations, and logging detects misuse. But a cap limits volume, not what each call can do, and a log tells you only afterwards.
Least privilege for AI agent tools removes unneeded capabilities and scopes the rest to the requesting user, enforced outside the model.
Why treat read tools and write tools differently?
Classifying each tool as read or write shows where the strongest controls belong.
| Read tools | Write tools | |
|---|---|---|
| What they do | Retrieve data | Change records or trigger actions: update, send, pay, delete |
| Main risk | Exposing data the user should not see | Wrong or manipulated actions with real effects |
| Permissions | Scoped to the user's access rights | Narrower still, per action and amount |
| Human step | Usually none | Confirmation before sensitive operations |
The MCP specification says clients should prompt for user confirmation on sensitive operations and show tool inputs to the user before calling the server. The read/write split targets that confirmation: in the process it is an approval user task placed immediately before the service task that writes.
Two cautions. Read tools still need access control and logging, because reading can expose personal data. And logging, masking and rate limits apply to read and write tools alike, so they do not depend on the classification.
Separating read tools from write tools lets an AI agent read within its user's rights while every consequential write waits for confirmation.
How do you vet a third-party MCP server?
A public MCP server is third-party code that can act in your systems. Vet it first, like any other software component: who maintains it, where its source is, what access and credentials it needs and how it is updated. A registry listing is not vetting: the MCP project's own registry checks who owns a server's name, not its code, and does not remove servers for security vulnerabilities. Checking tool descriptions, adding approvals and logging calls are controls for a server you have already decided to connect.
Do not let a server describe itself into trust. Tool annotations are optional hints, such as readOnlyHint (the tool does not modify its environment) or destructiveHint. The specification warns that they may not describe a tool's behavior faithfully, and says clients must treat them as untrusted unless they come from trusted servers. A read-only label on an unvetted server proves nothing.
Two other facts are often mistaken for the reason. When a hint is missing, readOnlyHint defaults to false and destructiveHint to true, so the tool is assumed able to modify and destroy. And a server can change its tool list, announcing it with a list-changed notification. Both are true; the untrusted rule exists because a server can describe a tool wrongly.
In practice: pin the approved version, re-review when the tool list changes, and keep the server on the allow-list only while it has an owner.
A third-party MCP server earns trust through vetting of its source and access, never through its own annotations.
How does prompt injection reach an agent through its tools?
Indirect prompt injection hides instructions in content the agent reads: an email, a web page, a file or a tool's output. OWASP LLM01:2025 (Prompt Injection) says it is unclear whether fool-proof prevention exists. Its mitigations include constraining model behavior, segregating and identifying external content, least privilege, human approval for high-risk actions and adversarial testing.
Each defense has a limit:
- Input filters catch known phrasings and miss new ones and new hiding techniques.
- A sender allow-list fails when an approved sender's mailbox is compromised.
- Lines in the system prompt, or a larger model, reduce injection but do not prevent it.
- Red-team exercises on a set schedule are a sound operating control (NIST AI RMF Playbook, MANAGE 4.1), but they measure the risk rather than limit the harm.
What limits the harm is human approval of the binding action: if a buyer approves every purchase order, injected text alone cannot send one. Least privilege adds a second layer, because an injected instruction finds few tools to misuse.
Prompt injection through tool outputs cannot be reliably filtered out, so AI agent governance limits what an injected instruction can make the agent do.
Exam focus
Tool governance maps to BoK v2.1 IV.C (governing deployment and use), and the decision to give an agent tools at all to IV.A. Scenario questions name a capability and ask for the control: an unneeded write permission, a broad service account, an unvetted server, a hidden instruction in an email. The common trap is a real control that misses the stem's problem, such as approval for a capability the use case never needs. Practise in the Domain IV drill.
Practise this AIGP domain →Check your understanding
A few practice questions on this entry, drawn at random.
FAQ
What is an MCP server?
An MCP server is a program, local or remote, that exposes tools, resources and prompts to AI applications through the Model Context Protocol. The AI application is the host, and it creates one client per server connection. A function the server offers, such as a lookup, is a tool; the program offering it is the server.
Is the Model Context Protocol secure?
MCP sets security principles, such as user consent before tool calls and treating tool descriptions as untrusted, but it cannot enforce them at the protocol level. Safety depends on the implementation: vetted servers, least-privilege credentials, user-context access, confirmation before sensitive writes and logging of tool use.
Can I trust an MCP tool marked read-only?
Only if the server is trusted. Tool annotations such as readOnlyHint are hints that may not describe the tool faithfully, and the MCP specification says clients must treat them as untrusted unless they come from trusted servers. Vet the server's source and access first; the label proves nothing on its own.
How do you stop prompt injection in AI agents?
No method is known to prevent it fully, as OWASP LLM01:2025 notes. Reduce it by separating and marking external content, filtering and testing, and limit its effect with least-privilege tools and human approval before high-risk actions, so that injected text alone cannot trigger a binding action.
Should an AI agent use a service account or the user's own access rights?
Where the agent acts for different people, run each tool call with the requesting user's own access rights. One broad service account lets every request reach everything the account can see, whoever asks. OWASP LLM06:2025 recommends executing extensions in the user's context for this reason.
Sources
- Model Context Protocol specification, version 2026-07-28: Overview (Extensions; Security and Trust & Safety), Architecture, Server Features: Tools, and Schema (ToolAnnotations).
- Model Context Protocol. The MCP Registry Moderation Policy.
- OWASP Top 10 for LLM Applications 2025, LLM06:2025 Excessive Agency.
- OWASP Top 10 for LLM Applications 2025, LLM01:2025 Prompt Injection.
- NIST. AI RMF Playbook, MANAGE 4.1 (red-teaming exercises at a prescribed cadence).
- IAPP. AIGP Body of Knowledge, version 2.1 (effective 2 February 2026), competencies IV.C and IV.A.
- Last reviewed