MCP server security checklist

Last verified against the official documentation linked below.

MCP servers can read files, call APIs and run code on your behalf, so treat adding one like installing software with your permissions. This checklist pulls together the security guidance in the MCP specification and in the Claude, Cursor and VS Code docs.

Steps

  1. Install only from sources you trust

    Use servers from developers and repositories you trust, and for important integrations read the server's source code.

    Source: cursor.com/docs/context/mcp

  2. Read the exact command before you approve it

    The spec requires clients that offer one-click local installs to show the full command, with all arguments, and to get your explicit approval. Watch for sudo, rm -rf, network calls or access to places like your home folder or SSH keys.

    Source: modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices

  3. Give each server the least access that works

    Only allow the folders a server needs, and give it API keys restricted to the minimum permissions.

    Source: modelcontextprotocol.io/docs/develop/connect-local-servers · cursor.com/docs/context/mcp

  4. Keep secrets out of config files

    Pass keys through environment variables (for example ${env:NAME} in Cursor) rather than hard-coding them, and don't paste credentials into chat or commit them to a project.

    Source: cursor.com/docs/context/mcp · code.visualstudio.com/docs/copilot/customization/mcp-servers

  5. Prefer stdio for local servers, and lock down local HTTP

    For servers meant to run locally, the spec recommends stdio so only the client can reach them. If a local server uses HTTP, it should require an authorisation token, bind to localhost and validate the Origin header.

    Source: modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices · modelcontextprotocol.io/specification/2025-06-18/basic/transports

  6. Sandbox where you can

    The spec recommends running local servers with restricted access to the file system and network, using containers or other sandboxing, and granting extra access only when needed.

    Source: modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices

  7. Keep approvals on and read them

    Claude Desktop and Cursor ask before running MCP tools. Check the arguments, and approve only actions you understand.

    Source: modelcontextprotocol.io/docs/develop/connect-local-servers · cursor.com/docs/context/mcp · code.visualstudio.com/docs/copilot/customization/mcp-servers

  8. Review remote connectors regularly

    Check the permissions a remote server asks for when you sign in, and remove connectors you no longer use.

    Source: modelcontextprotocol.io/docs/develop/connect-remote-servers

Safety notes

Related listings

More guides

Sources: cursor.com/docs/context/mcp · modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices · modelcontextprotocol.io/docs/develop/connect-local-servers · code.visualstudio.com/docs/copilot/customization/mcp-servers · modelcontextprotocol.io/specification/2025-06-18/basic/transports · modelcontextprotocol.io/docs/develop/connect-remote-servers. Menus and file paths change between versions: if a step doesn't match what you see, follow the official page linked for that step.