CLAUDE DESKTOP

Secure claude_desktop_config.json before restart.

Claude Desktop can start local MCP servers defined in mcpServers. That convenience also means a copied config may launch third-party code with access to your files, network, and environment.

Claude MCP preflight review

  1. Confirm every server name, publisher, and source repository.
  2. Review the exact command and every argument.
  3. Pin package versions instead of resolving latest code.
  4. Remove API keys and passwords from copied configurations.
  5. Limit filesystem servers to named project folders.
  6. Prefer HTTPS for remote servers and verify authentication.
  7. Restart Claude, inspect the exposed tool list, and disable unexpected capabilities.

Common risky example

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/"]
    }
  }
}

This combines automatic package installation, a floating dependency, and root filesystem scope. Pin the reviewed release and replace / with the smallest required directory.

Do environment variables make secrets safe?

Only if the secret value is supplied outside the config. An env object that contains the actual token stores plaintext. It can still leak through backups, screenshots, dotfiles, support logs, or accidental commits.

Remote servers

Do not place tokens in a URL query string. Use HTTPS, prefer short-lived credentials, minimize scopes, and confirm whether the server can access unrelated tenant data. Redirects and authentication flows deserve the same scrutiny as the initial endpoint.

Scan your Claude MCP config locally

No upload, account, or server execution is required.

Check claude_desktop_config.json →