Sarthak-Neupane/CanvasMCPServer
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 dayong@mcphub.com.
Canvas MCP Server is a lightweight and fast server providing Canvas-related tools for AI assistants.
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
-
Copy the example environment file:
cp .env.example .env -
Edit
.envand 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Make your changes
- Run tests (
pytest) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the file for details.
Author
Sarthak Neupane
- GitHub: @Sarthak-Neupane