Canvas MCP

Canvas MCP

MCP server for Canvas LMS that exposes courses, assignments, modules, pages, files, grades, and submissions as tools for AI agents.

Category
Visit Server

README

Canvas MCP

MCP (Model Context Protocol) server for Canvas LMS. Exposes Canvas courses, assignments, modules, pages, files, grades, and submissions as tools for AI agents.

Tools

Tool Description
list_courses List all active courses
get_course Course details, optionally with syllabus
list_modules Modules with items (pages, files, assignments)
list_assignments All assignments with due dates and points
get_assignment Full assignment with description + rubric
submit_url Submit a URL to an assignment
submit_text Submit text to an assignment
list_pages List course pages
get_page Get page content as plain text
get_file File metadata and download URL
list_files List all files (may 403 on some instances)
list_announcements Course announcements
list_discussions Discussion topics
list_groups Groups in a course
list_group_members Members of a group
my_grades Your graded submissions with rubric feedback
get_submission Your submission for a specific assignment
upcoming_events Upcoming calendar events
todo_items Canvas TODO items
whoami Authenticated user profile

Resources

URI Description
canvas://courses All active courses as JSON
canvas://todo Current TODO items as JSON

Setup

Environment Variables

export CANVAS_API_TOKEN="your-canvas-token"
export CANVAS_BASE_URL="https://your-institution.instructure.com"

Generate a token at: <your-canvas-url>/profile/settings+ New Access Token

Install

pip install -e .

Run

canvas-mcp              # stdio transport (for MCP clients)

Add to Hermes config.yaml

mcp_servers:
  canvas:
    command: canvas-mcp
    env:
      CANVAS_API_TOKEN: "your-token"
      CANVAS_BASE_URL: "https://psu.instructure.com"

Add to Claude Desktop

{
  "mcpServers": {
    "canvas": {
      "command": "canvas-mcp",
      "env": {
        "CANVAS_API_TOKEN": "your-token",
        "CANVAS_BASE_URL": "https://psu.instructure.com"
      }
    }
  }
}

Design Decisions

  • No stdout output from tools — tools return structured dicts/lists only, safe for coding agents
  • HTML is stripped — all Canvas HTML content is converted to readable plain text
  • Responses are slimmed — only relevant fields returned, no noise
  • Pagination handled — follows Canvas Link headers automatically (up to 10 pages)
  • Graceful 403 handlinglist_files returns an error dict with a hint instead of crashing
  • Client cleanup — every tool call opens and closes its own client connection

Testing

pip install pytest pytest-asyncio
pytest -v

Tests use a MockTransport that intercepts HTTP at the httpx layer — no real Canvas calls. Three test files:

  • test_client.py — Canvas API client unit tests
  • test_server.py — tool functions, HTML stripping, slimming helpers
  • test_integration.py — full pipeline: tool → client → mock HTTP → structured response

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured