Provides access to Canvas LMS data including enrolled courses, assignments, due dates, grades, announcements, discussion topics, upcoming events, and to-do items for students at educational institutions.
Canvas LMS MCP Server
A Model Context Protocol (MCP) server that provides Claude with secure, verified access to your Canvas LMS account at Texas Tech University.
What is MCP?
The Model Context Protocol (MCP) is an open protocol developed by Anthropic that allows AI assistants like Claude to securely interact with external services. Think of it as "USB-C for AI" ā a standardized way to connect Claude to your data and tools.
This MCP server enables Claude to:
š List your enrolled courses
š Retrieve assignments and due dates
š Check your grades
š¢ Read course announcements
šļø View upcoming events and to-do items
š¬ Access discussion topics
Features
Test-First Design: Only exposes endpoints verified to work with your Canvas account
Secure: API tokens stored in
.env, never committed to version controlType-Safe: Full Pydantic validation on all inputs
Actionable Errors: Clear error messages guide you to solutions
Dual Output: Supports both human-readable Markdown and machine-readable JSON
Prerequisites
Python 3.10+
uv (recommended) or pip
Canvas API Token from your institution
Claude Desktop or Claude Code (for MCP integration)
Installation
1. Clone the Repository
2. Install Dependencies
Using uv (recommended):
Using pip:
3. Configure Credentials
Copy the example environment file:
Edit .env with your Canvas credentials:
How to Get Your Canvas API Token
Log in to Canvas at https://texastech.instructure.com
Click your profile picture ā Settings
Scroll to Approved Integrations
Click + New Access Token
Enter a purpose (e.g., "Claude MCP Server")
Click Generate Token
Copy the token immediately ā you won't see it again!
4. Configure Test Hints (Optional)
For targeted testing, create test_hints.json:
Running the Server
Option A: Direct Execution (Testing)
Option B: With MCP Inspector (Debugging)
The MCP Inspector provides a web UI to test your server:
Then open http://localhost:8000/mcp in the Inspector.
Option C: Claude Desktop Integration
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Important: Use absolute paths. On Windows, use forward slashes or escaped backslashes.
Restart Claude Desktop completely (Cmd+Q on macOS, not just close the window).
Option D: Kiro CLI Integration
For integration with Kiro CLI, add the server to your MCP configuration:
Install the Canvas LMS MCP Server:
git clone https://github.com/sweeden-ttu/canvas-lms-mcp.git cd canvas-lms-mcp python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e .Configure your Canvas API token:
cp .env.example .env # Edit .env with your Canvas API token and base URLAdd to Kiro CLI MCP configuration (
~/.kiro/mcp_servers.json):{ "mcpServers": { "canvas-lms": { "command": "/ABSOLUTE/PATH/TO/canvas-lms-mcp/venv/bin/python", "args": ["/ABSOLUTE/PATH/TO/canvas-lms-mcp/server.py"], "env": {} } } }Restart Kiro CLI to load the new MCP server.
Important: Use absolute paths and ensure the
.envfile contains your Canvas API token.
Option E: Claude Code Integration
Available Tools
Once connected, Claude can use these tools:
Tool | Description | Parameters |
| Get your Canvas user profile | None |
| List your enrolled courses |
|
| Get your to-do items |
|
| Get upcoming calendar events |
|
| Get assignments for a course |
|
| Get modules for a course |
|
| Get announcements for courses |
|
| Get discussion topics |
|
| Get your grades/enrollment |
|
Example Usage with Claude
Once configured, you can ask Claude things like:
"What assignments are due this week in my Canvas courses?"
"Show me the announcements from all my classes"
"What's my current grade in course 58606?"
"List all my active courses"
"What do I have on my to-do list?"
Querying Endpoints Manually
For debugging or scripting, you can query the Canvas API directly:
Project Structure
Troubleshooting
Server Not Appearing in Claude Desktop
Check JSON syntax: Validate
claude_desktop_config.jsonin a JSON linterUse absolute paths: Relative paths won't work
Restart completely: Cmd+Q (macOS) or right-click system tray ā Quit (Windows)
Check logs:
~/Library/Logs/Claude/mcp*.log(macOS)
401 Unauthorized Errors
Your API token may be invalid or expired
Regenerate a new token in Canvas Settings ā Approved Integrations
403 Forbidden Errors
Some endpoints require instructor/TA privileges
The
/filesendpoint typically requires elevated permissionsThis is normal for student accounts
Rate Limiting (429)
Canvas has rate limits (typically 700 requests per 10 minutes)
The server implements exponential backoff automatically
If you hit limits, wait a few minutes before retrying
Connection Refused
Ensure the server is running
Check that the path in the config is correct
Verify Python and uv are in your PATH
Development
Running Tests
Generating the Specification
After running live tests:
This creates verified_canvas_spec.json documenting which endpoints work.
Code Quality
Security Considerations
Never commit ā it contains your API token
Token scope: Canvas tokens have full access to your account; treat them like passwords
Local only: This server runs locally via stdio; it doesn't expose an HTTP endpoint by default
No persistence: The server doesn't store any Canvas data
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Run tests (
uv run pytest)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License ā see the LICENSE file for details.
Acknowledgments
Anthropic for creating the Model Context Protocol
Canvas LMS for their comprehensive REST API
FastMCP for the Python MCP SDK
Amazon Web Services for Kiro CLI integration support
Integration Documentation
Kiro CLI Integration: See installation instructions above for Kiro CLI setup
Claude Desktop Integration: See CLAUDE.md for detailed Claude Desktop setup
Amazon Q CLI Integration: See QCHAT_INTEGRATION.md for Q CLI setup