logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-canvas-gateway

Programmatic interface for interacting with the Canvas Learning Management System, facilitating the automation of administrative tasks related to course structure and user assignments via the Canvas REST API. Enhances operational efficiency through features such as institutional catalog retrieval and role-based assignment filtering, augmented by integrated guidance mechanisms.

Author

mcp-canvas-gateway logo

enkhbold470

No License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisapicanvascanvas lmscanvas apiserver canvas

Canvas MCP Endpoint Implementation

This repository details a Model Context Protocol (MCP) server designed to interface directly with the Canvas LMS API endpoints. It furnishes the capabilities required for remote, automated manipulation of Canvas resources.

Core Capabilities

  • Retrieve complete listings of organizational courses, with an optional filter based on participant assignment roles (e.g., instructor, learner, teaching assistant).
  • Provision of immediate, contextual assistance prompts for tool invocation.

Necessary Preconditions

  • Execution environment requires Node.js, version 18 or higher.
  • Access credentials for a deployed Canvas LMS platform.
  • A valid Canvas API authentication token.
  • The Cursor IDE (for client-side utilization of the server).

Deployment Sequence

  1. Obtain a local copy of this codebase.
  2. Install required software packages: bash npm install

  3. Configure requisite environment variables: bash export CANVAS_BASE_URL="https://your-canvas-domain.edu" export CANVAS_ACCESS_TOKEN="your-secret-api-key"

  4. Compile the source code: bash npm run build

  5. Initialize the server process: bash npm start

Integration with Cursor IDE

To leverage this gateway within the Cursor environment:

  1. Access Cursor's application preference pane.
  2. Navigate to the section dedicated to MCP server configuration.
  3. Introduce a new configuration entry:

{ "mcpServers": { "canvas": { "command": "npm", "args": [ "start" ], "cwd": "/absolute/path/to/mcp-server-canvas" } } }

  1. Persist the changes and relaunch Cursor.
  2. The collection of Canvas utilities will subsequently materialize within Cursor's designated MCP interface panel.

Exposed Functionality

fetch_courses

Queries the system to retrieve all aggregated course records.

Parameters: - role_filter (optional): Constrains the returned set of courses based on the primary engagement role (e.g., 'teacher', 'student', 'ta').

Sample Output Schema:

{ "content": [ { "type": "text", "text": [ { "id": 1234, "name": "Introductory Computer Science", "code": "CS101", "status": "active", "timelineStart": "2024-09-01T00:00:00Z", "timelineEnd": "2025-05-30T23:59:59Z" } ] } ] }

fetch-courses-assist

A conversational helper designed to clarify the proper invocation syntax and parameter usage for the fetch_courses operation.

Development Guide

This server infrastructure is constructed utilizing TypeScript and the official MCP Software Development Kit. To extend functionality:

  1. Augment the CanvasAPI class with novel API interaction methods.
  2. Register supplementary command interfaces using server.tool().
  3. Register explanatory dialogue prompts using server.prompt().
  4. Recompile the artifact and conduct verification testing.

Diagnostics and Resolution

Should operational anomalies arise:

  1. Confirm the integrity and proper setting of all required environment variables.
  2. Validate that the supplied Canvas API credentials possess the requisite authorization scope.
  3. Examine the diagnostic logs produced by the Cursor MCP server component for error indicators.
  4. Verify the file system path specified within the Cursor configuration accurately points to this running service.

See Also

`