MCP Security Best Practices
Security guidelines and best practices for MCP integration
This guide covers security considerations and best practices for using Task Genius MCP integration safely and securely.
Security Overview
Task Genius MCP implements multiple security layers:
Authentication & Authorization
Token Security
Token Generation:
- Tokens are cryptographically random (32+ characters)
- Generated using secure random functions
- Unique per vault installation
Token Storage:
Token Rotation:
Rotate tokens:
- Every 90 days (recommended)
- After any suspected compromise
- When changing access patterns
- Before major vault migrations
App ID Protection
The App ID provides an additional security layer:
Benefits:
- Vault-specific identification
- Prevents token reuse across vaults
- Enables audit trails
- Supports multi-vault setups
Network Security
Local-Only Mode (Default)
Configuration:
Security benefits:
- No external network access
- Protected from remote attacks
- No firewall configuration needed
- Ideal for single-user setups
Network Access Mode
⚠️ Only enable if necessary:
Required protections:
- Firewall Rules:
- VPN/Tunnel:
- Reverse Proxy with SSL:
Data Protection
Sensitive Information
Never expose in tasks:
- Passwords or API keys
- Personal identification numbers
- Credit card information
- Private keys or certificates
- Medical/financial data
Use references instead:
Vault Encryption
Enable Obsidian vault encryption:
- Use encrypted disk/volume:
- Sync with encrypted services:
- Use end-to-end encrypted sync
- Enable 2FA on cloud services
- Avoid public/shared folders
Backup Security
Secure backup practices:
Access Control
Client Authentication
Verify client identity:
Rate Limiting
Prevent abuse:
Session Management
Session security:
- Sessions expire after inactivity (default: 1 hour)
- Unique session ID per connection
- Sessions bound to IP address
- No session sharing between clients
Audit & Monitoring
Enable Logging
Set appropriate log level:
Monitor Access Patterns
Watch for suspicious activity:
Alert triggers:
- Multiple failed authentication attempts
- Unusual query patterns
- Mass deletion requests
- Access from unexpected IPs
Security Events
Log security-relevant events:
Secure Configuration Examples
Development Environment
Production Environment
Team Environment
Security Checklist
Initial Setup
- Generate strong authentication token
- Store credentials securely
- Configure local-only access by default
- Enable appropriate logging
- Test authentication before use
- Document security configuration
Regular Maintenance
- Rotate tokens quarterly
- Review access logs monthly
- Update Task Genius regularly
- Audit client configurations
- Test backup/restore procedures
- Review firewall rules
Incident Response
If you suspect a security breach:
-
Immediate Actions:
- Disable MCP server
- Regenerate all tokens
- Review recent access logs
- Check for unauthorized changes
-
Investigation:
- Identify breach timeline
- Determine data accessed
- Find attack vector
- Document findings
-
Recovery:
- Restore from secure backup
- Implement additional controls
- Update security procedures
- Notify affected parties if needed
Common Vulnerabilities
1. Token Exposure
Risk: Tokens in version control
Prevention:
Detection:
2. Insecure Transport
Risk: Token interception on network
Mitigation:
- Use HTTPS when possible
- Implement VPN for remote access
- Use SSH tunnels for security
- Never use public WiFi unprotected
3. Excessive Permissions
Risk: Overly broad access
Mitigation:
- Principle of least privilege
- Separate read/write tokens (future)
- Time-based access controls
- Regular permission audits
Compliance Considerations
GDPR Compliance
If handling EU personal data:
- Implement data minimization
- Provide data export capabilities
- Enable deletion rights
- Maintain audit logs
- Document data processing
HIPAA Compliance
For healthcare-related tasks:
- Encrypt data at rest and in transit
- Implement access controls
- Maintain audit trails
- Regular security assessments
- Business Associate Agreements
SOC 2 Requirements
For enterprise use:
- Document security policies
- Regular vulnerability assessments
- Incident response procedures
- Change management processes
- Third-party audits
Security Tools
Testing Tools
Monitoring Scripts
Recommendations by Use Case
Personal Use
- Local-only access (127.0.0.1)
- Simple token authentication
- Minimal logging
- Regular backups
Small Team
- VPN-based access
- Shared token with rotation
- Info-level logging
- Encrypted backups
Enterprise
- Zero-trust network model
- Certificate-based auth
- Comprehensive audit logging
- Automated security scanning
- Regular penetration testing
Next Steps
- Review troubleshooting guide for security-related issues
- Implement monitoring and alerting
- Join security discussions
- Report security issues privately to [email protected]
Security Report: If you discover a security vulnerability, please report it privately to [email protected]. Do not create public issues for security problems.