Логотип Canvas MCP 服务器

Canvas MCP 服务器

Сообщество
r-huijts

Model Context Protocol server for Canvas LMS

Издательr-huijts
Репозиторийcanvas-mcp
ЯзыкTypeScript
Форки
7
Звёзды
12
Доступные инструменты
0
Тип транспортаstdio
Категории
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Canvas MCP 服务器 предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 12, форки: 7 — в связанном репозитории.

Canvas MCP Server

npm version license MCP

Connect AI assistants to Canvas LMS — manage courses, grade submissions, edit pages, and analyze rubrics through natural conversation.

Quick Start

  1. Get a Canvas API token — Canvas → Account → Settings → Approved Integrations → New Access Token
  2. Install via Claude Desktop Extension or npx @r-huijts/canvas-mcp
  3. Try a prompt — "List all my active Canvas courses"

Table of Contents

Features

  • Courses — list active courses, post announcements
  • Assignments — create, update, delete assignments and assignment groups; bulk date updates
  • Submissions — grade work, post feedback, download submission files
  • Rubrics — view rubrics, analyze statistics, attach rubrics to assignments
  • Students — enrollment lists with privacy-first anonymization
  • Sections — list sections and section-filtered submissions
  • Modules — full module and module-item CRUD
  • Files — browse the course Files section: folder trees, file lists, and per-folder contents
  • Pages — edit content, manage revisions, and use the styleguide system (generate-styleguide, patch-page-content)
  • Quizzes — full quiz, question, and question-group CRUD
  • Quiz results — per-student answers, item analysis, report generation, and regrading
  • ePortfolios — list and read student ePortfolios
  • Prompts — analyze-rubric-statistics for multi-assignment rubric visualizations
  • Performance — ETag-based response caching to reduce API load and token use

69 tools and 1 prompt in total. See docs/TOOLS.md for the full parameter reference.

