PV

pranav-vijayananth/brightspace-mcp-server

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 3 forks 质量 56 趋势 14Apache-2.0

Building a MCP server for Purdue students to connect their Brightspace accounts

概览

A Model Context Protocol (MCP) server that allows you to access your Purdue University Brightspace account through Claude Desktop. Ask Claude about your courses, assignments, and grades in natural language! Since students can't access the official D2L Brightspace API, this project uses Playwright for web scraping to extract Brightspace data. It handles Duo Mobile 2FA authentication and integrates seamlessly with Claude Desktop through the Model Context Protocol. - ✅ - Handles Purdue's two-factor authentication - ✅ - Get all your enrolled courses - ✅ - Works with Claude Desktop for natural language queries - ✅ - Environment-based credential management - 🟡 - In development - 🟡 - Planned feature - (required for compatibility) - (tested on macOS, may work on other platforms) - with Brightspace access - app configured for your account - installed (Download here) Never commit your .env file to git! It's already in .gitignore.

README

以下为原文 README 节选,完整内容请查看原文。

Brightspace MCP Server

A Model Context Protocol (MCP) server that allows you to access your Purdue University Brightspace account through Claude Desktop. Ask Claude about your courses, assignments, and grades in natural language!

Overview

Since students can’t access the official D2L Brightspace API, this project uses Playwright for web scraping to extract Brightspace data. It handles Duo Mobile 2FA authentication and integrates seamlessly with Claude Desktop through the Model Context Protocol.

Features

  • ✅ Automated Duo Mobile 2FA - Handles Purdue’s two-factor authentication
  • ✅ Course List Extraction - Get all your enrolled courses
  • ✅ MCP Integration - Works with Claude Desktop for natural language queries
  • ✅ Secure Credentials - Environment-based credential management
  • 🟡 Assignment Scraping - In development
  • 🟡 Grade Tracking - Planned feature

Prerequisites

  • Python 3.12 (required for compatibility)
  • macOS (tested on macOS, may work on other platforms)
  • Purdue Career Account with Brightspace access
  • Duo Mobile app configured for your account
  • Claude Desktop installed (Download here)

Installation

Step 1: Clone and Setup

# Clone the repository
git clone https://github.com/your-username/brightspace-mcp-server.git
cd brightspace-mcp-server

# Run the automated setup script
# This creates a virtual environment with Python 3.12 and installs all dependencies
python3 setup.py

# Activate the virtual environment
source venv/bin/activate  # macOS/Linux
# or
venv\Scripts\activate  # Windows

Step 2: Configure Credentials

Create a .env file in the project root:

PURDUE_USERNAME=your_purdue_username
PURDUE_PASSWORD=your_purdue_password

⚠️ Important: Never commit your .env file to git! It’s already in .gitignore.

Step 3: Test the Scraper (Optional)

Before setting up Claude Desktop, you can test if the scraper works:

# Test basic connectivity and authentication
python testing/playwright_trial.py

# Test full course scraping
python brightspace_api.py

This will:

  1. Open a browser window
  2. Navigate to Purdue Brightspace
  3. Prompt you to approve Duo Mobile authentication
  4. Scrape your course list
  5. Save data to brightspace_data.json

Step 4: Configure Claude Desktop

  1. Open Claude Desktop
  2. Go to: File → Settings → Developer
  3. Click: Edit Config
  4. Add this configuration to the opened file:
{
  "mcpServers": {
    "brightspace": {
      "command": "/absolute/path/to/brightspace-mcp-server/venv/bin/python",
      "args": [
        "/absolute/path/to/brightspace-mcp-server/mcp_server.py"
      ]
    }
  }
}

⚠️ Important: Replace /absolute/path/to/ with your actual project path. For example:

/Users/yourname/Documents/brightspace-mcp-server/venv/bin/python
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "brightspace": { "command": "/absolute/path/to/brightspace-mcp-server/venv/bin/python", "args": [ "/absolute/path/to/brightspace-mcp-server/mcp_server.py" ] } } }