An MCP server security checklist for Claude Code, Codex and Cursor Security consultancy PTS published a 15-minute checklist for auditing MCP servers used by coding agents such as Claude Code, Codex and Cursor, warning that local servers run as ordinary processes that inherit environment variables and can read anything the user's account can read. The guidance, citing official MCP documentation, urges developers to inventory each configured server, remove unused ones, verify an identifiable publisher and pin versions, and give each server narrowly scoped credentials rather than inheriting shell environment. It also notes that every added server shares the same model context, so a malicious server can influence how the agent uses other servers' tools. Originally published on agents.paxtechnologyservices.com https://agents.paxtechnologyservices.com/articles/mcp-server-security-checklist.html . I'm PTS, an IT and security consulting shop. Corrections welcome in the comments. An MCP server is not a harmless plugin. A local server is an ordinary process your coding agent launches. Official MCP docs are blunt about that: it inherits your environment variables, can read anything your account can read, and can open outbound network connections, unless you isolate it yourself local server security https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/local-server-security . This is a practical pass you can finish in about 15 minutes. Setting names and limits were checked against official docs on December 3, 2026. Tools change fast. If a key does not match your version, trust the vendor docs over this page. Test any change on a non-production project first. If you have not yet mapped accounts, env names and existing servers, start with the 15-minute inventory https://agents.paxtechnologyservices.com/articles/what-can-your-coding-agent-read.html . The permissions audit https://agents.paxtechnologyservices.com/articles/ai-coding-agent-permissions-audit.html covers deny lists, sandboxes and Cursor ignore files. Official MCP guidance says that if you do one thing after reading it, open your client's MCP configuration, remove the servers you no longer use, and make sure you know where each remaining one comes from, with its version pinned local server security https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/local-server-security . Where to look: /mcp in a session, and check project .mcp.json , user and local MCP config. Project servers are shared through version control, and interactive sessions prompt for approval before using them mcp servers. in ~/.codex/config.toml and any project .codex/config.toml .cursor/mcp.json in the project, or ~/.cursor/mcp.json for user-level servers. Write down, for each server: the name, how it is launched command or URL , the publisher, the pinned version if you have one, and the account or API it can reach. If you cannot explain why it is there, remove it. Most local servers use stdio: the client starts the server as a child process and talks to it over stdin and stdout. Official MCP docs say the client and a stdio server share one trust domain. The protocol does not sandbox one against the other. A server already has code execution on your machine by being launched. Isolation is your job, and the host application's, not the transport's local server security https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/local-server-security . The trust is also cumulative. Every server you add shares the same model context, so a bad server can influence how the agent uses the tools of every other server. Claude Code's MCP page adds a direct warning: verify you trust each server before connecting it, because servers that fetch external content can expose you to prompt injection risk Claude Code MCP https://code.claude.com/docs/en/mcp . The same official local-server guide tells you to confirm an identifiable publisher and pin the version. Clients that offer one-click install are supposed to show the exact command before it runs. Official MCP docs describe that requirement as SEP-1024 in local server security https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/local-server-security . Read that command. A typosquat or an abandoned package with a new publisher is a different threat from a protocol bug. Prefer a remote, hosted server when the tool needs nothing from your laptop. A remote server still has to be trusted, but it is not an extra process with your home directory and your shell environment. Official guidance: give each server only its own narrowly scoped credentials in per-server config. Nothing inherited from your shell, and nothing reused across servers local server security https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/local-server-security . If a server needs an API token, put that token in the server's own env block, scoped to the least privilege the tool needs. Do not point a server at your personal cloud admin keys because they were already in the terminal. Claude Code also documents a specific case for headersHelper commands that a repository or plugin might supply. Those helpers can be arbitrary shell. For a server in a project .mcp.json , Claude Code runs the helper only after you accept the trust dialog for that project directory. It also strips many credential-looking environment variables from helpers in project scope. Read the current MCP reference https://code.claude.com/docs/en/mcp for your version before you rely on that stripping as a complete control. It is a mitigation, not a reason to leave broad secrets in the environment. Official local-server defaults: None of that is provided by the MCP protocol itself. You or your tools have to set it. Remember the limit you already saw in the inventory and audit guides: a tool sandbox that wraps shell commands does not automatically wrap MCP servers. Official Claude Code docs describe the sandbox as wrapping shell, while built-in file tools, MCP servers and hooks can run outside it sandboxing https://code.claude.com/docs/en/sandboxing . Cursor's ignore file does not block the terminal or MCP tools ignore file https://cursor.com/docs/reference/ignore-file . For Claude Code: mcp