AWS MCP Server security isn’t a separate product decision — it’s an IAM decision you were probably already going to have to make, just with a new caller showing up on your CloudTrail logs. The Agent Toolkit for AWS wires your coding agent into thousands of AWS APIs through a single connection, and that connection runs on your existing credentials. Good news: no new trust boundary to invent. Bad news: if your IAM hygiene was already loose, an agent will now exercise that looseness faster and more often than a human ever did.
AWS MCP Server security starts with scoping the IAM identity
The AWS MCP Server authenticates with whatever credentials are active in your CLI environment — a named profile, an SSO session, an assumed role. That means the first architecture decision isn’t about the toolkit at all, it’s about which identity you point it at. Don’t hand a coding agent your default admin profile because it’s convenient. Create a dedicated role scoped to what agent-assisted development actually needs, and assume it explicitly before you launch a session.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AgentReadAndScopedWrite",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket",
"dynamodb:DescribeTable",
"dynamodb:Query",
"lambda:GetFunction",
"lambda:ListFunctions",
"cloudformation:DescribeStacks"
],
"Resource": "*"
},
{
"Sid": "AgentDenyIamAndOrgWrites",
"Effect": "Deny",
"Action": [
"iam:*",
"organizations:*",
"account:*"
],
"Resource": "*"
}
]
}
That’s a starting point, not a finished policy — swap in the actual services your project touches. The pattern that matters is the explicit deny block on iam, organizations, and account actions. An agent that can read your infrastructure to write better code doesn’t need the ability to create IAM users or touch org-level settings, and you should never rely on “it probably won’t suggest that” as your control. Layer a permissions boundary on top of the role if multiple engineers assume it, so no amount of policy sprawl over time lets it escape the original intent.
Audit what the agent actually calls, not what you assume it calls
Because the MCP Server authenticates with your IAM identity, every API call it makes is a normal, attributable AWS API call — which means CloudTrail already sees it. This is the single biggest advantage of AWS’s own MCP integration over a homegrown one: you don’t have to build a custom logging shim, you just have to look in the place you already look.
# Pull recent calls made under the agent's assumed role
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=Username,AttributeValue=agent-toolkit-role \
--max-results 20
# Narrow to a specific service if you're chasing something specific
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=EventSource,AttributeValue=s3.amazonaws.com
Point a CloudTrail Lake query or an Athena table at the trail if you want this queryable at scale instead of one lookup at a time — worth doing the moment more than one engineer is running agents against the same account. The goal isn’t paranoia, it’s the same operational discipline you’d apply to any automated system with API access: know what it called, when, and whether that matches what you expected it to do.

Guardrails for team-wide, not just solo, use
One developer running an agent against their own sandboxed account is low stakes. A team of thirty running agents against shared staging and production accounts is a different risk surface entirely, and it needs guardrails that don’t depend on every individual engineer configuring IAM correctly on their own machine.
- Push the deny list to an SCP. Don’t rely on per-role policies alone — a Service Control Policy at the OU level that blocks IAM/Organizations writes from non-break-glass roles catches misconfigurations before they matter, agent-generated or not.
- Separate “agent can read and suggest” from “agent can apply.” Let the agent query state and propose changes freely, but keep actual write/deploy actions behind a human running
terraform applyor a CI pipeline with its own review gate. The MCP Server gives the agent capability; your pipeline still decides what ships. - Standardize skill installation across the team. Run
aws configure agent-toolkit --yesas part of onboarding or your dev container build so nobody’s agent is working from an ad hoc, unaudited skill set that drifted from everyone else’s. - Rotate and review the dedicated role periodically. Treat it like any other service role — access reviews, unused-permission trimming, the works.
A worked incident scenario
Say an agent, working through a Lambda deployment task, suggests a resource policy that’s broader than it needs to be — not malicious, just the kind of “make it work” overreach a coding agent defaults to under time pressure, same as a tired engineer would. If it’s scoped correctly, the deny statements on iam:* mean the agent literally cannot apply that change itself even if it recommends it; a human has to knowingly widen the role first. If it somehow does get applied — because someone hand-approved a suggestion without reading it closely, which happens — the CloudTrail record from the earlier lookup-events query shows exactly which principal made the call, at what timestamp, with what parameters, and you’re debugging from evidence instead of guessing from a Slack thread asking “did anyone touch this Lambda policy recently.” That’s the entire value of getting the IAM boundary and the audit query set up before you need them, not after.
Why not just roll your own MCP integration
Some teams will look at this and ask why they wouldn’t just stand up their own MCP server that wraps the AWS SDK directly, with custom scoping built in from day one. It’s a fair question, and the honest answer is: you can, but you’re signing up to maintain security-critical glue code that AWS is already maintaining for you. The AWS MCP Server already handles the credential handoff correctly, already integrates with the MCP spec as it evolves, and already gets updated when AWS ships new APIs. A homegrown wrapper means you own patching it every time the protocol changes, every time a new service needs coverage, and every time someone finds an edge case in how you’re passing credentials through. That’s not a hypothetical maintenance tax — it’s the exact kind of undifferentiated plumbing engineering teams keep telling themselves they’ll get back to.
The actual architecture decision worth spending your time on isn’t whether to use AWS’s MCP Server — it’s how tightly you scope the identity behind it and how seriously you treat the CloudTrail record it generates. Get the IAM boundary right once, wire the audit query into whatever dashboard your team already watches, and the rest of this is AWS’s problem to maintain, not yours. Full IAM guidance for locking this down further lives in the Agent Toolkit for AWS User Guide.
At Enkompass (enkompass.net), this is our home turf. We’ve shipped production AI-agent tooling on AWS that actually ships code safely, not just demos well. If you’d rather have seasoned cloud people handle it instead of learning the hard way at 2 AM, let’s talk. Reach out through our contact page or call us directly at +1-828-436-5667 — we’ll help you turn this from a someday-project into a done-deal.
