The direct answer

An MCP server is not production-ready merely because the agent can call its tools. Before real users or real data touch it, make four things explicit:

  1. Which resources each tool may reach
  2. Whether each tool may only read or may also write
  3. What arguments are allowed
  4. Which actions require a human confirmation

Then verify that enforcement happens on the server, not just in the tool description. A model can misunderstand a prompt. Your server must still reject unauthorized reads, invalid arguments, and writes that should not happen.

For a solo developer, this is also a product decision. Tight boundaries make the server easier to explain to customers, less likely to cause expensive accidents, and simpler to support. They do not make the product less useful if you separate low-risk inspection tools from actions that change customer data.

1. Draw the resource boundary before listing tools

Start with the business objects your MCP server owns: a project, document, invoice, customer record, repository, or deployment. For each object, decide which operations are acceptable:

  • Read one record
  • List records in a named collection
  • Read a summary
  • Create a record
  • Update a record
  • Delete a record
  • Trigger an external action

Then map each operation to one narrowly defined tool. Avoid a generic manage_records tool that accepts an arbitrary resource type and arbitrary action. Broad tools make authorization difficult because every caller appears to need the same combined privilege.

A useful tool contract looks more like this:

read_project(project_id)
list_open_tasks(project_id, limit)
create_task(project_id, title, due_date)
archive_task(task_id)

A riskier contract looks like this:

execute(action, resource, parameters)

The first design lets you enforce access by resource and operation. The second can hide a write behind an action string that your authorization layer does not understand.

Do not assume that listing tools discloses every resource they can reach. A tool may have broad database permissions underneath it. The resource boundary must exist in the implementation that performs the operation.

2. Separate read and write tools

For MCP tool authorization, the safest default is to make read access and write access separate capabilities.

A read tool can usually return information without changing state. A write tool changes a customer-visible or financially meaningful object. If you expose both through one tool, a caller may receive write capability even when it only needed to inspect data.

Use three practical categories:

Category Typical purpose Recommended control
Public Documentation or non-sensitive status No account-specific data
Read Fetch records or summaries Authenticated access limited to authorized resources
Write Create, update, archive, send, publish, delete, or trigger Narrow scope plus explicit confirmation policy

Per-server authorization is simpler because every request requires a valid token. Per-tool authorization is useful when public and protected tools share one server. The MCP Apps authorization guidance describes both models: per-server protection for a wholly sensitive server, and per-tool protection when public and protected tools coexist.

The choice is not merely about convenience. It changes how clients obtain credentials and where your enforcement code must live. For a paid or customer-connected product, prefer a model where an unauthenticated call cannot silently reach customer data. If you publish some public metadata beside protected account tools, per-tool authorization can preserve that public experience without making all data private or all tools public.

3. Constrain permissions at the narrowest useful resource

“Authenticated” is not a sufficient boundary for most customer data. The server also needs to establish which account, tenant, project, or record the caller may access.

For every tool invocation, enforce both of these checks:

  1. Capability check: Does this token permit the requested operation?\n2. Resource check: May this principal access this specific resource?\n For example, a token allowed to update tickets should not be able to update a ticket in another customer’s workspace merely because it supplied a valid ticket_id.

Do this check in the backend immediately before the operation. Filtering a list query is useful, but it is not enough: validate the object on the individual write path as well.

For remotely hosted MCP servers using HTTP transports, the MCP authorization specification treats the server as an OAuth resource server and the client as an OAuth client. Tokens must be validated for the intended resource, not merely decoded successfully. Discovery metadata helps clients locate the correct authorization server, while token verification establishes whether the request is authorized.

The practical implementation questions are:

  • Which authorization server issued the token?
  • Which audience is the token for?
  • Which scopes or permissions does it contain?
  • Which tenant and resource are being requested?
  • Does the token allow this class of action?

A JWT signature check alone answers only whether the token is authentic. It does not establish that the token was issued for your server or that it grants the requested operation.

4. Treat scope labels as policy, not documentation

If you issue scopes such as tasks:read and tasks:write, map them explicitly to server-side checks. Do not have one tool accept a scope argument supplied by the caller and then trust it.

A compact policy table can make the intended boundary reviewable:

tasks:read
  - read one task
  - list tasks

tasks:write
  - create a task
  - update a task

tasks:archive
  - archive a task

If two scopes have identical behavior, merge them. If one scope implies access to several materially different operations, consider splitting it further. Scopes are useful for auditing and revocation, but their real value comes from deterministic enforcement.

For STDIO-based local servers, the MCP authorization specification says not to follow the HTTP OAuth flow; retrieve credentials from the environment instead. This does not mean “no authorization.” A local server can still have a narrow service credential, a fixed working directory, restricted filesystem access, and tool-specific operating-system permissions.

The local/remote distinction changes the authentication mechanism. It does not change the need for least privilege.

5. Validate every argument as untrusted input

Tool arguments arrive from a model, a client, or another service. Treat them like any other untrusted API request, even if the caller is authenticated.

Validation should answer:

  • Is the required field present?
  • Is its type correct?
  • Is its length, range, or format allowed?
  • Is the resource identifier valid for the current tenant?
  • Does the requested action make sense for that resource state?
  • Could the argument cause an unexpectedly large or destructive operation?

Do not rely on the JSON schema shown to the agent as your only defense. Schema documentation helps the client produce better arguments; the server must enforce the contract.

Use a strict schema, reject unknown fields where they create ambiguity, and convert validation failures into structured errors that explain what needs correction. Avoid echoing secrets or full sensitive records in error messages.

