Canvas MCP on Cloudflare
This project deploys a read-only Canvas MCP server to Cloudflare Workers.
It includes a setup page so any user can:
- Enter their Canvas base URL
- Enter their Canvas access token
- Generate a private MCP endpoint to paste into Poke
The generated MCP URL contains an encrypted Canvas configuration. Treat it like a password.
What it supports
- Courses
- Assignments
- Files
- PDF text extraction
- Folders
- Modules
- Pages
- Announcements
- Discussion topics
- Quizzes
- Calendar events
- Todo items
Local development
- Install dependencies:
npm install
- Add a Worker secret for local
wrangler dev:
echo 'CONFIG_ENCRYPTION_SECRET=replace-with-a-long-random-string' > .dev.vars
- Start the Worker locally:
npm run dev
- Open the local URL shown by Wrangler, fill in the form, and copy the generated MCP URL.
Deploy to Cloudflare
- Authenticate if needed:
npx wrangler whoami
- Set the encryption secret:
npx wrangler secret put CONFIG_ENCRYPTION_SECRET
Use a long random value. Example:
openssl rand -base64 32
- Deploy:
npm run deploy
- Open the deployed Worker URL. Users can generate their own MCP URL from the setup page.
Poke setup
- In Canvas, create an access token from
Account > Settings. - Open the deployed setup page.
- Paste the Canvas base URL and token.
- Copy the generated MCP URL.
- In Poke, add an integration and use that generated MCP URL as the server URL.
Optional local Node mode
The original local server still works if you prefer fixed environment variables:
CANVAS_BASE_URL=https://canvas.school.edu \
CANVAS_TOKEN=your-token \
npm run start:http
License
Licensed under the GNU General Public License v3.0. See LICENSE.