All posts
Security

MCP in Production on AWS: Giving Agents Tools Without Giving Away the Keys

By

October 25, 2026

7 min read

The Model Context Protocol made connecting agents to tools easy, which is exactly the problem. The risks that matter in production (tool output as an injection channel, over-broad tokens, unreviewed servers) and how Gateway, Identity and Policy on AgentCore, or your own controls, contain them.

MCP
AI Agents
Bedrock AgentCore
Prompt Injection
Security

Why MCP changes the threat model

An MCP server exposes tools an agent can call: read a ticket, query a database, send a message. Before MCP, every integration was code someone wrote and reviewed. Now a new capability is a configuration line, and an agent can be given dozens of tools from servers nobody on the team has read. The agent then decides, from text, which to call and with what arguments.

Want a second opinion on this for your system?

Book a free 30-minute call. You'll leave knowing what we'd do first and roughly what it costs, whether or not you hire us.

The risks that actually bite

  • Injection through tool output: a ticket, email or web page the agent reads contains instructions, and the agent follows them with whatever other tools it holds. This is the most common real-world failure, and no prompt fully prevents it.

  • Over-broad credentials: a server configured with an admin token gives every agent that uses it admin rights, whatever the user asking was allowed to do.

  • Unreviewed servers: a third-party MCP server is code running with your credentials. Treat it like any dependency — pin versions, review changes, prefer official servers.

  • Tool descriptions as instructions: a server's tool descriptions are sent to the model, so a malicious or careless description can steer the agent.

Controls that work

  1. Act as the user, not as the agent. Pass the user's own scoped credentials to tools — AgentCore Identity's on-behalf-of flows exist for this — so the agent can never do more than the person who asked.

  2. Put a deterministic check in front of consequential tools. AgentCore Policy evaluates every tool call through Gateway before it runs; elsewhere, a small authorisation layer in your own tool server does the same job.

  3. Separate reading untrusted content from taking actions. An agent that has just read an external email should not, in the same step, hold a tool that sends money.

  4. Require human confirmation for irreversible actions, shown as a clear summary of exactly what will happen.

  5. Log every tool call with its arguments and the identity behind it, and alert on unusual patterns — new tools, new destinations, volume spikes.

  6. Centralise tools behind one gateway with an allowlist, rather than letting each agent load servers from its own configuration.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of October 25, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.