Also validate relationships, not just field shapes. A project_id can be syntactically valid and still belong to another customer. The operation should fail if the requested parent resource is outside the caller’s boundary.

6. Require confirmation for consequential actions

Human confirmation is not a substitute for authorization or validation. Use it as a final control after the server has established:

  • who is acting;
  • which resource is affected;
  • what operation will occur; and
  • what arguments will be submitted.

Good candidates for confirmation include:

  • Deleting or overwriting customer data
  • Sending email or messages to external recipients
  • Publishing content
  • Spending money or changing a subscription
  • Modifying production infrastructure
  • Closing, charging, or refunding an order
  • Changing permissions
  • Triggering a workflow that another person or system will observe

The prompt shown to the user should summarize the actual operation. “Approve action?” is not sufficient. It should identify the target, the intended change, and any irreversible effect.

A stronger pattern is a two-step tool flow:

  1. prepare_update(target_id, changes) returns a short-lived approval identifier and a human-readable summary.
  2. execute_approved_update(approval_id) performs the operation only if the approval is valid, unexpired, bound to the same user and resource, and created from the same change set.

This prevents the agent from showing one action during approval and executing another afterward. It also gives you a precise audit record.

Do not automatically require approval for every read. Excessive prompts train users to click through them, weakening the control. Set the threshold by consequence, not by tool count.

7. Audit effective access, not just declared permissions

Many permission problems hide between layers. The token grants a scope, the server maps that scope to a tool, the tool reaches a service account, and the service account can access more than expected.

The audit must follow that entire path.

Server-side audit

Record enough context to answer:

  • Which principal or subject made the request?
  • Which MCP client and tool were involved?
  • Which resource was targeted?
  • Which operation was attempted?
  • Which scopes did the token contain?
  • Did the request succeed or fail?
  • Was approval obtained, and for which change?

Avoid logging access tokens, authorization headers, session cookies, or sensitive tool arguments. Hash or redact identifiers where appropriate, while retaining enough information to investigate an incident.

Effective-permission audit

For a representative account, create a matrix that records:

Tool | Scope required | Resource rule | Read/write | Confirmation | Downstream credential

Then verify each row with a test. Do not infer effective access from the tool catalog alone. The important result is what the server actually permits when a caller invokes the tool.

Include negative tests:

  • A valid token calling an unauthorized tool
  • A valid token targeting another tenant’s resource
  • A token with read scope attempting a write
  • A write with altered arguments after approval
  • An expired or replayed approval
  • A malformed argument set
  • A request with missing or incorrect audience information

If the audit cannot explain who can read or change a resource, the permission model is not production-ready.

8. Use a launch gate rather than a vague security promise

Use this checklist as a release gate:

Resource boundaries

  • Every tool has an explicit set of reachable resources.
  • Resource ownership is checked server-side on each operation.
  • List operations cannot expose records outside the caller’s boundary.
  • Generic resource selectors are not allowed to cross tenants or accounts.

Read/write constraints

  • Read and write capabilities are separated.
  • Write tools have narrow scopes.
  • Downstream service credentials have only the permissions they need.
  • Delete, publish, send, spend, and deploy operations are isolated where practical.

Argument validation

  • Required fields, types, formats, and limits are enforced.
  • Resource relationships are validated.
  • Unknown or ambiguous fields are rejected.
  • Validation errors are useful without leaking sensitive data.

Consequential-action confirmation

  • Consequential operations have an explicit policy.
  • Approval summaries show the target and change.
  • Approved actions are bound to the user, resource, arguments, and expiry.
  • Approval cannot be replayed for a different operation.

Audit and operations

  • Every protected call records principal, tool, resource, operation, and outcome.
  • Tokens and secrets are excluded from logs.
  • Negative authorization tests run before launch and after permission changes.
  • Scope and credential changes have an owner and review date.
  • Revoking a user or token actually removes access across connected services.

The founder’s trade-off

Narrower tools can mean more definitions, more tests, and sometimes a less convenient agent experience. That cost is real. But a single broad write tool hides important product decisions inside implementation details.

For an indie developer, the strongest compromise is usually not “secure everything” or “move fast and expose everything.” It is to ship a small set of read tools first, add narrow write tools only for the workflows that create customer value, and reserve confirmation for actions with visible consequences. This reduces support incidents and makes pricing or enterprise conversations easier because you can explain exactly what the agent may do.

The key metric is not the number of tools. It is the number of independent permission boundaries your team can explain and test.

If you want a broader inventory process, the MCP Server Permission Scope Audit Checklist is a practical companion. For the consent mechanics around resource access and human approval, see MCP Resource Access and Consent: A Practical Design Guide for Safe Agents.

Frequently asked questions

Should every MCP tool require authorization?

Not every tool needs the same protection. Public documentation may not require authentication, while tools that access user data or change state should. Per-tool authorization can support a mixed server; per-server authorization is simpler when the entire server is sensitive.

Is OAuth enough to secure an MCP server?

No. OAuth helps establish identity and delegated authorization, but your server must still verify the token for the intended audience, enforce scopes, validate the targeted resource, and protect write paths. Those are separate controls.

Can human confirmation replace read/write permissions?

No. Confirmation is useful before a consequential action, but it cannot establish whether the caller was allowed to make that action or whether the arguments were valid. Enforce authorization and validation first.

How often should permissions be audited?

Audit before launch, after changing scopes or downstream credentials, and whenever an incident or unusual behavior suggests the model no longer matches reality. For a small product, a repeatable test suite matters more than an occasional manual review.

Sources