MCP Security Best Practices
Security checklist for MCP users. Credential management, access controls, and safe usage patterns.
This article is part of our Security series.
Read the complete guide: Is MCP Safe?MCP's architecture is secure by design. But good security also depends on how you use it. This guide covers security best practices for MCP—from initial setup to ongoing usage. Follow these and you'll minimize risk while maximizing value.
Security Principles for MCP
Only grant the access MCP needs. Read-only preferred.
Secure your device + credentials + usage patterns.
Understand the sensitivity of what you connect.
Security requires ongoing awareness.
Setup Security
3.1 Device Security First
MCP credentials live on your device. Device security = credential security.
3.2 Config File Protection
Your config file contains sensitive tokens. Protect it.
- Restrict file permissions (chmod 600)
- Never commit to public version control
- Don't sync to unsecure cloud folders
3.3 Use Official Servers
For maximum security, prefer official Anthropic MCP servers. If using third-party servers, review the code or verify the author.
Credential Management
Handling OAuth tokens and API keys correctly is critical.
4.1 OAuth Scoping
| Tool | Risky (Avoid) | Best Practice |
|---|---|---|
| Gmail | Full Mailbox | Read-only, specific labels |
| Drive | All Files | Specific Folder Scope |
| Slack | All Channels | Designated Channels |
4.2 Rotation & Exposure
- Revoke and re-authorize tokens every 6-12 months.
- If your laptop is lost/stolen, revoke all OAuth tokens immediately.
- Never share tokens in screenshots or support tickets.
Access Control
Be deliberate about tool selection.
Productivity tools, Calendar, Reference Docs
Email, Shared Drives, Team Chat
Regulated Data, Trade Secrets, Production DBs
Safe Usage Patterns
Remember: When you ask about email, email content goes to the API. Don't ask about sensitive data unnecessarily.
Mistakes with read operations are fine. Write operations (sending email, deleting files) have consequences. Always review drafts.
Network Security
- Outbound Only: MCP servers do not listen on network ports. No external party can connect "to" your MCP.
- Trusted Networks: Avoid using MCP on public WiFi for sensitive work without a VPN.
- Corporate Firewalls: Ensure your network allows outbound HTTPS to Anthropic and tool APIs.
Team Security
Shared environments require extra care.
Shared Tool Considerations
When MCP acts in Slack or Google Drive, it acts as you. The audit trail will show your name.
- Coordinate usage with your team.
- Don't access others' private folders.
- For teams, define standard approved configurations.
Incident Response
- Revoke OAuth access in affected tools immediately.
- Remove MCP servers from config.
- Change passwords.
- Check audit logs for unauthorized access.
Complete Security Checklist
- ✓ Use official MCP servers
- ✓ Grant minimum permissions
- ✓ Secure your device
- ✓ Rotate credentials periodically
- ✕ Share config files publicly
- ✕ Install untrusted servers
- ✕ Connect highly sensitive tools blindly
- ✕ Grant broad access when narrow works