Sponsored by Deepsite.site

Canvas MCP Server

Created By
defsolmcp9 months ago
A Model Context Protocol (MCP) server for interacting with the Canvas LMS API
Content

Canvas MCP Server

A Model Context Protocol (MCP) server for interacting with the Canvas LMS API. This server provides tools for managing courses, users, content, and assessments in Canvas.

Features

  • Authentication: Secure authentication with Canvas API tokens
  • Course Management: Get course information, list courses, update course settings
  • User Management: Get user information, list course users, manage enrollments
  • Content Management: Create and manage pages, modules, and module items
  • Assessment Management: Create and manage assignments, grade submissions, create announcements
  • Quiz Management: Create and manage quizzes, quiz questions, and grade quiz submissions

Prerequisites

  • Node.js 16 or higher
  • A Canvas LMS instance
  • Canvas API token with appropriate permissions

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/canvas-mcp-server.git
    cd canvas-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file based on the .env.example file:

    cp .env.example .env
    
  4. Edit the .env file with your Canvas API token and URL:

    CANVAS_API_TOKEN=your_canvas_api_token_here
    CANVAS_API_URL=https://your-institution.instructure.com/api/v1
    MCP_SERVER_NAME=canvas-mcp
    
  5. Build the project:

    npm run build
    

Usage

Running the Server

npm start

Configuring with Claude for Desktop

To use this MCP server with Claude for Desktop, add the following to your Claude for Desktop configuration file:

{
  "mcpServers": {
    "canvas-mcp": {
      "command": "node",
      "args": [
        "/ABSOLUTE/PATH/TO/canvas-mcp-server/dist/index.js"
      ]
    }
  }
}

Replace /ABSOLUTE/PATH/TO/ with the actual path to your canvas-mcp-server directory.

Configuring with Anything LLM

To use this MCP server with Anything LLM, add the following to your Anything LLM MCP configuration:

  1. Navigate to Settings > MCP in your Anything LLM interface
  2. Add a new MCP server with the following configuration:
{
  "name": "canvas-mcp",
  "command": "node",
  "args": [
    "/ABSOLUTE/PATH/TO/canvas-mcp-server/dist/index.js"
  ]
}

Replace /ABSOLUTE/PATH/TO/ with the actual path to your canvas-mcp-server directory.

For more information, see the Anything LLM MCP documentation.

Available Tools

Course Management

  • get_course: Get information about a Canvas course
  • list_courses: List Canvas courses for the current user
  • update_course: Update Canvas course settings
  • get_course_modules: Get modules for a Canvas course
  • get_course_assignments: Get assignments for a Canvas course

User Management

  • get_user: Get information about a Canvas user
  • get_self: Get information about the current Canvas user
  • list_course_users: List users enrolled in a Canvas course
  • enroll_user: Enroll a user in a Canvas course
  • remove_enrollment: Remove a user enrollment from a Canvas course
  • send_message: Send a message to a Canvas user

Content Management

  • get_course_pages: Get pages for a Canvas course
  • get_page_content: Get content of a Canvas page
  • create_or_update_page: Create or update a Canvas page
  • delete_page: Delete a Canvas page
  • create_module: Create a new module in a Canvas course
  • add_module_item: Add an item to a module in a Canvas course

Assessment Management

  • create_assignment: Create a new assignment in a Canvas course
  • update_assignment: Update an existing assignment in a Canvas course
  • grade_submission: Grade a student submission for an assignment
  • get_submissions: Get student submissions for an assignment
  • create_announcement: Create a new announcement in a Canvas course

Quiz Management

  • list_quizzes: List quizzes in a Canvas course
  • get_quiz: Get details of a specific quiz
  • create_quiz: Create a new quiz in a Canvas course
  • update_quiz: Update an existing quiz in a Canvas course
  • delete_quiz: Delete a quiz from a Canvas course
  • get_quiz_questions: Get questions for a specific quiz
  • create_quiz_question: Create a new question for a quiz
  • update_quiz_question: Update an existing quiz question
  • delete_quiz_question: Delete a question from a quiz
  • get_quiz_submissions: Get submissions for a specific quiz
  • grade_quiz_submission: Grade a quiz submission

Development

Project Structure

canvas-mcp-server/
├── src/
│   ├── index.ts            # Main entry point
│   ├── auth/               # Authentication handling
│   ├── api/                # Canvas API client
│   │   └── client.ts       # API client with pagination and rate limiting
│   ├── tools/              # MCP tool implementations
│   │   ├── courses.ts      # Course-related tools
│   │   ├── users.ts        # User-related tools
│   │   ├── content.ts      # Content-related tools
│   │   ├── assessments.ts  # Assessment-related tools
│   │   └── quizzes.ts      # Quiz-related tools
│   └── utils/
│       ├── logging.ts      # Logging utilities
│       └── error.ts        # Error handling utilities
├── dist/                   # Compiled JavaScript files
├── .env                    # Environment variables
└── package.json            # Project dependencies

Running in Development Mode

npm run dev

License

MIT

Acknowledgements

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.