Canvas MCP Server is an implementation of the Message Control Protocol that creates a local interface to the Canvas Learning Management System API. It enables you to manage courses, access assignments, view announcements, and interact with other Canvas resources through Claude Desktop or other MCP clients.
Before installing the Canvas MCP Server, ensure you have:
Follow these steps to install the Canvas MCP Server:
Clone the repository:
git clone https://github.com/vishalsachdev/canvas-mcp.git
cd canvas-mcp
Create and activate a virtual environment:
python -m venv canvas-mcp
source canvas-mcp/bin/activate # On Unix/macOS
Install dependencies:
pip install -r requirements.txt
Create a .env
file in the root directory with your Canvas credentials:
CANVAS_API_TOKEN=your_canvas_api_token_here
CANVAS_API_URL=https://canvas.youruniversity.edu/api/v1
Make the start script executable:
chmod +x start_canvas_server.sh
Create or edit the Claude Desktop configuration file:
vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the Canvas MCP server configuration:
{
"mcpServers": [
{
"name": "canvas-api",
"command": "/Users/YOUR_USERNAME/path/to/canvas-mcp/start_canvas_server.sh"
}
]
}
Replace the path with the absolute path to your cloned repository
Restart Claude Desktop to load the new configuration
Claude Desktop will automatically start the server when needed. You can:
You can start the server directly for testing:
./start_canvas_server.sh
If you encounter problems:
Server Won't Start: Verify your .env
file exists with valid credentials, check the virtual environment path, and ensure all dependencies are installed
Authentication Errors: Confirm your Canvas API token is valid and you have the necessary permissions
Connection Issues: Verify your Canvas API URL is correct and check your internet connection
Debugging: Check server logs in the Claude Desktop console or run the server manually to see error output
.env
file to version controlThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.