Scan an MCP server before you connect it to your agent
You install MCP servers with more trust than you install npm packages Before you paste an MCP server into Claude Desktop or Cursor, assume it is not safe to connect until you have checked what it runs, what its tool descriptions tell the model, and what credentials it can reach. A static scan takes seconds and never executes the server — that check is cheaper than finding out later. Think about…
When installing MCP servers, treat them with caution similar to how you would treat npm packages. Before connecting an MCP server to your agent such as Claude Desktop or Cursor, conduct a static scan. This scan takes only seconds and doesn't execute the server, making it a cost-effective safety measure. When adding an npm package, you typically glance at the repository, check downloads, and skim the source for network usage.
Similarly, before connecting an MCP server, review the JSON snippet from the README in your config file. Remember that this snippet allows your machine to download and run code locally, using your user permissions, environment variables, and network access. The key difference is that MCP servers can also carry tool descriptions, which are instructions for the model.
These descriptions are executable by the model, not the CPU, and can contain instructions to override prompts, exfiltrate data, or act invisibly. Conduct a checklist-based review before connecting an MCP server. Inventory the server's command and arguments, scan the metadata for malicious tool names, descriptions, and arguments, and check for credential-shaped strings or unknown environments.
Document your findings, remediate if necessary, and re-check on updates. The goal is to ensure your agent remains safe from credential exposure or malicious instructions.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.