Canvas LMS MCP Server

Canvas LMS MCP Server

Enables AI assistants to access Canvas LMS course content, including assignments, modules, announcements, and files, to help students manage their coursework.

Category
访问服务器

README

Canvas LMS MCP Server

A Model Context Protocol (MCP) server that provides comprehensive access to Canvas LMS course content, enabling AI assistants to help students manage their coursework more effectively.

Features

📚 Course Management

  • List enrolled courses with detailed information
  • Access course modules and structured content
  • Navigate learning materials and resources

📝 Assignment Support

  • View assignments with due dates and requirements
  • Get detailed assignment descriptions and grading criteria
  • Track submission status and progress

📢 Communications

  • Read course announcements and updates
  • Stay informed about important course notifications

📁 Content Access

  • Extract content from course pages (lectures, readings, etc.)
  • Access files, presentations, videos, and other media
  • Search across all course materials
  • Download links for course resources

🗓️ Week-based Navigation

  • Extract complete content for any course week
  • Automatic module detection by week number
  • Comprehensive content previews

Installation

Prerequisites

  • Node.js 18+ and npm
  • Canvas LMS access token
  • Canvas LMS instance URL

Quick Installation (Recommended)

Install globally from GitHub:

npm install -g git+https://github.com/mandaza/mcp-canvas-lms-student.git

Alternative: Local Development Installation

  1. Clone the repository:

    git clone https://github.com/mandaza/mcp-canvas-lms-student.git
    cd mcp-canvas-lms-student
    npm install
    
  2. Build the server:

    npm run build
    

Configuration

Getting a Canvas Access Token

  1. Log into your Canvas LMS instance
  2. Go to Account → Settings
  3. Scroll down to "Approved Integrations"
  4. Click "+ New Access Token"
  5. Give it a purpose (e.g., "MCP Server Access")
  6. Copy the generated token for use in Claude Desktop

⚠️ Important: Keep your access token secure and never share it.

Integration Options

This MCP server supports multiple integration modes:

Option 1: Claude Desktop (stdio mode)

Add this configuration to your Claude Desktop settings:

{
  "mcpServers": {
    "canvas": {
      "command": "canvas-mcp",
      "env": {
        "CANVAS_BASE_URL": "https://your-institution.instructure.com",
        "CANVAS_ACCESS_TOKEN": "your_canvas_access_token_here"
      }
    }
  }
}

Configuration File Locations:

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

Option 2: Open WebUI (HTTP/SSE mode)

For Open WebUI integration, see the detailed Open WebUI Setup Guide.

Quick Start:

  1. Create a .env file with your Canvas credentials and server configuration
  2. Start the HTTP server: npm run start:http
  3. In Open WebUI Admin Settings → External Tools, add an MCP server:
    • Type: MCP (Streamable HTTP)
    • Server URL: http://localhost:3001/sse
    • (Use http://host.docker.internal:3001/sse if Open WebUI is in Docker)

Option 3: n8n Workflows (HTTP mode)

For n8n workflow automation, see the detailed n8n Integration Guide.

Quick Start:

  1. Start the HTTP server: npm run start:http
  2. In n8n, use the HTTP Request node with:
    • Method: POST
    • URL: http://localhost:3001/message
    • Body: MCP JSON-RPC format
  3. Check the guide for complete workflow examples

All modes can run simultaneously if needed!

Available Tools

The server provides 17 tools for comprehensive Canvas access:

Course Tools

  • list_courses - Get all enrolled courses
  • get_course_details - Get detailed course information
  • list_course_modules - Get course module structure
  • get_module_items - Get items within a specific module

Assignment Tools

  • list_assignments - Get all course assignments
  • get_assignment_details - Get detailed assignment information
  • list_assignment_submissions - Check submission status and feedback

Content Extraction Tools

  • get_page_content - Extract full content from course pages
  • get_file_content - Get file information and download URLs
  • get_media_content - Access video/audio content and streams
  • extract_module_content - Extract all content from a module
  • get_week_content - Extract content for a specific week

Communication Tools

  • list_announcements - Get course announcements
  • get_announcement_details - Read specific announcements

Resource Tools

  • list_course_files - Get all course files and resources
  • get_file_details - Get file metadata and access information
  • search_course_content - Search across all course materials

Example Queries

Once integrated with Claude Desktop, you can use natural language queries like:

"Show me all my current courses"
"What assignments do I have due this week in Biology 101?"
"Extract all content from Week 10 in my Data Structures course"
"Find all materials related to 'machine learning' in my courses"
"Show me recent announcements from my professors"
"Get the presentation slides from today's lecture"

Development

Building

npm run build

Development Mode

npm run dev

Project Structure

src/
├── index.ts              # Main MCP server
├── canvas-client.ts      # Canvas API client
├── tools/               # MCP tool definitions
│   ├── course-tools.ts
│   ├── assignment-tools.ts
│   ├── announcement-tools.ts
│   ├── library-tools.ts
│   └── content-tools.ts
├── prompts/             # Predefined prompts
│   └── index.ts
└── resources/           # Resource definitions
    └── index.ts

Security & Privacy

  • Read-only access: Students can only read their course data, not modify it
  • Rate limiting: Built-in request throttling to prevent API abuse
  • Secure authentication: Uses Canvas API tokens with proper error handling
  • Local processing: All data processing happens locally

Troubleshooting

Common Issues

Authentication Failed

  • Verify your Canvas access token is correct and hasn't expired
  • Ensure your Canvas base URL is properly formatted
  • Check that your token has the necessary permissions

No Content Found

  • Verify you're enrolled in the course
  • Check that the course content is published and accessible
  • Ensure the course/module/week numbers are correct

Connection Issues

  • Verify your Canvas instance is accessible
  • Check network connectivity
  • Ensure Canvas isn't undergoing maintenance

Deployment & Hosting

To use your MCP server from anywhere (not just localhost), you need to host it on a server or cloud platform.

Quick Start Guides

Hosting Options

Platform Time Cost Best For
Railway.app 10 min Free tier Easiest deployment
Render.com 10 min Free tier Simple setup
DigitalOcean VPS 20 min $4-6/month Full control
Docker 15 min Varies Containerized apps

Security (Required for Production!)

Before deploying to production, you must add API key authentication:

# Generate a secure API key
openssl rand -hex 32

# Add to your .env file
API_KEY=your_generated_key_here

See SECURITY.md for detailed setup instructions.

License

This project is licensed under the ISC License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选