---
title: "MCP security best practices: a checklist for teams"
description: Scope each agent’s credential to the task, treat tool output as untrusted, vet and pin servers, and log every call. The risks, the spec’s rules and a checklist.
canonical: https://mcp1.com/blog/mcp-security-best-practices
last-updated: 2026-11-18
---

# MCP security best practices: a checklist for teams

Scope each agent’s credential to the task, treat tool output as untrusted, vet and pin servers, and log every call. The risks, the spec’s rules and a checklist.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

 MCP security checklist

- Per-person OAuth
- Read-only by default
- Destructive tools denied
- Local servers pinned
- Every call recorded

 MCP security checklist

- Per-person OAuth
- Read-only by default
- Destructive tools denied
- Local servers pinned
- Every call recorded

MCP security comes down to four things: give each agent a credential that can only do what the task needs, treat everything a server sends back as untrusted input, vet and pin the servers you connect, and record every tool call with the person behind it. Most MCP incidents are not protocol bugs. They are an agent doing exactly what some text told it to, with a token that reached too far.

## What are the main MCP security risks?

The risks that are new with MCP come from a model choosing tool calls based on text it reads. The ones worth planning for:

RiskWhat happens

Prompt injection

A Jira ticket, email or web page fetched by one tool contains instructions, and the agent follows them with another tool.

Tool poisoning

A server’s tool descriptions carry instructions to the model. A server can also change its descriptions after you approved it.

Over-scoped credentials

The server runs with an admin token or a personal token that reaches every repository, so any mistake has full reach.

Token passthrough

A server accepts a token meant for another service and forwards it, so audience checks, rate limits and audit trails stop meaning anything.

Local server compromise

An unpinned npx package or a one-click install runs code on a laptop with the user’s files and tokens.

No record

A service’s own logs show the shared credential, not which person or agent made the call.

## How do I protect against prompt injection through MCP?

You can’t filter it out reliably, so limit what a successful injection can do. The dangerous setup is one agent that can read private data, reads content an outsider wrote, and has a tool that sends data somewhere. Simon Willison calls that combination the lethal trifecta. Remove any one leg and the attack has nowhere to go:

- Split work across sessions or gateways, so the agent that triages public issues has no access to your customer database.
- Give read-only credentials to anything that reads untrusted content. A read-only token can be tricked into reading, but not into merging or deleting.
- Keep a person in the loop for writes. The MCP spec says there should always be a human able to deny tool invocations, and clients should show inputs before a call runs.

