Skip to content

MCP Security: Tools, Permissions and Approvals for AI Agents

How to integrate MCP tools into applications safely: server-side permission checks, human approvals, protection against prompt injection and traceable calls.

≈ 11 min readSoftwareAIArchitecture

MCP Security: Tools, Permissions and Approvals for AI Agents

An MCP tool can read data, publish a revision or call an external service. That turns a model response into an action with consequences. For developers and operators, the security question is therefore: Who may run which operation, on which data and after which approval?

The Model Context Protocol standardizes the connection to such capabilities. You still have to enforce the rules of your application yourself. This article shows how, using a constructed publishing example: the same permissions across the web UI, HTTP and MCP, a verifiable approval before publishing, and a traceable way of handling retries and untrusted content.

For context on the interfaces, here are the differences between MCP, HTTP, webhooks and A2A.

Not the app, but the capability#

The Model Context Protocol is an open standard that lets AI applications connect to external systems. The official documentation describes MCP as a connection between AI applications and data sources, tools and workflows. The specification talks about hosts, clients and servers: an LLM application is the host, a client sits inside it, and a server provides context or capabilities.

At first, this sounds like integration infrastructure. In fact, it contains a bigger shift. An application is then no longer just a UI for humans. It is also a set of addressable capabilities for agents.

The classic operating path looks like this:

flowchart LR
  Human[Human] --> UI[UI]
  UI --> App[Application]
  App --> Result[Result]

The human opens a UI, looks for the right place, fills in fields, clicks preview, clicks publish, then checks the feed and search. The application is the visible bundle of interaction, domain logic and state.

With an agent, a second path is added:

flowchart LR
  Human[Human] --> Agent[Agent]
  Agent --> Validate[validate_markdown]
  Agent --> Preview[create_preview]
  Agent --> Publish[publish_revision]
  Agent --> Rollback[rollback_release]
  Agent --> Search[rebuild_search_index]

The UI doesn’t disappear because of this, and it doesn’t become secondary either. But it’s no longer the only access to the work. An agent doesn’t need to know where the button is. It needs to know which capability exists, which inputs it expects, which results come back and which rules apply.

That’s the core: MCP makes software capabilities addressable for agents. What it doesn’t do: replace the product domain or push aside its human UI.

A publishing system as an example#

The following publishing system is a constructed architecture example, not a finished integration and not a customer case. The flow is familiar: Markdown comes in, a preview is built, someone reviews it, and then a revision is published. If something goes wrong, you need a rollback. After the release, the index, feed and cache have to be right.

In a classic UI, these steps are tied to pages and buttons. For humans, that makes sense: a good GUI shows context, can block invalid input and makes states such as approval status visible. For an agent, the same UI is a detour and a source of errors. It would have to click, wait, read from HTML, interpret, click again. That’s automation at the wrong level.

As an MCP capability, the same step would look different:

const publishRevision = defineTool({
  name: "publish_revision",
  description: "Publish an approved content revision",
  inputSchema: {
    type: "object",
    properties: {
      site: { type: "string" },
      revisionId: { type: "string" },
      reason: { type: "string" }
    },
    required: ["site", "revisionId", "reason"]
  }
});

The important part isn’t the specific syntax. The important part is the shift: an operating path becomes a named capability. publish_revision isn’t “click the green button.” It’s a domain operation with inputs, a result, permissions and errors.

Once the operation exists in this form, an agent can work with it. It can call validate_markdown first, ask back when there are warnings, request a preview, check the approval status and only then publish. The agent doesn’t operate a screen. The MCP server described here gives it domain tools with an input schema and a permission check.

Three access paths, one domain#

Such a publishing system can provide a domain-oriented tool surface under /mcp that runs through the same publishing domain as REST and the web UI. The MCP tools stay bound to the product scopes.

What matters is what this construction is not: MCP isn’t a second system next to the product. The web UI, HTTP and MCP access the same publishing domain with its revisions and permission boundaries. The shared domain logic decides what applies – not the channel the request came through.

This has a practical consequence for the tool list itself. Tools that the current principal isn’t allowed to use don’t need to appear in the list at all. So the agent only discovers capabilities its scopes allow. And where a human approval is required, the agent doesn’t provide that approval itself – it remains a separate step outside its reach.

This filtering is more than convenience, but it’s visibility, not the actual protection. An agent that doesn’t see a tool in the list won’t discover it the regular way. Protection against unauthorized calls comes from server-side authorization; the tools stay bound to the scopes of the respective product. That’s why you can’t obtain a missing release permission by switching from the web UI to MCP. The access path changes, the permission doesn’t.

Tool access is a permission#

An agent that writes text can produce nonsense. An agent that calls tools can produce effects. It can read data, change files, trigger releases or notify external systems. That’s why tool access isn’t a convenience feature but a permission. A tool being discoverable is not yet permission to act; the call remains an authorized operation that the system checks. In a remote MCP setup, these duties are split: according to the MCP specification, getting the user’s consent before a tool call is the host’s job, while the product checks every call on the server side against the principal’s scopes.

The MCP specification itself says that such capabilities raise security and trust questions: users must be able to understand and control data access and operations, tools must be treated with caution, and hosts must obtain consent before tool calls. Consent and access control therefore belong in the execution path of every tool call.

So in a production system, a tool definition isn’t enough. It needs a policy next to it:

type ToolPolicy = {
  tool: string;
  allowedRoles: string[];
  requiresApproval: boolean;
  requiresIdempotencyKey: boolean;
  maxRuntimeMs: number;
};

