CanvasMCPServer

Sarthak-Neupane/CanvasMCPServer

3.2

If you are the rightful owner of CanvasMCPServer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Canvas MCP Server is a lightweight and fast server providing Canvas-related tools for AI assistants.

Tools
1
Resources
0
Prompts
0

Canvas MCP Server

A Model Context Protocol (MCP) server that provides Canvas-related tools for AI assistants.

Features

  • šŸŽØ Canvas tool integration
  • šŸ”§ Extensible tool architecture
  • šŸš€ Fast and lightweight

Installation

From Source

git clone https://github.com/sarthakneupane/canvas-mcp-server.git
cd canvas-mcp-server
pip install -e .

Environment Setup

  1. Copy the example environment file:

    cp .env.example .env
    
  2. Edit .env and add your API credentials:

    CANVAS_API_TOKEN=your_actual_api_token_here
    CANVAS_BASE_URL=https://your-api.example.com
    

Development Installation

git clone https://github.com/sarthakneupane/canvas-mcp-server.git
cd canvas-mcp-server
pip install -e ".[dev]"

Usage

As a Standalone Server

canvas-mcp-server

With Claude Desktop

Add to your Claude Desktop configuration: (You might need to add full path to the directory)

{
  "mcpServers": {
    "canvas-mcp-server": {
      "command": "canvas-mcp-server"
    }
  }
}

Programmatic Usage

from canvas_mcp_server import main

# Run the server
main()

Available Tools

Canvas Course Management

get_all_courses:

Retrieve all accessible courses with pagination support Filter by enrollment state, type, and workflow state Include additional fields: syllabus, teachers, sections, student counts, etc. Smart pagination (return all or limit results)

get_course_by_id:

Get detailed information about a specific course Access course metadata, permissions, and detailed content Include teachers, sections, progress tracking, and more

Development

Running Tests

pytest

Code Formatting

black src/ tests/
isort src/ tests/

Type Checking

mypy src/ --strict

Project Structure

canvas-mcp-server/
ā”œā”€ā”€ src/canvas_mcp_server/    # Main package
│   ā”œā”€ā”€ server.py             # Server implementation
│   └── tools/                # Available tools
ā”œā”€ā”€ tests/                    # Test suite
ā”œā”€ā”€ examples/                 # Usage examples
└── scripts/                  # Development scripts

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Make your changes
  4. Run tests (pytest)
  5. Commit your changes (git commit -m 'Add new feature')
  6. Push to the branch (git push origin feature/new-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the file for details.

Author

Sarthak Neupane