MCP security: Risks, authentication and gateways

Richard McKay

An AI assistant that summarizes your open alerts saves time. One that can also run scripts on every endpoint you manage is a different proposition. Model Context Protocol (MCP) is the connector that gives AI agents that kind of reach. MCP security is the work of deciding how far that reach should go. 

Most IT teams meet MCP the same way. A technician connects an assistant to the remote monitoring and management (RMM) platform or the ticketing system to save a few clicks. Nobody reviews the server, the credentials or the permissions. The shortcut holds up until the agent is tricked into doing something nobody asked for. 

This guide covers the MCP security risks that matter most, how MCP authentication should work and what an MCP gateway can and cannot do. It ends with a seven-step checklist you can start this week.  

What MCP security actually covers 

MCP security covers every link between an AI model and the tools it can call. That includes the client, the server, the credentials passing between them and the text the model reads along the way. 

That last part sets MCP apart from a normal integration. A traditional API integration runs fixed code. An MCP-connected agent chooses which tool to call based on language, and someone else can write that language. 

The NSA’s guidance on MCP, published May 20, 2026, makes a similar point. It says dynamic tool invocation, implicit trust and shared context create risks that established cyber defense strategies fall short of covering. 

The protocol also leaves the basics optional. The MCP specification states that authorization is optional, so a server can be reachable with no login at all. Local servers that run over STDIO (standard input/output) are told to take credentials from the environment instead, which in practice usually means an environment variable. 

6 MCP security risks to plan for 

The OWASP MCP Top 10 lists 10 risk categories. It is still in beta, so names and details may change. Even so, it gives IT teams a shared vocabulary. These six map most directly to day-to-day IT operations. 

Hidden instructions in tools and data 

A model reads tool descriptions and returned content as context to act on. OWASP lists tool poisoning (MCP03) and prompt injection through contextual payloads (MCP06) as separate risks. In the first, the tool itself is tampered with. In the second, the content the agent processes carries the attack. 

IT operations runs on text that outsiders can write: ticket bodies, emails, event log entries and device names. An agent that reads a ticket and then calls a tool can be steered by whoever wrote that ticket. 

Leaked or long-lived credentials 

OWASP’s MCP01 covers hard-coded credentials, long-lived tokens and secrets that end up in model memory or logs. Many MCP servers read API keys from environment variables or config files. One leaked file then exposes everything that key can reach. 

Permissions that grow over time 

OWASP calls this privilege escalation through scope creep (MCP02). A pilot starts read-only. Someone adds a write tool for one urgent task and never removes it. Months later the agent can do far more than anyone approved. 

Untrusted servers and dependencies 

An MCP server is code, often written by a stranger and updated without notice. OWASP treats software supply chain attacks (MCP04) and command injection (MCP05) as separate risks. A server that was safe the day you approved it may not be safe after its next update. 

Shadow MCP servers 

OWASP defines shadow MCP servers (MCP09) as unapproved deployments that run outside formal security governance. It is shadow IT with a new interface. Developers and technicians set them up for convenience, often with default credentials or permissive settings. You cannot secure a server you do not know exists. 

No record of what the agent did 

OWASP lists lack of audit and telemetry as MCP08. Without logs of tool calls, basic questions go unanswered after an incident. Who asked? Which tool ran? What changed? 

How MCP authentication should work 

Authentication answers who is calling. Authorization answers what that caller may do. MCP needs both, and the specification sets firm rules for remote servers that use authorization. 

Under the current specification, a remote server that supports authorization follows an OAuth 2.1 model. Its security requirements say clients must use Proof Key for Code Exchange (PKCE), which stops a stolen authorization code from being redeemed by someone else. Clients must also send a resource parameter that names the server a token is meant for. Servers must reject tokens that were not issued for them. 

Two rules matter most in practice. 

First, never pass through tokens. If an MCP server forwards the token it received from a client to another API, it breaks a trust boundary. That invites the confused deputy problem, where a downstream service trusts a request, it should not. The specification forbids it. 

Second, keep tokens short-lived. The specification says authorization servers should issue short-lived access tokens, which limits the damage when one leaks. 

Many IT tools do not use OAuth for machine access. They use API keys. That works if you treat each key as a privileged identity. Give every integration its own key, the narrowest scope the tool allows, a named owner and a review date. The specification’s scope guidance points the same way. Request only the scopes the task needs. 

What an MCP gateway can and cannot do 

An MCP gateway sits between AI clients and MCP servers. Instead of every client talking directly to every server, traffic flows through one control point. 

That gives IT teams one place to apply authentication, allow or deny specific tools, log calls and limit request rates. It also lets you rotate a credential once instead of on every laptop. 

A gateway has limits, and they matter as much as the benefits. 

It only sees the traffic routed through it. A server configured directly inside a desktop app never touches the gateway, so you still need an inventory of what runs on your endpoints. 

It cannot judge intent. A prompt injection that tells an agent to call an allowed tool with harmful arguments looks like a normal request. Tool-level limits and approval steps have to cover that gap. 

It is also a privileged system. A gateway that brokers credentials becomes a high-value target. Secure and monitor it the way you would your identity provider. 

The practical lesson is to design as if the agent will eventually be fooled. Then ask what the worst outcome would be and shrink it with scoped access, read-only defaults and approvals. 

Securing MCP in an RMM environment 