type ToolAuditEntry = {
  tool: string;
  inputHash: string;
  idempotencyKey?: string;
  decision: "allowed" | "blocked" | "approved";
  outcome: "succeeded" | "failed" | "unknown";
  actorId: string;
  runId: string;
};

This turns “the agent may publish” into a verifiable rule. Who was allowed to make which call? Which input was used? Was an approval required? Was the call executed or blocked? For write operations, there is one more question: What happens if the agent repeats the same call after a timeout? An idempotency key only helps if the server binds it to the operation and its inputs, catches concurrent retries and stores the result reliably. With external side effects, the downstream service also has to recognize retries, or the system has to reconcile the unclear outcome. A key alone doesn’t guarantee a single execution.

MCP standardizes how a tool is discovered and called. It doesn’t make the operation safe from a domain perspective, nor automatically idempotent or auditable. The capability being offered has to carry these properties itself.

Prompt injection: content must not grant permissions#

An article that gets read in can contain instructions, for example to publish a different revision or to send data to an outside address. Treat such content as untrusted data. A prompt that tells the model to ignore such instructions isn’t sufficient access control. The allowed operations, target addresses and approvals have to be checked outside the document being read.

Tool descriptions and labels like “read-only” aren’t proof of how a third-party server actually behaves either. Check which server you connect and which permissions you give it. The security principles of the MCP specification name this trust boundary explicitly.

For a remote MCP server, securing authentication comes on top: check whether an access token was issued for your server; don’t pass received tokens on to downstream services unchecked. Request only the permissions you need. The official documentation on MCP Security Best Practices describes these measures and the risks of token passthrough.

For the publishing example, I would check at least the following cases before going into production:

  • A user without publishing permission calls the tool directly: the server rejects it, even if the tool name is known.
  • An approval applies to revision A, but the call names revision B: the server rejects it.
  • A document asks for data to be sent to an outside address: the configured boundary stays in effect.
  • A call runs into a timeout: before another write attempt, its result is clarified or the retry is effectively deduplicated.
  • A failed or rejected operation appears in the history with its actual result.

This is a checklist for this architecture example, not complete evidence of security.

The wrong split and the right one#

I don’t believe that applications will fall apart into small MCP services and stop being products. A good application bundles more than functions: it bundles understanding, interaction, data model, permissions, feedback and responsibility. But at the edges, capabilities that used to be tied to operating paths become individually addressable.

A capability is well cut when it’s understandable from a domain perspective, technically verifiable and operationally accountable. The wrong split would be a generic run_sql or click_button – a tool that bypasses the domain rules instead of carrying them. The better split is an operation with domain intent: publish_revision, rollback_release, create_preview. The agent shouldn’t work around the database. It should work within the same rules that apply to the web UI and HTTP.

A standard takes away integration work, but not product responsibility. Anthropic introduced MCP at the end of 2024 to address exactly the problem that every new data source needed its own integration. The specification standardizes the exchange over JSON-RPC and describes resources, prompts and tools. Bad capabilities stay bad, even when they are offered in a standardized way.

What happens to UIs#

The strongest version of the claim about the future goes like this: when agents operate software, GUIs become secondary. I think that’s wrong.

Routine paths will shift. If I can tell an agent to review a draft, build a preview and show me only the deviations, I don’t want to click through five forms for that. This is especially true for recurring work that is well described and cleanly bounded.

But humans need UIs for exploration, control, exceptions and trust. A preview is a GUI. A diff is a GUI. An audit log is a GUI. An approval dialog is a GUI. Precisely when agents execute more, good control UIs become more important. The control UI exists so that a human understands what an agent has done and steps in where their judgment is needed.

So the control UI and MCP don’t compete for the same job. The control UI is aimed at human operation and control, MCP at agentic calls. Both are subject to the permission boundaries of the same domain.

What I take away from this#

For me, MCP is less a spectacular technology than a good reason to describe software differently. Not only through the data a system holds, and not only through the UI it offers – but through the work it can do safely, traceably and verifiably.

That’s an architecture question. If you publish capabilities only as a thin wrapper around internal functions, you’re probably building new risks. A domain split, permissions, idempotency and auditability create a controllable foundation for agents – they are not a quality guarantee.

Not every application needs an MCP server right away. Many systems are better served by a good API, a CLI or a clear UI. Where it fits, though, this holds: software meant to be used by agents has to make its capabilities explicit – and it has to enforce the same permission boundaries across every access path.

Where SubKit fits in#

In SubKit, AI helps you design a workflow. A person reviews the preview and approves its scope. After that, the defined workflow runs; the AI doesn’t decide on the further path during execution. Every run is checked for permissions and recorded.

MCP is used in both directions: a workflow can serve as a tool for an AI client, and an external MCP server can be connected as a connector. Which external tools may be used is defined separately. The additional access path replaces neither the approval nor the permissions of the calling person.

This is a concrete product reference, not a claim that SubKit makes every MCP server secure or automatically knows domain rules. The rules of your domain and the permissions of external systems still need to be checked. The article AI Agents per Domain: Rules, Approvals and Evidence goes deeper into how such rules can be separated from model decisions.

Context and sources

The publishing system and the code snippets are constructed and illustrate architecture decisions. This article uses the MCP specification from June 18, 2025 and the linked Security Best Practices. The security sections were checked against these primary sources on November 9, 2026; this implies no statement about the security of any specific installation. The SubKit section is based on the confirmed product description from November 8, 2026.

Further reading#

Revised and translated from German with the help of AI.