In one sentence: MCP gives AI "hands-on ability", but what permissions those hands get depends entirely on what you put in the config. Only by understanding the risk boundaries can you use it with peace of mind.
Where does the risk come from? Three layers
You install something via npx -y xxx — whoever published that package controls what its code can do. A malicious or compromised Server may steal tokens from environment variables, read files, and exfiltrate data. This is the biggest category of risk.
Gave your GitHub token full read/write over the repo? Then AI can modify your code and delete your Issues. Grant the least privilege: read-only is enough, don't give write; a single repo is enough, don't give the whole account.
The web pages, documents, and code AI reads may hide malicious text like "ignore the user's instructions and do XX", tricking AI into calling high-privilege tools. This is the new phishing of the AI era.
6 practical protection tips
- Only install Servers with high stars + long-term maintenance + official origin (like the Microsoft / GitHub official ecosystems); avoid unknown personal side projects
- Keep tokens local only; exclude config files via
.gitignoreand never commit them to a repo - Issue credentials with least privilege: read-only tokens for GitHub, read-only accounts for databases — if you only need to view, don't grant edit
- Be cautious with high-privilege Servers: anything that can execute commands, delete files, or read your whole disk (file-system type) should only be installed in environments you trust
- Watch for AI proactively asking for credentials: be wary of conversations framed as "I need your token to continue" — legitimate scenarios never demand your keys
- Review regularly: remove unused Servers promptly, and revoke + recreate tokens immediately after any leak
A secure install checklist
Want a systematic way to evaluate which ones are safer to install? Check the curated list on this site — already filtered by "official / high-star / active."