Enterprise
MCP Security for AI Developer Tools
MCP security starts with least-privilege tool access. Review what each tool can read or change, who approves calls, where secrets live and how actions are logged. Treat every new MCP server as a small integration with real data access.
On this page
What controls matter for MCP security review?
MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. security review is a governance question before it is a tooling one. Four controls decide whether security can sign off: who has access, what the policy allows, how data moves, and whether anyone is measuring adoption. The table assigns each an owner.
- Control
- Identity
- Owner
- IT
- Evidence
- SSOSingle Sign-On. One company login (usually via SAML or OIDC) instead of a separate password per tool. Press Enter for the full definition., SCIMSystem for Cross-domain Identity Management. A standard for automatically creating and removing user accounts when people join or leave. Press Enter for the full definition. or membership source is defined
- Control
- Policy
- Owner
- Engineering leadership
- Evidence
- Allowed repos, tools and review rules are documented
- Control
- Security
- Owner
- Security team
- Evidence
- Data flow, secrets boundary and audit path are reviewed
- Control
- Adoption
- Owner
- DevEx
- Evidence
- Pilot metrics and training path are live
| Control | Owner | Evidence |
|---|---|---|
| Identity | IT | SSOSingle Sign-On. One company login (usually via SAML or OIDC) instead of a separate password per tool. Press Enter for the full definition., SCIMSystem for Cross-domain Identity Management. A standard for automatically creating and removing user accounts when people join or leave. Press Enter for the full definition. or membership source is defined |
| Policy | Engineering leadership | Allowed repos, tools and review rules are documented |
| Security | Security team | Data flow, secrets boundary and audit path are reviewed |
| Adoption | DevEx | Pilot metrics and training path are live |
The owners column matters more than the controls themselves, which I realise is a slightly odd thing to say about a governance table. But a control with nobody's name against it is a control nobody checks, and it fails at exactly the moment someone has to answer for it. The usual mistake is assuming security owns all four. They don't. Identity is IT's system of record, policy is an engineering-leadership call about what the team is allowed to ship, and adoption belongs to whoever owns developer experience. Security owns the data-flow question and the audit path, and they will ask about both.
Data flow is the one that stalls approvals, so answer it before the meeting rather than during it. Write down what the tool can read, what it can change, what leaves your network and where any of it is retained. Most of that comes straight from the vendor's documentation and your own configuration. It's dull work, but it turns a vague objection into a specific one, and specific objections are the kind you can actually close.
Interactive diagram. Tab through its regions; each focused region shows its detail in the panel below.
This is covered hands-on in MCP, Plugins and Integrations — 6 short modules, free to read.
How should the rollout work?
A rollout works when it starts narrow and earns its expansion. One team, one repo and a few real tasks in week one, with policy and training in place before anyone scales it wider.
- 1Week 1: pick one team, one repo and three realistic tasks.
- 2Week 2: write the workflow standard from the pilot.
- 3Week 3: train champions and add policy guardrails.
- 4Week 4: expand only after quality, cost and review load are visible.
Four weeks is a shape, not a rule. The dates matter much less than the order, and the reason to start with a single team is that those first two weeks are mostly you finding out what your standard should even say. You can't write that from a pilot too broad to watch properly. Pick the team that will tell you when something doesn't work, rather than the team most likely to hand you a good result.
Expansion is where this usually goes wrong. Not because anyone's careless, either — the pilot went well, someone senior noticed, and now there's pressure. That's a hard thing to say no to. Before you add teams, though, check that you can answer three things with numbers instead of impressions: did review load go up or down, what does a developer actually cost per month, did quality hold. If any of those is a shrug, another fortnight of the same pilot beats a rollout you have to walk back.
How do hooks give me a deterministic control layer?
MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. approvals and least-privilege scoping reduce risk, but they still depend on the model behaving. Hooks are different: they are actual shell scripts that execute deterministically at lifecycle points, so a policy fires whether or not the model cooperates.
There are roughly a dozen trigger points across the IDE and CLI. The ones that matter most for security:
- Prompt submit - inspect the prompt before it ever reaches the model.
- File read / file write / file delete - gate what the agent can touch.
- MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. tool call and before MCP access - vet an external call before it runs.
- Terminal tool call - gate shell commands the agent wants to run.
- Stop hook - runs when an agent finishes a turn, for logging or final checks.
A prompt-submit hook can scan each prompt for PIIPersonally Identifiable Information. Data that can identify a person (names, emails, SSNs); regulated and sensitive. Press Enter for the full definition., API keys or secrets and, if it finds any, halt the prompt before it reaches the model and return a custom error.
Because the hook is code, a violating cloud agent simply cannot proceed - the check is not advisory.
Hooks also run in cloud agents, and they can be pushed centrally so a security team builds the control once and ships it across every team and agent type. A before-prompt hook can even audit which rules are in context for compliance.
LLMs are nondeterministic by design, so you can't depend on the model deciding to protect a secret. A hook is code that always runs in the loop. Beyond secrets filtering, teams use the stop hook to augment their own analytics and track usage at the team level.
This is our way to basically allow you to hook into that loop and be able to run something that will always consistently run versus relying on the LLM to decide that it should.
How should I expose a locally-running AI tool to the network?
Don't put it on the public internet. When one security engineer evaluated letting a coworker run a locally-exposed AI tool, the balance he landed on was safe but still usable: a private network connector, locked down, reachable from a phone.
The tool's own docs recommended Tailscale, which keeps the service off the internet behind a connector you can carry on your phone. Use Plan modeA mode that makes no edits: it researches the codebase and produces an editable plan you review before any code changes. Press Enter for the full definition. to have the agent write the Terraform in an infra/ directory with good defaults from the docs, explicitly not open to the internet, then have a security sub-agentA child agent a main agent spawns to work in parallel with its own context window, handing results back so the parent's context stays clean. Press Enter for the full definition. look for risks before you open the PR.
they're recommending Tailscale, which makes a lot of sense to me. So, this is not on the internet. It's just locked down. You have a Tailscale connector and then you can put that on your phone.
Do I scope the tool access first or write the hooks first?
Scope first. Approving fewer tools is configuration, it takes minutes, and it shrinks the surface a hook would otherwise have to police. Hooks are shell scripts you then own and keep working across the IDE, the CLI and cloud agents.
Write them first and you can end up encoding policy for a server that should never have been approved. That is real maintenance spent making a bad grant survivable. My read is that hooks earn their keep where scoping cannot reach: screening a prompt before it reaches the model, and anything you need to hold when the model does not cooperate.
Of the dozen or so trigger points above, I'd guess most teams only ever wire two or three.
Where does an MCP server's credential actually live?
In mcp.json, as a placeholder rather than a value. A project server sits in .cursor/mcp.json at the repo root and travels with the repo to whoever clones it; a personal one sits in ~/.cursor/mcp.json and stays on your machine. Put ${env:DATABASE_URL} in the env block and each person supplies the variable from their own environment, so the committed file names the server without carrying the secret.
Now, the line in that config that decides blast radiusHow much breaks if a change goes wrong; the scope of potential damage. Press Enter for the full definition. is the transport. A local stdio process Cursor runs is scoped to one workspace. A remote server reached over HTTP, holding a broad API token, reaches as far as that token does, which is the same feature with a much longer arm. Approve the read and search tools, leave create, update and migration tools unapproved, and check which account the token belongs to before any of it goes near a production system.
Frequently asked questions
Who is this guide for?
Security teams, platform engineers and DevEx teams approving MCP usage.
What should I do next?
Start with one real repo task, capture the prompt and review the result before scaling the workflow.
How are hooks different from MCP approvals?
MCP approvals govern which external tools an agent may call and rely on the model requesting them. Hooks are deterministic shell scripts that fire at lifecycle points (prompt submit, file read/write, MCP or terminal tool call, stop) and can halt a prompt before it reaches the model regardless of model behavior. They also run in cloud agents and can be pushed centrally.
Sources & last verified
Cursor ships frequently. Facts verified against primary sources on July 9, 2026.
Keep reading
Rather do it than read about it? Run 11 interactive Cursor walkthroughs in a simulated editor. Free, no account needed.