Prerequisites

  • Node.js v16 or higher (for npm/source installs; not required for the Desktop Extension)
  • A Canvas API token with access to the courses you intend to manage
  • Your Canvas instance URL (e.g. https://yourschool.instructure.com)

Note: The server defaults to https://fhict.instructure.com if CANVAS_BASE_URL is not set. Set this variable to your own institution's Canvas URL.

Installation

Option 1: Desktop Extension (Easiest)

One-click installation with Claude Desktop Extensions:

  1. Download the latest extension from GitHub Releases (.mcpb or .dxt format, depending on the release)
  2. Open the file with Claude Desktop (double-click or drag-and-drop)
  3. Click "Install"
  4. Configure your Canvas API token and base URL through the Claude Desktop UI

Benefits: no terminal required, secure token storage in the OS keychain, bundled dependencies, cross-platform (macOS and Windows).

To build the extension yourself, see DESKTOP_EXTENSION.md.

Option 2: NPM Package (Recommended)

bash
npm install -g @r-huijts/canvas-mcp

Or run directly without installing:

bash
npx @r-huijts/canvas-mcp

Option 3: From Source

bash
git clone https://github.com/r-huijts/canvas-mcp
cd canvas-mcp
npm install
cp .env.example .env   # then edit with your credentials
npm run build
npm start

For development with auto-reload:

bash
npm run dev

Configuration

Set these environment variables (via .env file, MCP client config, or shell):

VariableRequiredDescription
CANVAS_API_TOKENYesPersonal access token from Canvas
CANVAS_BASE_URLNoYour Canvas instance URL (default: https://fhict.instructure.com)

See .env.example for a template.

Getting a Canvas API Token

  1. Log in to your Canvas instance
  2. Go to Account → Settings → Approved Integrations
  3. Click + New Access Token
  4. Copy the token — you won't be able to see it again

Your token must belong to a user with teacher (or equivalent) access to the courses you want to manage. Canvas personal access tokens inherit the permissions of the account that created them.

Claude Desktop Integration

  1. Open Claude Desktop's configuration file:

    macOS:

    bash
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json

    Windows:

    bash
    code %AppData%\Claude\claude_desktop_config.json
  2. Add the Canvas MCP server:

    NPM package (recommended):

    json
    {
      "mcpServers": {
        "canvas": {
          "command": "npx",
          "args": ["-y", "@r-huijts/canvas-mcp"],
          "env": {
            "CANVAS_API_TOKEN": "your_token_here",
            "CANVAS_BASE_URL": "https://your-canvas-instance.com"
          }
        }
      }
    }

    From source:

    json
    {
      "mcpServers": {
        "canvas": {
          "command": "node",
          "args": ["/absolute/path/to/canvas-mcp/dist/index.js"],
          "env": {
            "CANVAS_API_TOKEN": "your_token_here",
            "CANVAS_BASE_URL": "https://your-canvas-instance.com"
          }
        }
      }
    }
  3. Restart Claude Desktop

The -y flag tells npx to accept the package installation prompt automatically.

Other MCP Clients

Any MCP client that supports stdio transport can use the same configuration pattern. Replace the config file path with your client's equivalent:

json
{
  "mcpServers": {
    "canvas": {
      "command": "npx",
      "args": ["-y", "@r-huijts/canvas-mcp"],
      "env": {
        "CANVAS_API_TOKEN": "your_token_here",
        "CANVAS_BASE_URL": "https://your-canvas-instance.com"
      }
    }
  }
}

This works with Cursor, VS Code MCP extensions, and other stdio-based clients. Consult your client's MCP documentation for where to place the config file.

Usage Examples

Copy-paste these prompts into your AI assistant after connecting the server:

List all my active Canvas courses
Post an announcement to course 12345 titled "Week 3 Update" with a summary of this week's topics
Show rubric statistics for assignment 67890 in course 12345
List all folders and files in the Files section of course 12345
Generate a styleguide for course 12345, then patch the syllabus page to match it
List all students in course 12345 with their actual names and emails

Student Data Privacy

This server includes privacy-first anonymization for student data. By default, student names and emails are pseudonymized; you can request real identities using natural language.

Default behavior:

  • Names become Student 1, Student 2, etc.
  • Emails become student1@example.com, student2@example.com
  • The same student always gets the same pseudonym across calls
  • Teacher and admin names are never anonymized

Requesting real data:

List all students in course 123, but show their actual names and emails

Affected tools: list-students, list-assignments (with submission data), list-assignment-submissions, list-section-submissions, list-rubric-assessments, get-submission-documents

Each affected tool accepts an anonymous parameter (default: true). Your AI assistant sets anonymous: false when you ask for real names.

The anonymization system targets student privacy while preserving educational context:

  • Students are the protected population whose privacy needs safeguarding
  • Knowing which instructor provided feedback is pedagogically valuable
  • Comments include an author.role field — only role === 'student' authors are anonymized

Example with anonymization enabled:

✅ "Excellent analysis! - Prof. Johnson"
❌ "I found this confusing - Student 1"

If you need full anonymization including staff, you can modify the logic in src/anonymizer.ts.

Tool Reference

CategoryCountTools
Courses2list-courses, post-announcement
Students1list-students
Assignments5list-assignments, get-assignment, create-assignment, update-assignment, delete-assignment
Assignment Groups3list-assignment-groups, create-assignment-group, bulk-update-assignment-dates
Submissions6list-assignment-submissions, grade-submission, post-submission-comment, get-submission-documents, get-submission-file-info, download-submission-file
Sections2list-sections, list-section-submissions
Rubrics4list-rubrics, get-rubric-statistics, list-rubric-assessments, attach-rubric-to-assignment
Modules10list-modules, list-module-items, toggle-module-publish, create-module, update-module, delete-module, get-module-item, create-module-item, update-module-item, delete-module-item
Files3list-folders, list-files, list-folder-contents
Pages9list-pages, get-page-content, update-page-content, list-page-revisions, revert-page-revision, patch-page-content, apply-page-changes, generate-styleguide, get-styleguide
Quizzes15list-quizzes, get-quiz, create-quiz, update-quiz, delete-quiz, list-quiz-questions, get-quiz-question, create-quiz-question, update-quiz-question, delete-quiz-question, list-quiz-question-groups, get-quiz-question-group, create-quiz-question-group, update-quiz-question-group, delete-quiz-question-group
Quiz Results6list-quiz-submissions, get-quiz-statistics, get-quiz-submission-answers, get-quiz-report, get-quiz-submission-events, update-quiz-submission-score
ePortfolios3list-eportfolios, get-eportfolio, get-eportfolio-pages

Full parameter reference: docs/TOOLS.md

Available Prompts

analyze-rubric-statistics

Analyzes rubric statistics for formative assignments in a course and creates visualizations.

  • Required: courseName (string)
  • Creates grouped stacked bar and grouped bar charts across assignments and criteria
  • Includes progression analysis and trend identification

Troubleshooting

Server not appearing in Claude Desktop

  • Verify JSON syntax in your config file
  • Use absolute paths for source installs (dist/index.js, not build/index.js)
  • Ensure your Canvas API token is valid
  • Restart Claude Desktop

Connection errors

  • Confirm your token has access to the target courses
  • Verify CANVAS_BASE_URL points to your institution's Canvas instance
  • Check MCP logs:
    bash
    # macOS
    tail -f ~/Library/Logs/Claude/mcp*.log
    # Windows
    type %AppData%\Claude\Logs\mcp*.log

NPX issues

  • On Windows, ensure npm/npx are on your PATH
  • For permission errors, try running Claude Desktop as administrator (Windows)
  • Corporate networks may require npm proxy configuration

Debug logging

The server logs errors to stderr. Redirect when running manually:

bash
node dist/index.js 2> debug.log

Performance & Caching

The server caches stable Canvas API responses to avoid redundant fetches and reduce token consumption.

How it works:

  • First request stores the response body and any ETag or Last-Modified header
  • Subsequent requests send conditional GETs (If-None-Match / If-Modified-Since); Canvas returns 304 Not Modified when data is unchanged
  • If Canvas omits validator headers, a 30-minute TTL is used as fallback
  • Write operations (POST, PUT, DELETE) evict affected cache entries

What is never cached:

  • Submission and grade data (/submissions endpoints) — always fetched live
  • Paginated fetchAllPages() calls (students, submissions, ePortfolios) bypass the ETag cache and always hit the network — relevant for large courses

Development

Architecture

MCP Client → stdio → src/index.ts → src/tools/* → CanvasClient → Canvas REST API

Key modules:

Tool registration

This server uses the MCP TypeScript SDK (v1.29.0). Each tool is registered with server.tool() using a five-argument form:

  1. Tool name (string)
  2. Tool description (string)
  3. Input schema (Zod schema)
  4. Tool annotations ({ readOnlyHint?, destructiveHint?, idempotentHint? })
  5. Execute function
typescript
server.tool(
  "list-courses",
  "List all active courses for the authenticated user. Returns course name, ID, course code, and term.",
  {},
  { readOnlyHint: true },
  async () => {
    return {
      content: [{ type: "text", text: "..." }]
    };
  }
);

Local development

bash
npm install
npm run build    # compile TypeScript to dist/
npm start        # run compiled server
npm run dev      # run from source with tsx (hot reload)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Install dependencies: npm install
  4. Build: npm run build
  5. Submit a pull request

There is currently no automated test suite — manual verification via an MCP client is the primary testing approach.

Security Notes

  1. API token security

    • Never commit your Canvas API token to version control
    • Use environment variables or secure configuration
    • Rotate tokens periodically
  2. Permissions

    • Use tokens with the minimum access needed for your use case
    • Review Canvas API access logs periodically

Related Documentation

License

MIT — see LICENSE.

Установка

TypingMind
{
  "mcpServers": {
    "canvas-mcp": {
      "command": "node",
      "args": [
        "/path/to/canvas-mcp/build/index.js"
      ],
      "env": {
        "CANVAS_API_TOKEN": "<CANVAS_API_TOKEN>",
        "CANVAS_BASE_URL": "<CANVAS_BASE_URL>"
      }
    }
  }
}

Используйте MCP Canvas MCP 服务器 с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Canvas MCP 服务器 вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Canvas MCP 服务器 как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Canvas MCP 服务器.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "canvas-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@r-huijts/canvas-mcp"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Canvas MCP 服务器, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Canvas MCP 服务器.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Canvas MCP 服务器?
Canvas MCP 服务器
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Canvas MCP 服务器.

Часто задаваемые вопросы

Для чего используется сервер MCP Canvas MCP 服务器?

Canvas MCP 服务器 — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Canvas MCP 服务器 с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Canvas MCP 服务器 с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Canvas MCP 服务器 с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Canvas MCP 服务器, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Canvas MCP 服务器 к TypingMind?

Canvas MCP 服务器 работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP Canvas MCP 服务器 в TypingMind?

Canvas MCP 服务器 предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Canvas MCP 服务器?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Canvas MCP 服务器 требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