We take the security of Canvas MCP seriously. If you discover a security vulnerability, please follow these guidelines:
DO NOT open a public GitHub issue for security vulnerabilities. Instead:
- Email: Send details to the maintainer at the email listed in the repository
- GitHub Security Advisory: Use GitHub's Security Advisory feature (preferred)
Please provide:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if available)
- Initial Response: Within 48 hours
- Status Update: Within 7 days
- Fix Timeline: Varies based on severity
- Critical: 1-7 days
- High: 7-14 days
- Medium: 14-30 days
- Low: Best effort
Critical: Your Canvas API token has full access to your Canvas account
-
Never commit tokens to version control
- Always use
.envfile for token storage - Verify
.envis in.gitignore - Use the provided
env.templateas a starting point
- Always use
-
Token Storage
- Store tokens in
.envfile with restricted permissions (chmod 600 .env) - Never share tokens via email, chat, or screenshots
- Use environment-specific tokens (dev vs. production)
- Store tokens in
-
Token Rotation
- Rotate tokens periodically (recommended: every 90 days)
- Immediately rotate if token may have been exposed
- Revoke tokens when no longer needed
-
Access Scope
- Canvas tokens have full account access - there is no scope limitation
- Consider using a dedicated Canvas account with limited permissions for MCP operations
- Never use admin account tokens unless absolutely necessary
The Canvas MCP server includes code execution capabilities (execute_typescript tool) for advanced operations.
Important Security Considerations:
-
Review Generated Code
- Always review TypeScript code before execution
- Understand what the code will do with your Canvas data
- Be cautious of code that modifies grades, enrollments, or course settings
-
Execution Environment
- Code executes locally in isolated temporary files
- Temporary files are automatically deleted after execution
- Environment variables are isolated (your Canvas token is still accessible)
-
Timeout Protection
- Code execution has a 120-second timeout by default
- Long-running operations are automatically terminated
-
What Code Execution Can Access
- Your Canvas API token (via environment variables)
- Your Canvas instance (via API calls)
- Local filesystem (temporary directory only)
- Network (can make HTTP requests)
Canvas MCP includes built-in privacy features for educational data:
-
Data Anonymization
- Enable via
ENABLE_DATA_ANONYMIZATION=truein.env - Anonymizes student names and emails before AI processing
- Preserves student IDs for functional operations
- Required for FERPA compliance when using AI tools
- Enable via
-
What Gets Anonymized
- Student names → Generic identifiers (Student A, Student B, etc.)
- Student emails → Anonymized addresses
- Student IDs → Preserved (needed for Canvas operations)
-
What Does NOT Get Anonymized
- Course information
- Assignment titles and descriptions
- Your own profile information
- Submission content and grades (but student identifiers are anonymized)
-
HTTPS Only
- Canvas API requires HTTPS
- HTTP URLs are automatically upgraded to HTTPS
-
User-Agent Header
- Canvas MCP includes proper User-Agent identification
- Required by Canvas API (effective January 2026)
- Format:
canvas-mcp/{version} (repository-url)
-
Rate Limiting
- Canvas API rate limits: ~700 requests per 10 minutes
- Canvas MCP includes automatic retry with exponential backoff
- Use
max_concurrent=5for bulk operations to avoid rate limits
-
Environment Isolation
- Run Canvas MCP in isolated environments (containers, virtual machines)
- Avoid running on shared systems with untrusted users
- Use separate Canvas tokens for different environments
-
File Permissions
- Restrict access to configuration files:
chmod 600 .env - Ensure code execution directory has appropriate permissions
- Review generated code files in
code_api/directory
- Restrict access to configuration files:
-
Logging and Monitoring
- Enable API request logging for debugging:
LOG_API_REQUESTS=true - Monitor for unusual API activity
- Review error logs for security issues
- Enable API request logging for debugging:
Canvas MCP includes several security features:
-
Automatic Rate Limit Handling
- Exponential backoff on 429 errors
- Configurable retry limits
- Respects Canvas
Retry-Afterheaders
-
Timeout Protection
- API request timeouts (configurable)
- Code execution timeouts (120s default)
- Prevents infinite loops and hangs
-
Input Validation
- Type validation for all tool parameters
- Course ID validation and caching
- Parameter sanitization
-
Error Handling
- Graceful error responses (no stack traces to users)
- Detailed error logging for debugging
- No sensitive data in error messages
-
Privacy Protection
- Configurable data anonymization
- Student PII protection
- FERPA-compliant operation mode
-
No Authentication
- MCP server trusts the local environment
- No built-in authentication for MCP clients
- Relies on Canvas API token for authorization
-
Code Execution Risks
execute_typescripttool executes arbitrary code- No sandboxing beyond temporary file isolation
- User responsible for reviewing generated code
-
No Rate Limiting Control
- Cannot prevent aggressive API usage
- Relies on Canvas server-side rate limiting
- User responsible for bulk operation throttling
-
Token Scope
- Canvas API tokens have full account access
- No way to limit token permissions via Canvas MCP
- Use Canvas account permissions for access control
Future security enhancements under consideration:
- Optional MCP client authentication
- Code execution sandboxing (Docker/VM isolation)
- Token encryption at rest
- Audit logging for sensitive operations
- Rate limiting controls for bulk operations
- Granular operation permissions
- Security scanning for generated code
Canvas MCP can be configured for FERPA compliance:
- Enable data anonymization:
ENABLE_DATA_ANONYMIZATION=true - Review privacy settings before using AI tools
- Ensure your Canvas instance is FERPA-compliant
- Follow your institution's data handling policies
Users must comply with:
- Canvas API Terms of Service
- Your Canvas instance's acceptable use policy
- Your institution's data handling requirements
For security concerns:
- GitHub Security Advisory: Create Advisory (preferred)
- Email: See repository contact information
Please do not open public issues for security vulnerabilities.
Last Updated: December 2025