The Ultimate Guide to AI Tool Security
What to check before installing AI tools, how to protect your data, and security best practices.
Your AI Tools Have Access to Everything
When you install an MCP server that reads your files, it can read all the files in the path you give it. When you connect a database server, it has full access to that database. When you add the GitHub server, it can see your repositories.
This is fine — as long as you're intentional about it. Here's how to use AI tools safely.
Before You Install
Check the Source
Every MCP server is code running on your machine. Before installing:
- Is it from a known publisher? Servers from Anthropic (
@anthropic-ai/), the official MCP org (@modelcontextprotocol/), and established companies are generally trustworthy. - Is it open source? Can you read the code? Open-source tools can be audited. Closed-source tools require trust.
- How many users does it have? Check npm downloads, GitHub stars, and community reviews on a-gnt.com.
- When was it last updated? Abandoned tools don't get security patches.
Check the Permissions
Before installing, understand what the tool can access:
- Filesystem: Which directories? Can it write, or only read?
- Database: Full access or read-only? Which databases?
- APIs: What scopes and permissions does it request?
- Network: Does it make outbound requests? Where to?
Principle of Least Privilege
Give every tool the minimum access it needs:
Filesystem
Bad: server-filesystem / (entire hard drive)
Good: server-filesystem ~/Projects/current-project (one project folder)
Database
Bad: Connecting with a superuser account
Good: Creating a read-only database user specifically for AI access:
sqlCREATE USER ai_reader WITH PASSWORD 'secure_password';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO ai_reader;
API Tokens
Bad: Using your personal GitHub token with full admin access
Good: Creating a fine-grained token with only the repositories and permissions needed
Local vs. Cloud
Local MCP Servers
These run on your machine. Data never leaves your computer.
Use for: Sensitive files, proprietary code, financial data, client information, healthcare records, legal documents.
Examples: Filesystem, SQLite, local PostgreSQL
Remote/Cloud MCP Servers
These process data on external servers.
Use for: Web search, public API access, non-sensitive tasks.
Examples: Brave Search, some hosted database connectors
The Rule
If the data is sensitive, use a local server. If you wouldn't paste the data into a public website, don't send it to a cloud server.
API Key Management
Never hardcode API keys in config files that get committed to version control:
Bad:
json{
"env": {
"API_KEY": "sk-actual-secret-key-here"
}
}
Good: Use environment variables:
json{
"env": {
"API_KEY": "${BRAVE_API_KEY}"
}
}
Set the actual value in your shell profile or a .env file that's gitignored.
Data Handling Best Practices
- Don't share credentials through AI. Never paste passwords, API keys, or tokens into a conversation. Use environment variables.
- Anonymize sensitive data. Before asking Claude to analyze customer data, remove or replace personally identifiable information.
- Review before executing. Always review Claude's proposed database writes, file modifications, and API calls before approving them.
- Limit blast radius. Use separate database users, restricted file paths, and scoped API tokens.
- Audit regularly. Review which MCP servers you have installed and remove any you're not using.
Red Flags
Stop and investigate if:
- An MCP server requests more permissions than its stated purpose needs
- A tool sends data to unexpected domains
- Installation requires disabling security features
- The tool has no documentation about its data handling
- There's no open-source code to review
For Organizations
If your team uses AI tools:
- Create an approved tools list. Vet tools centrally before team adoption.
- Standardize configurations. Provide pre-configured MCP settings with appropriate access controls.
- Train your team. Make sure everyone understands what data can and can't go through AI tools.
- Monitor usage. Log which MCP servers are active and what they access.
- Have an incident plan. Know what to do if a tool is compromised.
The Security Checklist
Before installing any AI tool:
- [ ] Verified the publisher/source
- [ ] Checked if it's open source
- [ ] Understood what data it accesses
- [ ] Applied minimum necessary permissions
- [ ] Used environment variables for secrets
- [ ] Chosen local over cloud for sensitive data
- [ ] Reviewed the tool's data handling documentation
Browse vetted AI tools on a-gnt.com. We review every tool submitted to our catalog, but your own security review is always the final line of defense.
Ratings & Reviews
0.0
out of 5
0 ratings
No reviews yet. Be the first to share your experience.