canvas-student-mcp-server

a-ariff/canvas-student-mcp-server

3.2

If you are the rightful owner of canvas-student-mcp-server 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.

A Model Context Protocol (MCP) server for Canvas LMS - designed for educational access and research purposes.

Canvas Student MCP Server# Canvas Student MCP Server# Canvas Student MCP Server# Canvas Student MCP Server

A production-ready Model Context Protocol (MCP) server for Canvas LMS, deployed on Cloudflare Workers with OAuth 2.1 authentication.

License: MITA production-ready Model Context Protocol (MCP) server for Canvas LMS, deployed on Cloudflare Workers with OAuth 2.1 authentication.

TypeScript

Cloudflare Workers

MCP Compatible

GitHub StarsLicense: MITA production-ready Model Context Protocol (MCP) server for Canvas LMS, deployed on Cloudflare Workers with OAuth 2.1 authentication.A production-ready Model Context Protocol (MCP) server for Canvas LMS, deployed on Cloudflare Workers with OAuth 2.1 authentication.

Status

TypeScript

πŸš€ Live Server

Cloudflare Workers

Production URL: https://canvas-mcp-sse.ariff.dev

MCP Compatible

Available Endpoints:

  • /sse - OAuth 2.1 authenticated SSE transport (recommended)License: MITLicense: MIT

  • /mcp - MCP endpoint with API key or OAuth

  • /public - Public endpoint (config via query params)## πŸš€ Live Server

  • /.well-known/oauth-authorization-server - OAuth discovery

  • /health - Health check endpointTypeScriptTypeScript

✨ FeaturesProduction URL: https://canvas-mcp-sse.ariff.dev

πŸŽ“ Canvas Integration (12 Tools)Cloudflare WorkersCloudflare Workers

  • Course Management - List courses, modules, and user profiles

  • Assignment Tools - Get assignments, grades, submissions, and todosAvailable Endpoints:

  • Communication - Access announcements, discussions, and calendar events

  • Quiz Tools - View quiz information and results- /sse - OAuth 2.1 authenticated SSE transport (recommended)MCP CompatibleMCP Compatible

  • Upcoming Tracking - See all upcoming assignments across courses

  • /mcp - MCP endpoint with API key or OAuth

πŸ” Security

  • OAuth 2.1 with PKCE - Secure authorization flow- /public - Public endpoint (config via query params)

  • Client Whitelist - Restricted access control

  • Secure Token Storage - Durable Objects for session management- /.well-known/oauth-authorization-server - OAuth discovery

  • Rate Limiting - API protection

  • CORS Protection - Cross-origin security- /health - Health check endpoint## πŸš€ Live Server## πŸš€ Live Server

⚑ Performance

  • Edge Deployment - Low latency via Cloudflare Workers

  • <100ms Response - Fast API responses## ✨ Features

  • 99.9% Uptime - Production-grade reliability

  • Global Distribution - Deployed to multiple regions

πŸ“¦ Repository Structure### πŸŽ“ Canvas Integration (12 Tools)Production URL: https://canvas-mcp-sse.ariff.devProduction URL: https://canvas-mcp-sse.ariff.dev


canvas-student-mcp-server/

β”œβ”€β”€ README.md                       # This file- **Assignment Tools** - Get assignments, grades, submissions, and todos

β”œβ”€β”€ CHANGELOG.md                    # Version history

β”œβ”€β”€ package.json                    # Workspace configuration- **Communication** - Access announcements, discussions, and calendar events