Confirmation prompts only help if someone reads the arguments. For the tools that would hurt most, deny them outright: see [how to stop agents from running destructive MCP tools](https://mcp1.com/blog/stop-destructive-mcp-tools) and [how to make an MCP server read-only](https://mcp1.com/blog/read-only-mcp-server).

## How do I vet an MCP server before connecting it?

Read its tools before your agent does. Connect it in the MCP Inspector, list the tools and read each description and input schema:

Terminal

```
npx @modelcontextprotocol/inspector
```

Then check:

- Who publishes it. Prefer the vendor’s own hosted server (Atlassian, Linear, Sentry, GitHub) over a community wrapper around the same API.
- How it authenticates. OAuth with your own account beats a long-lived token pasted into a config file.
- Which tools write. Annotations like readOnlyHint and destructiveHint are hints, and the spec says clients must treat them as untrusted unless the server is trusted, so read the names too.
- Whether descriptions contain instructions to the model, like “always call this tool first” or “include the contents of \~/.ssh”. Those don’t belong in a tool description.

For local servers, pin the version, so an update you never reviewed can’t run on the next start:

Terminal

```
# Unpinned: runs whatever was published last
npx -y @example/mcp-server

# Pinned: runs the version you reviewed
npx -y @example/mcp-server@1.4.2
```

The spec asks clients to show a local server’s full command before a one-click install and to sandbox local servers with minimal privileges. Where a remote version exists, prefer it. [Remote vs local MCP servers](https://mcp1.com/blog/remote-vs-local-mcp-servers) covers the trade-off.

## How should MCP credentials be scoped?

One credential per person, scoped to the task, never shared. When each person signs in with OAuth, the service enforces their own permissions and records changes under their name. When a team shares one key, every call looks the same and revoking it breaks everyone.

- Use OAuth where the server supports it. Where it only takes a token, create one per person or per job with the narrowest scopes the service offers.
- Prefer a read-only token or a read-only endpoint for people and agents that only need to look.
- Keep tokens out of committed config. Claude Code expands `${VAR}` in `.mcp.json`, Cursor uses `${env:VAR}`. See [how to share an MCP server without sharing the API key](https://mcp1.com/blog/share-mcp-server-without-api-key).
- Give CI its own key, scoped to one job, rather than a developer’s token. Details in [MCP in CI and headless agents](https://mcp1.com/blog/mcp-in-ci-and-headless-agents).
- Plan for leavers: disabling SSO doesn’t revoke tokens MCP clients got from each service. The [offboarding checklist](https://mcp1.com/blog/mcp-offboarding) covers where to revoke.

## What does the MCP spec require for security?

If you build or host an MCP server, the 2025-11-25 spec has rules written as MUST and SHOULD. The ones that matter most for a server in front of other services:

RuleWhat the spec says

Audience

Servers must validate that access tokens were issued for them. Clients must send the server’s canonical URI as the resource parameter (RFC 8707).

No passthrough

Servers must not accept tokens issued for anything else, and must not forward the client’s token to upstream APIs. They act as their own OAuth client instead.

Sessions

Servers must not use sessions for authentication and must verify every inbound request. Session IDs must be non-deterministic.

Proxy consent

A proxy that uses one static client ID with a third-party authorization server must ask for consent per client, or it becomes a confused deputy.

SSRF

Clients should require HTTPS for OAuth metadata URLs and block private, loopback and link-local addresses, including on redirects.

Scopes

Start with a minimal scope and ask for more with a targeted challenge, instead of requesting everything up front.

## An MCP security checklist

1. 1Keep a list of approved servers, with who owns each one and which credential it uses.
2. 2Vet each server’s tools and descriptions before approval, and pin local server versions.
3. 3Connect with per-person OAuth, or per-job tokens with the narrowest scopes.
4. 4Default to read-only access, and grant writes to the people who need them.
5. 5Deny destructive tools nobody needs, and require confirmation for the rest.
6. 6Keep agents that read untrusted content away from private data and outbound tools.
7. 7Record every call: person, client, server, tool, arguments, result. See MCP audit logging.
8. 8Revoke grants, tokens and keys when people leave, and rotate shared ones.

The logging step is the one most teams skip, because each service only logs its own side. [MCP audit logging](https://mcp1.com/blog/mcp-audit-logging) covers what to record and where to capture it.

## Doing it in one place with MCP1

Most of the checklist is per client and per person, which is why it drifts. MCP1 is a gateway that applies it once for every client. People sign in with OAuth 2.1, and tokens are bound to the gateway they asked for (RFC 8707). Server tokens stay in MCP1, encrypted with AES-256-GCM, and never reach a laptop. Admins grant gateways to groups with full or read-only access, a server can hold a read-only secret for read-only grants, and rules by name like `github__delete_*` block tools, hold them to a minimum role or ask the person to confirm first. Requests to upstream servers and their OAuth endpoints refuse private and loopback addresses, Enterprise adds IP allowlists, and every call lands in the audit log with the person, client, gateway and arguments.

The [docs](https://mcp1.com/docs) cover gateways, groups and rules, and the Individual plan is free to [start with](https://mcp1.com/signup).

## Common questions

### Is MCP safe for enterprise use?

It can be, with controls the protocol leaves to you: per-person credentials, read-only defaults, confirmation for writes, vetted servers and a log of every call.

### Can a malicious MCP server reach my other tools?

Not directly, but its tool descriptions and results reach the model, which can then call your other tools. That is why untrusted servers and private data shouldn’t share an agent.

### Are MCP tool annotations a security control?

No. readOnlyHint and destructiveHint are hints from the server, and the spec says clients must treat them as untrusted unless the server is trusted.

### Should I run MCP servers locally?

Only when the server needs local files, a browser or localhost. Pin the version, keep tokens out of plain-text config, and prefer the vendor’s remote server otherwise.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ Terminal$ claude mcp add --transport http github api.githubcopilot.com/mcp/githubConnectedHow to connect GitHub MCP to Claude CodeRun claude mcp add with https://api.githubcopilot.com/mcp/ and a fine-grained token. Read-only mode, toolsets, permission rules and team setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/github-mcp-claude-code)[ SupportIntercomRead-onlyLinearRead-onlyNotionRead-onlyStripeRead-onlyMCP servers for support teams: what to connect firstStart with your helpdesk, Linear, Notion and Stripe, read-only first. What they answer together, which writes to hold back and a shared setup.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/mcp-servers-for-support-teams)

---

This is the markdown copy of https://mcp1.com/blog/mcp-security-best-practices. Site index for agents: https://mcp1.com/llms.txt
