Canvas Learning Management System MCP server

Integrates with the Canvas Learning Management System API to enable course management, assignment tracking, and student engagement analysis in educational settings.
Back to servers
Provider
Vishal Sachdev
Release date
Feb 28, 2025
Language
Python
Stats
3 stars

Canvas MCP Server is an implementation of the Message Control Protocol that creates a local interface to the Canvas Learning Management System API. It enables you to manage courses, access assignments, view announcements, and interact with other Canvas resources through Claude Desktop or other MCP clients.

Prerequisites

Before installing the Canvas MCP Server, ensure you have:

Installation

Follow these steps to install the Canvas MCP Server:

  1. Clone the repository:

    git clone https://github.com/vishalsachdev/canvas-mcp.git
    cd canvas-mcp
    
  2. Create and activate a virtual environment:

    python -m venv canvas-mcp
    source canvas-mcp/bin/activate  # On Unix/macOS
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Configuration

Setting Up Environment Variables

  1. Create a .env file in the root directory with your Canvas credentials:

    CANVAS_API_TOKEN=your_canvas_api_token_here
    CANVAS_API_URL=https://canvas.youruniversity.edu/api/v1
    
  2. Make the start script executable:

    chmod +x start_canvas_server.sh
    

Configuring Claude Desktop

  1. Create or edit the Claude Desktop configuration file:

    vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  2. Add the Canvas MCP server configuration:

    {
      "mcpServers": [
        {
          "name": "canvas-api",
          "command": "/Users/YOUR_USERNAME/path/to/canvas-mcp/start_canvas_server.sh"
        }
      ]
    }
    
  3. Replace the path with the absolute path to your cloned repository

  4. Restart Claude Desktop to load the new configuration

Using Canvas MCP Server

With Claude Desktop

Claude Desktop will automatically start the server when needed. You can:

  • Click the hammer icon (🔨) to see available Canvas API tools
  • Ask Claude to perform operations like "Show me my courses" or "Get the syllabus for my Biology course"

Available Tools

Course Management

  • List all courses for the authenticated user
  • Get detailed information about a specific course
  • Generate a comprehensive course summary

Assignments

  • List all assignments for a course
  • Get detailed information about specific assignments
  • Retrieve full assignment descriptions

Submissions and Users

  • List all submissions for a specific assignment
  • List all users enrolled in a course

Resources

  • List course announcements
  • Get course syllabi
  • Retrieve course modules

Manual Testing

You can start the server directly for testing:

./start_canvas_server.sh

Troubleshooting

If you encounter problems:

  • Server Won't Start: Verify your .env file exists with valid credentials, check the virtual environment path, and ensure all dependencies are installed

  • Authentication Errors: Confirm your Canvas API token is valid and you have the necessary permissions

  • Connection Issues: Verify your Canvas API URL is correct and check your internet connection

  • Debugging: Check server logs in the Claude Desktop console or run the server manually to see error output

Security Notes

  • Your Canvas API token grants access to your Canvas account
  • Never commit your .env file to version control
  • Consider using a token with limited permissions if possible

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later