└── packages/

    β”œβ”€β”€ remote-mcp-server-authless/ # Main MCP Server with OAuth 2.1- **Quiz Tools** - View quiz information and resultsAvailable Endpoints:**Available Endpoints:**

    β”‚   β”œβ”€β”€ src/

    β”‚   β”‚   β”œβ”€β”€ index.ts            # Main server implementation- **Upcoming Tracking** - See all upcoming assignments across courses

    β”‚   β”‚   β”œβ”€β”€ oauth-config.ts     # OAuth 2.1 configuration

    β”‚   β”‚   β”œβ”€β”€ oauth-handlers.ts   # Authorization flow handlers- `/sse` - OAuth 2.1 authenticated SSE transport (recommended)

    β”‚   β”‚   β”œβ”€β”€ types.ts            # TypeScript type definitions

    β”‚   β”‚   └── well-known.ts       # OAuth discovery endpoints### πŸ” Security

    β”‚   β”œβ”€β”€ package.json            # Server dependencies

    β”‚   β”œβ”€β”€ tsconfig.json           # TypeScript configuration- **OAuth 2.1 with PKCE** - Secure authorization flow- `/sse` - OAuth 2.1 authenticated SSE transport (recommended)- `/mcp` - MCP endpoint with API key or OAuth

    β”‚   β”œβ”€β”€ wrangler.jsonc          # Cloudflare deployment config

    β”‚   └── README.md               # Detailed server documentation- **Client Whitelist** - Restricted access control

    └── cloudflare-canvas-api/      # Canvas REST API Proxy

        β”œβ”€β”€ src/- **Secure Token Storage** - Durable Objects for session management- `/mcp` - MCP endpoint with API key or OAuth- `/public` - Public endpoint (config via query params)

        β”‚   β”œβ”€β”€ index.ts            # API proxy implementation

        β”‚   β”œβ”€β”€ canvas-proxy.ts     # Canvas API forwarding- **Rate Limiting** - API protection

        β”‚   └── landing-page.ts     # Marketing landing page

        β”œβ”€β”€ static/- **CORS Protection** - Cross-origin security- `/public` - Public endpoint (config via query params)- `/.well-known/oauth-authorization-server` - OAuth discovery

        β”‚   └── index.html          # Landing page HTML

        └── README.md               # Proxy documentation

⚑ Performance- /.well-known/oauth-authorization-server - OAuth discovery- /health - Health check endpoint

πŸš€ Quick Start

  • Edge Deployment - Low latency via Cloudflare Workers

Option 1: Use Hosted Server (Recommended)

  • <100ms Response - Fast API responses- /health - Health check endpoint

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

  • 99.9% Uptime - Production-grade reliability

