Canvas Learning Management
STDIOMCP server implementation for interacting with Canvas Learning Management System API.
MCP server implementation for interacting with Canvas Learning Management System API.
This repository contains a Message Control Protocol (MCP) server implementation for interacting with the Canvas Learning Management System API. The server is designed to work with Claude Desktop and potentially other MCP clients.
The Canvas MCP Server provides a local interface to Canvas LMS API, allowing you to:
git clone https://github.com/vishalsachdev/canvas-mcp.git cd canvas-mcp
python -m venv canvas-mcp source canvas-mcp/bin/activate # On Unix/macOS
pip install -r requirements.txt
Create a .env
file in the root directory with the following variables:
CANVAS_API_TOKEN=your_canvas_api_token_here
CANVAS_API_URL=https://canvas.youruniversity.edu/api/v1
Replace the values with:
The start_canvas_server.sh
script is already configured to:
.env
fileMake the start script executable:
chmod +x start_canvas_server.sh
Install Claude Desktop if you haven't already.
Create or edit the Claude Desktop configuration file:
vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
{ "mcpServers": [ { "name": "canvas-api", "command": "/Users/YOUR_USERNAME/path/to/canvas-mcp/start_canvas_server.sh" } ] }
Replace /Users/YOUR_USERNAME/path/to/canvas-mcp
with the absolute path to where you cloned this repository.
The server provides the following tools for Canvas LMS interaction:
list_courses
: List all courses for the authenticated userget_course_details
: Get detailed information about a specific coursesummarize_course
: Generate a comprehensive summary of a courselist_assignments
: List all assignments for a courseget_assignment_details
: Get detailed information about a specific assignmentget_assignment_description
: Get the full description of an assignmentlist_submissions
: List all submissions for a specific assignmentlist_users
: List all users enrolled in a courselist_announcements
: List all announcements for a courseget_course_syllabus
: Get the syllabus for a courseget_course_modules
: Get all modules for a courseThis MCP server is designed to work seamlessly with Claude Desktop:
For manual testing, you can start the server directly:
./start_canvas_server.sh
The server uses:
fastmcp
: A Python library for building MCP servershttpx
: For asynchronous HTTP requests to the Canvas APIThe main implementation file is canvas_server_cached.py
, which provides:
The server requires the following Python packages:
httpx
: For HTTP requestsfastmcp
: For MCP server implementationrequests
: For some HTTP operationsIf you encounter issues:
Server Won't Start
.env
file exists and contains valid credentialsstart_canvas_server.sh
Authentication Errors
Connection Issues
Debugging
.env
file to version controlContributions are welcome! Feel free to:
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Vishal Sachdev