RMM platforms show why scoping matters. They can run scripts on every managed device, so the permissions behind one API key decide how much damage a fooled agent can do. 

Picture an MSP with 40 client sites. A technician connects an AI assistant to the RMM through a community-built MCP server. Public listings for community-built Datto RMM servers show them reading an API key and secret from environment variables. If that key belongs to an administrator, the assistant inherits administrator reach across all 40 sites. The Administrator security level in Datto RMM grants full and unlimited access to all functionality and devices. 

Now suppose the assistant is triaging alerts. Alert details can include raw event log content, and that text can originate on a client’s machine. A crafted entry could carry instructions aimed at the assistant rather than at a technician. 

Datto RMM gives administrators controls that limit that outcome. Its API uses OAuth 2.0, and access tokens expire after 100 hours. API keys are generated per user, and each key carries an API Security Level and an API Component Level that define what it can do. A July 30, 2026 update describes both settings as restrictions an administrator can place on the key, independent of the user’s Security Level memberships. 

Security levels help too. Datto RMM sets permissions to view for every area when you create a new security level, so a read-only starting point takes little effort. Write actions such as quick jobs sit behind Manage permission on Active Jobs. The API documentation lists the minimum permissions for each endpoint, including that one. 

Cleanup is documented as well. Keys belonging to a user who is inactivated or deleted stop working. Regenerating a key invalidates the old one, and deleting a key revokes access altogether. That gives you a kill switch when something looks wrong. 

Community-built servers are third-party projects, so the review is yours. Read the code, pin the version and treat the key you hand it as a privileged identity. 

What MCP security means for MSP revenue 

Clients are already asking for AI. Kaseya’s 2026 State of the MSP Report found that 48% of MSPs rank AI and automation as their clients’ top need for 2026. Only 13% earn meaningful revenue from it so far. 

Clients who ask for AI will also ask how it is secured. An MSP that can show scoped access, approval steps and tool-call logs has a stronger answer than one that says it is being careful. Those controls also match what SOC 2 and ISO 27001 auditors typically look for: access control, logging and supplier review. 

Treat the first client conversation as a pilot. Pick one low-risk site, document the controls and measure the time saved against the approvals triggered. 

A 7-step MCP security checklist 

You do not need a security team of 20 to start. These steps are ordered by effort, and the first three cost little beyond time. 

  1. Inventory every MCP server. Check AI app configurations on managed endpoints, not just what IT approved. Record each server, its owner and its purpose in your documentation platform. IT Glue tracks assets, passwords, policies and procedures in one place. 
  1. Allowlist approved servers. Pin versions and review changes before updating, so a silent update cannot alter behavior after sign-off. 
  1. Give each integration its own identity. Use one key or OAuth client per integration, never a shared administrator account, so you can revoke one without breaking the others. 
  1. Start read-only. Add write tools one at a time, each with a named business reason. Require human approval for destructive actions. 
  1. Keep secrets out of config files. Use a vault or password manager with access tracking, prefer short-lived tokens and set a rotation date. 
  1. Log every tool call. Record who asked, which agent acted, which tool ran and with what arguments. Send the logs where your team is already looking. 
  1. Test before you trust. Run a pilot on one low-risk site. Plant an instruction in a test ticket and confirm the agent ignores it or the approval step catches it. Track how often approvals fire so you can tune controls without removing them. Know in advance where the keys live and who can revoke them. 

Check out Kaseya’s MCP servers and skills.  

MCP security questions, answered 

Here are short answers to the questions IT teams ask most. 

Is MCP secure by default? 

No. The specification makes authorization optional, and the NSA’s guidance says the protocol requires careful implementation. A well-configured deployment can reach an acceptable level of security, but that depends on the controls above. 

How is MCP security different from API security? 

API security checks who is calling and whether a request is well formed. MCP adds a model that picks tools based on language. That means you also have to control what the model reads and which tools it may call. Both layers apply. 

Do I need an MCP gateway? 

If more than a few people connect AI to company tools, a gateway gives you one place for access rules and logs. For a single pilot, scoped credentials and logging may be enough. Either way, inventory the servers on your endpoints. 

What is shadow MCP? 

Shadow MCP means unapproved MCP servers running outside your security governance. OWASP lists it as MCP09. The fix starts with an inventory, then an allowlist. 

Where to start this week 

Pick one MCP connection that already runs in your environment. Find out who set it up, which key it uses and what that key can do. If the answer is “everything,” you have your first fix. 

Want to see scoped API access in action? Request a demo. 

Key Takeaways 

  • MCP standardizes how agents reach tools but leaves authentication, scoping and logging to you. 
  • Give every integration its own identity, start read-only and require approval for destructive actions. 
  • A gateway helps, but you still need an endpoint inventory and tool-level limits.  

Table of Contents 

One Complete Platform for IT & Security Management

Kaseya 365 is the all-in-one solution for managing, securing, and automating IT. With seamless integrations across critical IT functions, it simplifies operations, strengthens security, and boosts efficiency.

10 Dark Web Facts That You Need to Know

10 Dark Web Facts That You Need to Know

Read now
10 Facts About AI & Cybersecurity That You Need to Know

10 Facts About AI & Cybersecurity That You Need to Know

Read now
10 Facts About Phishing Risk & Dangerous Employee Behavior That You Must See

10 Facts About Phishing Risk & Dangerous Employee Behavior That You Must See

Read now