Canvas MCP reads three environment variables to control authentication behavior. All are optional — if none are set, Canvas MCP auto-detects your Canvas domain and uses the default Chrome profile.
CANVAS_BASE_URL
The Canvas instance you want Canvas MCP to connect to.
| Detail | Value |
|---|
| Format | Full URL including scheme, e.g. https://school.instructure.com |
| When to set | When Chrome has sessions for more than one Canvas domain, or when you want to pin a specific instance |
| If omitted | Canvas MCP scans Chrome cookies and uses the domain automatically if exactly one Canvas domain has a complete session |
export CANVAS_BASE_URL=https://school.instructure.com
If Chrome has sessions for multiple Canvas domains and CANVAS_BASE_URL is not set, Canvas MCP cannot auto-detect which one to use and will exit with an error listing the ambiguous domains. Set this variable to resolve the conflict.
CANVAS_CHROME_PROFILE
The name of the Chrome profile to read cookies from.
| Detail | Value |
|---|
| Format | Profile display name or directory name, e.g. "terpmail.umd.edu" or "Default" |
| When to set | When multiple Chrome profiles exist and the one with your Canvas session is not the default |
| If omitted | The profile saved via canvas settings choose-profile is used; if none is saved, the default Chrome profile is used |
export CANVAS_CHROME_PROFILE="terpmail.umd.edu"
Canvas MCP matches this value case-insensitively against both the profile’s display name (e.g. “terpmail.umd.edu”) and its directory name (e.g. “Profile 3”).
CANVAS_CHROME_PROFILE_PATH
The absolute path to a Chrome profile directory.
| Detail | Value |
|---|
| Format | Absolute filesystem path, e.g. /home/user/.config/google-chrome/Profile 3 |
| When to set | When you need to point to a specific directory — useful for non-standard Chrome installations or when the profile name is ambiguous |
| If omitted | Falls back to CANVAS_CHROME_PROFILE, then saved settings, then the default profile |
export CANVAS_CHROME_PROFILE_PATH="/home/user/.config/google-chrome/Profile 3"
CANVAS_CHROME_PROFILE_PATH takes precedence over CANVAS_CHROME_PROFILE when both are set, because a path is unambiguous.
Precedence order
When Canvas MCP resolves which profile to use, it checks in this order:
CANVAS_CHROME_PROFILE_PATH (most specific)
CANVAS_CHROME_PROFILE
- Saved settings (
canvas settings choose-profile)
- Default Chrome profile (auto-detected)
For the base URL:
CANVAS_BASE_URL
- Auto-detection from Chrome cookies
Shell export example
# Pin a Canvas domain and select a Chrome profile by name
export CANVAS_BASE_URL=https://school.instructure.com
export CANVAS_CHROME_PROFILE="terpmail.umd.edu"
# Verify everything is working
canvas auth-status
You can add these exports to your shell profile (~/.zshrc, ~/.bashrc, etc.) to apply them permanently.
Multiple Canvas domains
If you are signed into more than one Canvas site across your Chrome profiles — for example, one for a university and one for a workplace — set CANVAS_BASE_URL to the domain you want Canvas MCP to use. Without it, Canvas MCP will see multiple Canvas sessions and refuse to guess.
# University instance
export CANVAS_BASE_URL=https://university.instructure.com
export CANVAS_CHROME_PROFILE="University"
# Workplace instance (swap these when switching)
# export CANVAS_BASE_URL=https://company.instructure.com
# export CANVAS_CHROME_PROFILE="Work"