Canvas LMS MCP server

Manage courses and assignments in Canvas learning system.
Back to servers
Setup instructions
Provider
DMontgomery40
Release date
Dec 05, 2024
Language
TypeScript
Stats
36 stars

The Canvas MCP Server provides a comprehensive Model Context Protocol server for Canvas LMS, enabling access to student, instructor, and account administration functionality. It lets you interact with Canvas LMS features through a standardized protocol interface.

Installation Options

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "canvas-mcp-server": {
      "command": "npx",
      "args": ["-y", "canvas-mcp-server"],
      "env": {
        "CANVAS_API_TOKEN": "your_token_here",
        "CANVAS_DOMAIN": "your_school.instructure.com"
      }
    }
  }
}

NPM Package

# Install globally
npm install -g canvas-mcp-server

# Configure
export CANVAS_API_TOKEN="your_token_here"
export CANVAS_DOMAIN="your_school.instructure.com"

# Run
canvas-mcp-server

Docker

docker run -d \
  --name canvas-mcp \
  -e CANVAS_API_TOKEN="your_token" \
  -e CANVAS_DOMAIN="school.instructure.com" \
  ghcr.io/dmontgomery40/mcp-canvas-lms:latest

Obtaining a Canvas API Token

  1. Log into Canvas → Account → Settings
  2. Scroll to "Approved Integrations"
  3. Click "+ New Access Token"
  4. Enter description: "Claude MCP Integration"
  5. Copy the generated token and save it securely

Note: For account-level operations, ensure your API token has administrative privileges.

Usage Examples

Student Workflows

Check Upcoming Assignments

"What assignments do I have due this week?"

Submit an Assignment

"Help me submit my essay for English 101 Assignment 3"

Check Grades

"What's my current grade in Biology?"

View Discussion Posts

"Show me the latest discussion posts in my Philosophy class"

Track Progress

"What modules do I need to complete in Math 200?"

Instructor Workflows

Create a New Course

"Create a new course called 'Advanced Biology' in account 123"

Administrator Workflows

Manage Users

"Create a new student user John Doe with email [email protected] in our main account"

Generate Reports

"Generate an enrollment report for account 456 for the current term"

List Account Courses

"Show me all published Computer Science courses in our Engineering account"

Production Deployment

Docker Compose

git clone https://github.com/DMontgomery40/mcp-canvas-lms.git
cd mcp-canvas-lms
cp .env.example .env
# Edit .env with your Canvas credentials
docker-compose up -d

Kubernetes

kubectl create secret generic canvas-mcp-secrets \
  --from-literal=CANVAS_API_TOKEN="your_token" \
  --from-literal=CANVAS_DOMAIN="school.instructure.com"

kubectl apply -f k8s/

Health Monitoring

# Check application health
curl http://localhost:3000/health

# Or use the built-in health check
npm run health-check

Troubleshooting

Common Issues

  • 401 Unauthorized: Check your API token and permissions
  • 404 Not Found: Verify course/assignment IDs and access rights
  • "Page not found" on course creation: Ensure you're using v2.2.0+ with the account_id parameter
  • Timeout: Increase CANVAS_TIMEOUT or check network connectivity

Debug Mode

export LOG_LEVEL=debug
npm start

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "canvas-mcp-server" '{"command":"npx","args":["-y","canvas-mcp-server"],"env":{"CANVAS_API_TOKEN":"your_token_here","CANVAS_DOMAIN":"your_school.instructure.com"}}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "canvas-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "canvas-mcp-server"
            ],
            "env": {
                "CANVAS_API_TOKEN": "your_token_here",
                "CANVAS_DOMAIN": "your_school.instructure.com"
            }
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "canvas-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "canvas-mcp-server"
            ],
            "env": {
                "CANVAS_API_TOKEN": "your_token_here",
                "CANVAS_DOMAIN": "your_school.instructure.com"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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