Workshop

Canvas MCP + Codex

Set up AI-powered Canvas LMS tools in under 2 minutes. No coding required.

Workshop Canvas Course: canvas.illinois.edu/courses/68866
This is the sandbox course we'll use during the workshop. If you can see it when you log in, you're all set. Please only use this course URL for today's session.
Can't see the course? Email vishal@illinois.edu to be added.
1

Download the Codex App

1 min

Download the Codex desktop app for macOS:

Download Codex for Mac

  1. Open the .dmg file and drag Codex to Applications
  2. Launch Codex and sign in with an OpenAI API key (see below)

Download the Codex desktop app for Windows:

Download Codex for Windows

  1. Install from the Microsoft Store
  2. Launch Codex and sign in with an OpenAI API key (see below)
Enter API key: On the Codex sign-in screen, click "Enter API key" and paste the OpenAI API key from the MS Teams chat (it starts with sk-). This is not your Canvas API token — those are different keys used in a later step. Do not sign in with your ChatGPT Edu account.
2

Get Your Canvas API Token

2 min
  1. Go to the Canvas API Token Request page
  2. Fill out the form linked on that page to request your token
  3. Watch your email for a secure key distribution message with your token
  4. Copy the token and save it somewhere safe — you'll need it in the next step
The token arrives via a secure email link. Copy and save it right away — the link may expire.
3

Install Node.js (if you don't have it)

2 min

The setup wizard requires Node.js. Most learning designers won't have this yet — that's totally fine.

  1. Go to nodejs.org
  2. Click the LTS (recommended) download button
  3. Open the downloaded .pkg file and follow the installer
  4. Open Terminal: Press Cmd+Space to open Spotlight, type Terminal, and press Enter. A black/white window will appear — this is where you'll type commands.
  5. Type this and press Enter to confirm it worked:
    $ node --version
    You should see something like v22.x.x. If so, you're good!
Keep Terminal open — you'll need it for the next step.
  1. Go to nodejs.org
  2. Click the LTS (recommended) download button
  3. Run the downloaded .msi installer (accept all defaults)
  4. Open PowerShell: Press the Windows key, type PowerShell, and click Windows PowerShell. A blue window will appear — this is where you'll type commands.
  5. Type this and press Enter to confirm it worked:
    > node --version
    You should see something like v22.x.x. If so, you're good!
Keep PowerShell open — you'll need it for the next step.
4

Run the Setup Wizard

30 sec

In the same Terminal (Mac) or PowerShell (Windows) window from Step 3, run:

Windows users: If you get a "running scripts is disabled" error, try one of these fixes:
  1. Option A: Run this in PowerShell, type Y when prompted, then try again:
    > Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
  2. Option B (university laptops): If that doesn't work, close PowerShell and use Command Prompt instead. Press the Windows key, type cmd, and open it. The npx command works the same way there.
$ npx canvas-mcp setup

The wizard will ask you three things:

  1. Canvas API token — paste the token from Step 2
  2. Canvas URL — enter https://canvas.illinois.edu
  3. Which client — select Codex CLI (press Space, then Enter). This configures both the CLI and the desktop app.
Important: After the wizard finishes, it will tell you to set an environment variable. The command depends on your platform:
$ export CANVAS_API_TOKEN="your-token-here"

To make it persist, also add this line to your ~/.zshrc file.

The export command does not work on Windows. Instead, set a permanent environment variable in PowerShell:

> [System.Environment]::SetEnvironmentVariable("CANVAS_API_TOKEN","your-token-here","User")

Note: "User" stays exactly as written — only replace your-token-here with your actual token. After running this, close all terminals and reopen before continuing.

5

Restart Codex and Test

30 sec
Windows users: Before reopening Codex, close all PowerShell and Command Prompt windows first. Codex only reads environment variables at launch — if any old terminals are open, the Canvas token may not be picked up.
  1. Quit the Codex app completely (Cmd+Q on Mac, close window on Windows) and close all terminal windows
  2. Reopen the Codex app
  3. Open a folder first: Click the folder icon or File → Open Folder and select any directory (e.g., Desktop or an empty folder). Codex needs this before it can run commands.
  4. Start a new session and type this prompt:
What courses am I enrolled in?
If you see your course list, you're all set!

Workshop Day: AI Course Assembly

Together, we'll build a complete course in 30 minutes. Each person gets a role with specific prompts to run in Codex.

!

Before We Start

  1. Make sure you completed Steps 1–5 above and Codex can see your courses
  2. Open the workshop Canvas course
  3. Go to the “Start Here — Your Workshop Role” module
  4. Vishal will assign you a role — open your role page for prompts to copy into Codex

Content Creators

Role 1: Page Builder
Role 2: Assignment Designer
Role 3: Discussion Starter
Role 4: Resource Curator

Course Architects

Role 5: Rubric Builder
Role 6: Module Organizer
Role 7: Syllabus Author

Quality & Analytics

Role 8: Accessibility Auditor
Role 9: Announcer
Role 10: Course Reviewer

The Big Reveal

At the 20-minute mark, we'll screenshare the course and see what we built together!

Troubleshooting

npx command not found

You need Node.js installed. Download from nodejs.org (LTS version), then restart your terminal and try again.

Codex doesn't see Canvas tools after restart

The Codex desktop app needs the environment variable to be set globally. Add the export line to your shell profile so it persists:

$ echo 'export CANVAS_API_TOKEN="your-token"' >> ~/.zshrc

Then quit Terminal completely and reopen it, then relaunch the Codex app. On Windows, set it via System Properties → Environment Variables.

Canvas API token doesn't work

Double-check that you copied the entire token from the secure email (they're long). Also verify the Canvas URL matches exactly what your instructor provided (no trailing slash). If you haven't received the email yet, check your spam folder or re-submit the request form.

I see "unauthorized" or "forbidden" errors

Your Canvas token may have expired or been revoked. Go back to Canvas Settings → Approved Integrations and generate a new token. Then re-run npx canvas-mcp setup.

"Set up Agent sandbox to continue" error

Codex needs a project folder open before it can run commands. Click the folder icon or use File → Open Folder and select any directory (even an empty one works).

macOS: The native sandbox works out of the box — no Docker needed.

Windows: Open PowerShell as Administrator and run: wsl --install, then restart your computer. After restarting, reopen Codex and open a folder again.

Every command returns "usage limit" in Codex

This means your setup is actually working — Codex is authenticated and connected. The problem is likely that your ChatGPT Edu account doesn't include Codex access.

Fix: Sign out of your Edu/university ChatGPT account in the Codex app (Profile → Sign Out). Then reopen Codex and use it without signing in, or sign in with a personal (free) account. The free plan includes Codex.