{- **Global Distribution** - Deployed to multiple regions## ✨ Features

  "mcpServers": {

    "canvas-mcp": {

      "command": "npx",

      "args": [## πŸ“¦ Repository Structure## ✨ Features

        "-y",

        "@modelcontextprotocol/client-oauth2",

        "https://canvas-mcp-sse.ariff.dev/sse"

      ]```### πŸŽ“ Canvas Integration (12 Tools)

    }

  }canvas-student-mcp-server/

}

```β”œβ”€β”€ README.md                       # This file### Canvas Integration (12 Tools)- **Course Management** - List courses, modules, and user profiles



Restart Claude Desktop and you'll be prompted for OAuth authorization.β”œβ”€β”€ package.json                    # Workspace configuration



### Option 2: Deploy Your Own└── packages/- **Assignment Tools** - Get assignments, grades, submissions, and todos



#### Prerequisites    β”œβ”€β”€ remote-mcp-server-authless/ # Main MCP Server with OAuth 2.1

- Cloudflare account (free tier works)

- Wrangler CLI installed (`npm install -g wrangler`)    β”‚   β”œβ”€β”€ src/- **Course Management** - List courses, modules, and user profiles- **Communication** - Access announcements, discussions, and calendar events

- Canvas API token

    β”‚   β”‚   β”œβ”€β”€ index.ts            # Main server implementation

#### Deploy Steps

    β”‚   β”‚   β”œβ”€β”€ oauth-config.ts     # OAuth 2.1 configuration- **Assignment Tools** - Get assignments, grades, submissions, and todos- **Quiz Tools** - View quiz information and results

```bash

# Clone the repository    β”‚   β”‚   β”œβ”€β”€ oauth-handlers.ts   # Authorization flow handlers

git clone https://github.com/a-ariff/canvas-student-mcp-server.git

cd canvas-student-mcp-server    β”‚   β”‚   β”œβ”€β”€ types.ts            # TypeScript type definitions- **Communication** - Access announcements, discussions, and calendar events- **Upcoming Tracking** - See all upcoming assignments across courses



# Install dependencies    β”‚   β”‚   └── well-known.ts       # OAuth discovery endpoints

npm run install:all

    β”‚   β”œβ”€β”€ package.json            # Server dependencies- **Quiz Tools** - View quiz information and results

# Navigate to the MCP server

cd packages/remote-mcp-server-authless    β”‚   β”œβ”€β”€ tsconfig.json           # TypeScript configuration



# Login to Cloudflare    β”‚   β”œβ”€β”€ wrangler.jsonc          # Cloudflare deployment config- **Upcoming Tracking** - See all upcoming assignments across courses### πŸ” Security

wrangler login

    β”‚   └── README.md               # Detailed server documentation

# Deploy to Cloudflare Workers

npm run deploy    └── cloudflare-canvas-api/      # Canvas REST API Proxy- **OAuth 2.1 with PKCE** - Secure authorization flow

    β”œβ”€β”€ src/

πŸ”§ Configuration

    β”‚   β”œβ”€β”€ index.ts            # API proxy implementation### Security- **Client Whitelist** - Restricted access control

Canvas API Token

    β”‚   β”œβ”€β”€ canvas-proxy.ts     # Canvas API forwarding
  1. Log into Canvas

  2. Go to Account β†’ Settings β”‚ └── landing-page.ts # Marketing landing page- Secure Token Storage - Durable Objects for session management

  3. Scroll to Approved Integrations

  4. Click New Access Token β”œβ”€β”€ static/

  5. Name it "MCP Server"

  6. Copy the token (save securely) β”‚ └── index.html # Landing page HTML- OAuth 2.1 with PKCE - Secure authorization flow- Rate Limiting - API protection

OAuth Configuration └── README.md # Proxy documentation

The server uses OAuth 2.1 with PKCE. Configuration is in packages/remote-mcp-server-authless/src/oauth-config.ts:```- Client Whitelist - Restricted access control- CORS Protection - Cross-origin security


export const OAUTH_CONFIG = {

  clientWhitelist: [## πŸš€ Quick Start- **Secure Token Storage** - Durable Objects for session management

    "claude-desktop",

    "mcp-client"

  ],

  redirectUris: [### Option 1: Use Hosted Server (Recommended)- **Rate Limiting** - API protection### ⚑ Performance

    "http://localhost:*",

    "https://canvas-mcp-sse.ariff.dev/*"

  ]

}Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):- **CORS Protection** - Cross-origin security- **Edge Deployment** - Low latency via Cloudflare Workers

πŸ“š Available Tools


### Course Management

- `list_courses` - Get all active courses{

- `get_modules` - Get modules for a course

- `get_user_profile` - Get user profile information  "mcpServers": {### Performance- **99.9% Uptime** - Production-grade reliability



### Assignment Tools    "canvas-mcp": {

- `get_assignments` - Get course assignments

- `get_upcoming_assignments` - Get upcoming assignments      "command": "npx",- **Global Distribution** - Deployed to multiple regions

- `get_submission_status` - Check submission status

- `get_todo_items` - Get todo list      "args": [

- `get_grades` - Get course grades

        "-y",- **Edge Deployment** - Low latency via Cloudflare Workers

### Communication

- `get_announcements` - Get course announcements        "@modelcontextprotocol/client-oauth2",

- `get_discussions` - Get discussion topics

- `get_calendar_events` - Get calendar events        "https://canvas-mcp-sse.ariff.dev/sse"- **<100ms Response** - Fast API responses## πŸ“¦ Repository Structure



### Quiz Tools      ]

- `get_quizzes` - Get quiz information

    }- **99.9% Uptime** - Production-grade reliability

## 🎯 Use Cases

  }

### For Students

- πŸ“š Quick access to all course materials}- **Global Distribution** - Deployed to multiple regions```

- πŸ“… Track deadlines and upcoming assignments

- πŸ’¬ Stay updated with announcements```

- πŸ“Š Monitor grades and submissions

- πŸ€– Use AI to help organize your courseworkcanvas-student-mcp-server/



### For DevelopersRestart Claude Desktop and you'll be prompted for OAuth authorization.

- πŸ”Œ Easy Canvas API integration

- πŸ› οΈ Built on modern standards (OAuth 2.1, TypeScript)## πŸ“¦ Repository Structureβ”œβ”€β”€ README.md                       # This file

- ⚑ Serverless deployment (no infrastructure management)

- 🌐 Global edge network (fast anywhere)### Option 2: Deploy Your Own

- πŸ”’ Security best practices out of the box

β”œβ”€β”€ package.json                    # Workspace configuration

## πŸ› οΈ Development

#### Prerequisites

### Local Development

- Cloudflare account (free tier works)```text└── packages/

```bash

# Navigate to MCP server- Wrangler CLI installed (`npm install -g wrangler`)

cd packages/remote-mcp-server-authless

- Canvas API tokencanvas-student-mcp-server/    β”œβ”€β”€ remote-mcp-server-authless/ # Main Cloudflare Workers MCP server

# Install dependencies

npm install



# Start development server#### Deploy Stepsβ”œβ”€β”€ README.md                       # This file    β”‚   β”œβ”€β”€ src/

npm run dev

Testing```bashβ”œβ”€β”€ package.json # Workspace configuration β”‚ β”‚ β”œβ”€β”€ index.ts # Main server implementation


# Test OAuth endpoint

curl https://canvas-mcp-sse.ariff.dev/.well-known/oauth-authorization-servergit clone https://github.com/a-ariff/canvas-student-mcp-server.git└── packages/    β”‚   β”‚   β”œβ”€β”€ oauth-config.ts     # OAuth 2.1 configuration



# Test health endpointcd canvas-student-mcp-server

curl https://canvas-mcp-sse.ariff.dev/health

```    β”œβ”€β”€ remote-mcp-server-authless/ # Main Cloudflare Workers MCP server    β”‚   β”‚   β”œβ”€β”€ oauth-handlers.ts   # Authorization flow handlers



### Available Scripts# Install dependencies



```bashnpm run install:all    β”‚   β”œβ”€β”€ src/    β”‚   β”‚   β”œβ”€β”€ types.ts            # TypeScript type definitions

# Root workspace

npm run install:all    # Install all package dependencies

npm run build          # Build both packages

npm run deploy:mcp     # Deploy MCP server# Navigate to the MCP server    β”‚   β”‚   β”œβ”€β”€ index.ts            # Main server implementation    β”‚   β”‚   └── well-known.ts       # OAuth discovery endpoints

npm run deploy:api     # Deploy API proxy

npm run clean          # Clean all node_modules and distcd packages/remote-mcp-server-authless



# MCP Server (packages/remote-mcp-server-authless)    β”‚   β”‚   β”œβ”€β”€ oauth-config.ts     # OAuth 2.1 configuration    β”‚   β”œβ”€β”€ package.json            # Server dependencies

npm run dev            # Development mode with hot reload

npm run deploy         # Deploy to Cloudflare Workers# Login to Cloudflare

npm test               # Run tests

npm run type-check     # TypeScript type checkingwrangler login    β”‚   β”‚   β”œβ”€β”€ oauth-handlers.ts   # Authorization flow handlers    β”‚   β”œβ”€β”€ tsconfig.json           # TypeScript configuration



# API Proxy (packages/cloudflare-canvas-api)

npm run dev            # Development mode

npm run deploy         # Deploy to Cloudflare Workers# Deploy to Cloudflare Workers    β”‚   β”‚   β”œβ”€β”€ types.ts            # TypeScript type definitions    β”‚   β”œβ”€β”€ wrangler.jsonc          # Cloudflare deployment config

npm run deploy

πŸ” Security


### OAuth 2.1 Implementation

- PKCE (Proof Key for Code Exchange) required

- State parameter validation

- Client ID whitelist## πŸ”§ Configuration    β”‚   β”œβ”€β”€ package.json            # Server dependencies    └── cloudflare-canvas-api/      # Canvas API proxy (optional)

- Redirect URI validation

- Secure token storage in Durable Objects



### Best Practices### Canvas API Token    β”‚   β”œβ”€β”€ tsconfig.json           # TypeScript configuration        β”œβ”€β”€ src/

- Never commit API tokens

- Use environment variables for secrets

- Regularly rotate Canvas tokens

- Monitor access logs1. Log into Canvas    β”‚   β”œβ”€β”€ wrangler.jsonc          # Cloudflare deployment config        β”‚   β”œβ”€β”€ index.ts            # API proxy implementation

- Use HTTPS only

2. Go to **Account β†’ Settings**

## 🌟 Why This MCP Server?

3. Scroll to **Approved Integrations**    β”‚   └── README.md               # Detailed server documentation        β”‚   └── landing-page.ts     # Marketing landing page

| Feature | This Server | Others |

|---------|-------------|--------|4. Click **New Access Token**

| **Deployment** | Cloudflare Workers (Global Edge) | Traditional servers |

| **Authentication** | OAuth 2.1 with PKCE | API keys only |5. Name it "MCP Server"    └── cloudflare-canvas-api/      # Canvas API proxy (optional)        └── static/

| **Response Time** | <100ms worldwide | Varies by location |

| **Uptime** | 99.9% (Cloudflare SLA) | Depends on hosting |6. Copy the token (save securely)

| **Cost** | Free tier available | Monthly fees |

| **Security** | Enterprise-grade | Basic |        β”œβ”€β”€ src/            └── index.html          # Landing page HTML

| **Maintenance** | Serverless (auto-scaling) | Manual management |

### OAuth Configuration

## πŸ“– Documentation

        β”‚   β”œβ”€β”€ index.ts            # API proxy implementation```

- [Changelog](CHANGELOG.md) - Version history and release notes

- [MCP Server README](packages/remote-mcp-server-authless/README.md) - Detailed server docsThe server uses OAuth 2.1 with PKCE. Configuration is in `packages/remote-mcp-server-authless/src/oauth-config.ts`:

- [API Proxy README](packages/cloudflare-canvas-api/README.md) - REST API documentation

- [Privacy Policy](PRIVACY_POLICY.md) - Data handling and privacy        β”‚   └── landing-page.ts     # Marketing landing page

- [Security Guide](packages/remote-mcp-server-authless/SECURITY-FIXES.md) - Security details

```typescript

## πŸ“„ License

export const OAUTH_CONFIG = {        └── static/## πŸš€ Quick Start

MIT License - see [LICENSE](LICENSE) file for details

  clientWhitelist: [

## 🀝 Contributing

    "claude-desktop",            └── index.html          # Landing page HTML

Contributions welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

    "mcp-client"

1. Fork the repository

2. Create a feature branch (`git checkout -b feature/amazing-feature`)  ],```### Option 1: Use Hosted Server (Recommended)

3. Commit your changes (`git commit -m 'Add some amazing feature'`)

4. Push to the branch (`git push origin feature/amazing-feature`)  redirectUris: [

5. Open a Pull Request

    "http://localhost:*",

## πŸ”— Links

    "https://canvas-mcp-sse.ariff.dev/*"

- [Live Server](https://canvas-mcp-sse.ariff.dev)

- [GitHub Repository](https://github.com/a-ariff/canvas-student-mcp-server)  ]## πŸš€ Quick Start# Build the TypeScript project

- [MCP Documentation](https://modelcontextprotocol.io)

- [Canvas API Docs](https://canvas.instructure.com/doc/api/)}

- [Cloudflare Workers](https://workers.cloudflare.com/)

```npm run build

## πŸ’¬ Support



For issues or questions:

1. Check the [Documentation](#-documentation)## πŸ“š Available Tools### Option 1: Use Hosted Server (Recommended)```

2. Search [existing issues](https://github.com/a-ariff/canvas-student-mcp-server/issues)

3. Open a [new issue](https://github.com/a-ariff/canvas-student-mcp-server/issues/new)

4. Review Canvas API documentation

### Course Management

## 🎯 Roadmap

- `list_courses` - Get all active courses

- [ ] Gradescope integration

- [ ] Additional Canvas tools (files, rubrics)- `get_modules` - Get modules for a courseAdd to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):### 3. Configure Environment

- [ ] Enhanced caching layer

- [ ] Analytics dashboard- `get_user_profile` - Get user profile information

- [ ] Multi-institution support

- [ ] Mobile app support

- [ ] Webhook notifications

### Assignment Tools

---

- `get_assignments` - Get course assignments```json```bash

**Built with ❀️ using Cloudflare Workers and MCP**

- `get_upcoming_assignments` - Get upcoming assignments

⭐ Star this repo if you find it useful!

- `get_submission_status` - Check submission status{# Copy the example configuration

- `get_todo_items` - Get todo list

- `get_grades` - Get course grades  "mcpServers": {cp .env.example .env



### Communication    "canvas-mcp": {

- `get_announcements` - Get course announcements

- `get_discussions` - Get discussion topics      "command": "npx",# Edit .env with your details

- `get_calendar_events` - Get calendar events

      "args": [nano .env

### Quiz Tools

- `get_quizzes` - Get quiz information        "-y",```



## πŸ› οΈ Development        "@modelcontextprotocol/client-oauth2",



### Local Development        "https://canvas-mcp-sse.ariff.dev/sse"Required configuration:



```bash      ]```env

# Navigate to MCP server

cd packages/remote-mcp-server-authless    }CANVAS_API_KEY=your_actual_api_token_here



# Install dependencies  }CANVAS_BASE_URL=https://your-school.instructure.com

npm install

}```

# Start development server

npm run dev```

4. Configure Claude Desktop

Testing

Restart Claude Desktop and you'll be prompted for OAuth authorization.


# Test OAuth endpointAdd to your Claude Desktop config (`~/.config/claude/claude_desktop_config.json` or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

curl https://canvas-mcp-sse.ariff.dev/.well-known/oauth-authorization-server

### Option 2: Deploy Your Own

# Test health endpoint

curl https://canvas-mcp-sse.ariff.dev/health```json

Prerequisites{

Available Scripts

"mcpServers": {


# Root workspace- Cloudflare account (free tier works)    "canvas-student": {

npm run install:all    # Install all package dependencies

npm run build          # Build both packages- Wrangler CLI installed (`npm install -g wrangler`)      "command": "node",

npm run deploy:mcp     # Deploy MCP server

npm run deploy:api     # Deploy API proxy- Canvas API token      "args": ["/path/to/canvas-student-mcp-server/dist/index.js"],

npm run clean          # Clean all node_modules and dist

      "cwd": "/path/to/canvas-student-mcp-server",

# MCP Server (packages/remote-mcp-server-authless)

npm run dev            # Development mode with hot reload#### Deploy Steps      "env": {

npm run deploy         # Deploy to Cloudflare Workers

npm test               # Run tests        "NODE_ENV": "production"

npm run type-check     # TypeScript type checking

```bash      }

# API Proxy (packages/cloudflare-canvas-api)

npm run dev            # Development mode# Clone the repository    }

npm run deploy         # Deploy to Cloudflare Workers

```git clone https://github.com/a-ariff/canvas-student-mcp-server.git  }



## πŸ” Securitycd canvas-student-mcp-server}



### OAuth 2.1 Implementation```

- PKCE (Proof Key for Code Exchange) required

- State parameter validation# Navigate to the server package

- Client ID whitelist

- Redirect URI validationcd packages/remote-mcp-server-authless### 5. Test the Connection

- Secure token storage in Durable Objects



### Best Practices

- Never commit API tokens# Install dependenciesRestart Claude Desktop and ask:

- Use environment variables for secrets

- Regularly rotate Canvas tokensnpm install> "Show me my Canvas courses"

- Monitor access logs

- Use HTTPS only



## πŸ“„ License# Login to Cloudflare## πŸ“ Monorepo Structure



MIT License - see LICENSE file for detailswrangler login



## 🀝 Contributing```text



Contributions welcome! Please open an issue first to discuss changes.# Deploy to Cloudflare Workerscanvas-student-mcp-server/



1. Fork the repositorynpm run deployβ”œβ”€β”€ README.md                           # This file

2. Create a feature branch (`git checkout -b feature/amazing-feature`)

3. Commit your changes (`git commit -m 'Add some amazing feature'`)```β”œβ”€β”€ package.json                        # Root package.json for workspace

4. Push to the branch (`git push origin feature/amazing-feature`)

5. Open a Pull Requestβ”œβ”€β”€ .gitignore                         # Combined gitignore



## πŸ”— Links## πŸ”§ Configurationβ”œβ”€β”€ .github/workflows/                  # CI/CD workflows (disabled during restructure)



- [Live Server](https://canvas-mcp-sse.ariff.dev)β”‚   β”œβ”€β”€ markdown-lint.yml              # Markdown linting workflow

- [GitHub Repository](https://github.com/a-ariff/canvas-student-mcp-server)

- [MCP Documentation](https://modelcontextprotocol.io)### Canvas API Tokenβ”‚   └── security.yml                   # Security scanning

- [Canvas API Docs](https://canvas.instructure.com/doc/api/)

- [Cloudflare Workers](https://workers.cloudflare.com/)└── packages/



## πŸ’¬ Support1. Log into Canvas    β”œβ”€β”€ canvas-student-mcp-server/     # TypeScript MCP Server (Main)



For issues or questions:2. Go to **Account β†’ Settings**    β”‚   β”œβ”€β”€ src/                       # TypeScript source code

1. Check the [MCP Server README](packages/remote-mcp-server-authless/README.md)

2. Review the [API Proxy README](packages/cloudflare-canvas-api/README.md)3. Scroll to **Approved Integrations**    β”‚   β”‚   β”œβ”€β”€ index.ts               # MCP server entry point

3. Open an issue on GitHub

4. Review Canvas API documentation4. Click **New Access Token**    β”‚   β”‚   β”œβ”€β”€ canvas-api.ts          # Canvas API client



## 🎯 Roadmap5. Name it "MCP Server"    β”‚   β”‚   β”œβ”€β”€ workflow-engine.ts     # Academic workflow automation



- [ ] Gradescope integration6. Copy the token (save securely)    β”‚   β”‚   β”œβ”€β”€ config.ts              # Configuration management

- [ ] Additional Canvas tools (files, rubrics)

- [ ] Enhanced caching layer    β”‚   β”‚   β”œβ”€β”€ cache.ts               # Caching system

- [ ] Admin dashboard

- [ ] Multi-institution support### OAuth Configuration    β”‚   β”‚   └── types.ts               # TypeScript definitions



---    β”‚   β”œβ”€β”€ dist/                      # Built JavaScript



**Built with ❀️ using Cloudflare Workers and MCP**The server uses OAuth 2.1 with PKCE. Configuration is in `packages/remote-mcp-server-authless/src/oauth-config.ts`:    β”‚   β”œβ”€β”€ docs/                      # Documentation


    β”‚   β”œβ”€β”€ examples/                  # Usage examples

```typescript    β”‚   β”œβ”€β”€ package.json               # Node.js dependencies

export const OAUTH_CONFIG = {    β”‚   β”œβ”€β”€ tsconfig.json              # TypeScript config

  clientWhitelist: [    β”‚   β”œβ”€β”€ Dockerfile                 # Docker configuration

    "claude-desktop",    β”‚   β”œβ”€β”€ docker-compose.yml         # Docker Compose setup

    "mcp-client"    β”‚   └── README.md                  # MCP server docs

  ],    β”œβ”€β”€ cloudflare-canvas-api/         # Cloudflare Workers Proxy

  redirectUris: [    β”‚   β”œβ”€β”€ src/                       # TypeScript source

    "http://localhost:*",    β”‚   β”œβ”€β”€ package.json               # Dependencies

    "https://canvas-mcp-sse.ariff.dev/*"    β”‚   └── README.md                  # Proxy docs

  ]    └── remote-mcp-server-authless/    # Legacy Remote Server

}        β”œβ”€β”€ src/                       # TypeScript source

```        β”œβ”€β”€ package.json               # Node.js dependencies

        └── README.md                  # Remote server docs

## πŸ“š Available Tools```



### Course Management## πŸ›  Development



- `list_courses` - Get all active coursesThis monorepo contains all Canvas MCP implementations in one place for easier development and maintenance.

- `get_modules` - Get modules for a course

- `get_user_profile` - Get user profile information### πŸ”„ CI/CD Workflows



### Assignment Tools- **Markdown Linting**: Ensures documentation quality

- **Security Scans**: Weekly security audits for TypeScript packages

- `get_assignments` - Get course assignments- **Manual Testing**: Type checking and builds validated locally

- `get_upcoming_assignments` - Get upcoming assignments

- `get_submission_status` - Check submission status*Note: Full CI/CD workflows temporarily disabled during monorepo restructuring.*

- `get_todo_items` - Get todo list### πŸ“ Available Scripts

- `get_grades` - Get course grades

```bash

### Communication# Install dependencies

cd packages/canvas-student-mcp-server

- `get_announcements` - Get course announcementsnpm install

- `get_discussions` - Get discussion topics

- `get_calendar_events` - Get calendar events# Build TypeScript

npm run build

### Quiz Tools

# Development mode (watch for changes)

- `get_quizzes` - Get quiz informationnpm run dev



## πŸ› οΈ Development# Type checking

npm run type-check

### Local Development

# Start MCP server (for testing)

```bashnpm start

cd packages/remote-mcp-server-authless

npm install# Cleanup

npm run devnpm run clean

Testing### πŸš€ Getting Started


# Test OAuth endpoint```bash

curl https://canvas-mcp-sse.ariff.dev/.well-known/oauth-authorization-servergit clone https://github.com/a-ariff/canvas-student-mcp-server.git

cd canvas-student-mcp-server

# Test health endpoint```

curl https://canvas-mcp-sse.ariff.dev/health

```2. Install dependencies and build:

```bash

### Project Structurecd packages/canvas-student-mcp-server

npm install

- `src/index.ts` - Main server implementation with 12 MCP toolsnpm run build

- `src/oauth-handlers.ts` - OAuth 2.1 authorization flow```

- `src/oauth-config.ts` - OAuth configuration and validation

- `src/well-known.ts` - OAuth discovery endpoints3. Configure your Canvas API credentials:

- `src/types.ts` - TypeScript type definitions```bash

cp .env.example .env

## πŸ” Security# Edit .env with your Canvas API token and URL

OAuth 2.1 Implementation

  1. Configure Claude Desktop:
  • PKCE (Proof Key for Code Exchange) requiredEdit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or ~/.config/claude/claude_desktop_config.json (Linux):

  • State parameter validation```json

  • Client ID whitelist{

  • Redirect URI validation "mcpServers": {

  • Secure token storage in Durable Objects "canvas-student": {

    "command": "node",
    

Best Practices "args": ["/absolute/path/to/canvas-student-mcp-server/packages/canvas-student-mcp-server/dist/index.js"],

  "env": {
  • Never commit API tokens "CANVAS_API_KEY": "your_token_here",

  • Use environment variables for secrets "CANVAS_BASE_URL": "https://your-school.instructure.com"

  • Regularly rotate Canvas tokens }

  • Monitor access logs }

  • Use HTTPS only }

}

πŸ“„ License```

MIT License - see LICENSE file for details5. Restart Claude Desktop to load the MCP server

🀝 Contributing## πŸ”’ Security & Compliance

Contributions welcome! Please open an issue first to discuss changes.- Automated Security Scanning: Weekly scans for both Python and TypeScript dependencies

  • Code Quality: Enforced through CI/CD with linting and formatting checks

πŸ”— Links- Dependency Management: Regular updates and vulnerability monitoring

πŸ“š Documentation

  • Live Server

  • GitHub Repository- MCP Server Setup: See packages/canvas-student-mcp-server/README.md

  • MCP Documentation- Workflow Automation: Built-in academic workflow processing tools

  • Canvas API Docs- API Documentation: Available in packages/canvas-student-mcp-server/docs/

  • Integration Guide: See packages/canvas-student-mcp-server/MCP_INTEGRATION.md

πŸ’¬ Support- Docker Guide: See packages/canvas-student-mcp-server/DOCKER_TESTING.md

  • Troubleshooting: See packages/canvas-student-mcp-server/TROUBLESHOOTING.md

For issues or questions:## πŸ”§ Recent Fixes & Improvements

  1. Check the βœ… Security Issues Fixed:

  2. Open an issue on GitHub- Removed hardcoded credentials from source code

  3. Review Canvas API documentation- Added proper environment variable configuration

  • Implemented secure credential handling

🎯 Roadmap

βœ… MCP Implementation Fixed:

  • Gradescope integration enhancements- Corrected MCP server architecture and entry point

  • Additional Canvas tools (files, rubrics)- Fixed Claude Desktop integration configuration

  • Caching layer improvements- Updated dependencies and requirements

  • Admin dashboard

  • Multi-institution support**βœ… Configuration Improvements:**

  • Added Claude Desktop setup guide (CLAUDE_DESKTOP_SETUP.md)

---- Updated smithery.yaml with correct MCP server configuration

  • Added proper Python path configuration

Built with ❀️ using Cloudflare Workers and MCP

πŸš€ Quick Start for Claude Desktop

  1. Clone and setup:

    git clone https://github.com/a-ariff/canvas-student-mcp-server.git
    cd canvas-student-mcp-server
    npm run install:all
    
  2. Build the project:

    cd packages/canvas-student-mcp-server
    npm install
    npm run build
    
  3. Configure environment:

    cp .env.example .env
    # Edit .env with your Canvas API token
    
  4. Setup Claude Desktop: Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "canvas-student": {
          "command": "node",
          "args": ["/path/to/packages/canvas-student-mcp-server/dist/index.js"],
          "env": {
            "CANVAS_API_KEY": "your_api_token",
            "CANVAS_BASE_URL": "https://your-school.instructure.com"
          }
        }
      }
    }
    
  5. Restart Claude Desktop - Your Canvas MCP server is ready!

🐳 Docker Support

Run the MCP server in a container:

cd packages/canvas-student-mcp-server

# Build image
docker build -t canvas-mcp-server .

# Run with environment variables
docker run -e CANVAS_API_KEY=your_token \
           -e CANVAS_BASE_URL=https://your-school.instructure.com \
           canvas-mcp-server

# Or use Docker Compose
docker-compose up -d

⚠️ Important Notice

This project is designed for educational purposes and personal academic management. Node.js 18+ is required. Users are responsible for complying with their institution's terms of service and applicable policies. Always respect rate limits and use responsibly.

πŸ“„ License

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

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request The CI/CD pipeline will automatically test your changes across multiple Python and Node.js versions!