Skip to main content

MCP server for AVC course scheduling and registration analysis with web scraping, prerequisite validation, and schedule optimization

Project description

Scheduler MCP - AI-Powered Course Planning

PyPI version License: MIT

A comprehensive course planning and schedule generation system built as an MCP (Model Context Protocol) server for Antelope Valley College. This tool helps students search courses, validate prerequisites, detect schedule conflicts, generate optimal schedules, and estimate workload.

Now available on PyPI and hosted on Railway for instant access!

Quick Start

Option 1: Use Hosted Server (Recommended)

Connect to our hosted Railway server - no installation needed!

For Claude Desktop

Add to your MCP settings (~/Library/Application Support/Claude/claude_desktop_config.json on Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "scheduler-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://schedulermcp-production.up.railway.app/mcp",
        "--allow-http"
      ]
    }
  }
}

For Other MCP Clients

Use the endpoint:

https://schedulermcp-production.up.railway.app/mcp

Option 2: Install from PyPI

# Using pip
pip install scheduler-mcp

# Using uv (recommended)
uv pip install scheduler-mcp

# Using uvx (no installation, run directly)
uvx scheduler-mcp

Option 3: Install from Source

git clone https://github.com/yourusername/schedulerMCP.git
cd schedulerMCP
pip install -e .

Features

๐Ÿ” Course Discovery

  • Search Courses: Find courses by keyword, department, or course ID
  • Course Information: Get detailed course info including prerequisites, units, and workload
  • Section Listing: View available sections with meeting times and instructors
  • Lab Times: See laboratory session times separately from lectures

๐Ÿ“… Schedule Planning

  • Conflict Detection: Identify time overlaps between selected courses (including labs!)
  • Schedule Generation: Generate all valid schedule combinations
  • Smart Recommendations: Get the best schedule based on your preferences (balanced, compact, no mornings)
  • Semester Context: All responses include which semester you're viewing

๐ŸŽ“ Academic Planning

  • Prerequisite Validation: Verify you meet requirements for requested courses
    • Handles complex AND/OR logic (e.g., "MATH150 AND (CS130 OR CS131)")
  • Corequisite Checking: Ensure corequisites are included in your schedule
  • Multi-Semester Planning: Validate long-term course plans across multiple semesters

๐Ÿ“Š Workload Management

  • Workload Estimation: Calculate weekly hours including lecture, lab, and study time
  • Deadline Clusters: Predict busy weeks with overlapping deadlines
  • Heavy Semester Detection: Get warnings about overloaded schedules

๐ŸŒ Web Scraping

  • Automatic Data Collection: Scrapes AVC course catalog and schedule
  • Parallel Processing: 5x faster scraping with concurrent requests
  • Semester Management: Auto-detects current semester and manages data files

Usage Examples

With Claude Desktop

Once configured, just ask Claude natural language questions:

"What computer science courses are available for Spring 2026 semester?"

"Can I take CS150 if I've completed MATH150 and CS130?"

"Generate a schedule with CS120, MATH150, and ENGL101 that avoids morning classes"

"How many hours per week is this schedule?"

With MCP Inspector

Test the server locally:

npx @modelcontextprotocol/inspector uvx scheduler-mcp

Programmatic Usage

from scheduler_mcp import database, schueduling

# Load course data
database.load_courses()

# Search for courses
results = database.search_courses("computer science")

# Validate prerequisites
validation = schueduling.validate_prerequisites(
    completed_courses=["math150", "cs130"],
    requested_courses=["cs150"]
)

# Detect conflicts
conflicts = schueduling.detect_conflicts(["cs120", "math150"])

# Generate schedules
schedules = schueduling.generate_schedules(
    ["cs120", "math150", "engl101"],
    max_units=18
)

Available MCP Tools

The server exposes 12 MCP tools:

(check API_SPECIFICATIONS.md for more help!)

Course Discovery

  1. search_courses(query, semester) - Search for courses
  2. get_course_info(course_id, semester) - Get detailed course information
  3. get_course_sections(course_id, semester) - Get course sections with times

Schedule Analysis

  1. detect_schedule_conflicts(course_ids, semester) - Find time conflicts
  2. generate_possible_schedules(courses, max_units, semester) - Generate valid schedules
  3. suggest_best_schedule(courses, preference, max_units, semester) - Get best schedule

Prerequisite Validation

  1. validate_prerequisites(completed, requested, semester) - Check prerequisites
  2. validate_course_plan(semester_plan, semester) - Validate multi-semester plan

Workload Estimation

  1. estimate_semester_workload(course_ids, semester) - Calculate weekly hours
  2. detect_deadline_clusters(course_ids, semester) - Predict busy periods

Semester Management

  1. set_semester(semester) - Change active semester
  2. get_current_semester() - Get current semester info

Data Collection

The system automatically scrapes course data from AVC's website:

# Manual scraping (optional - happens automatically when needed)
python src/scheduler_mcp/webscrapper/unified_scraper.py

# Scrapes:
# - Course catalog (titles, descriptions, prerequisites)
# - Schedule (sections, meeting times, instructors, labs)
# - Merges data into courses_<semester>.json

Performance:

  • Parallel scraping: 2-5 minutes (5x faster than sequential)
  • Data cached per semester
  • Auto-scrapes when semester data missing

Project Structure

schedulerMCP/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ scheduler_mcp/
โ”‚       โ”œโ”€โ”€ run.py                    # MCP server with HTTPS support
โ”‚       โ”œโ”€โ”€ database.py               # Course data loading and queries
โ”‚       โ”œโ”€โ”€ schueduling.py            # Scheduling algorithms
โ”‚       โ”œโ”€โ”€ workload.py               # Workload estimation
โ”‚       โ”œโ”€โ”€ semesterSync.py           # Semester management
โ”‚       โ”œโ”€โ”€ data/                     # Course data directory
โ”‚       โ”‚   โ”œโ”€โ”€ courses.json          # Default course database
โ”‚       โ”‚   โ””โ”€โ”€ courses_*.json        # Semester-specific databases
โ”‚       โ”œโ”€โ”€ tools/
โ”‚       โ”‚   โ””โ”€โ”€ courses.py            # Tool implementations
โ”‚       โ”œโ”€โ”€ webscrapper/
โ”‚       โ”‚   โ”œโ”€โ”€ unified_scraper.py    # Main scraper
โ”‚       โ”‚   โ”œโ”€โ”€ allCoursesScrapper.py # Catalog scraper
โ”‚       โ”‚   โ””โ”€โ”€ schuedulerScrapper.py # Schedule scraper
โ”‚       โ””โ”€โ”€ tests/
โ”‚           โ”œโ”€โ”€ testConflicts.py      # Conflict detection tests
โ”‚           โ”œโ”€โ”€ testPrereqs.py        # Prerequisite validation tests
โ”‚           โ””โ”€โ”€ testSchueduler.py     # Schedule generation tests
โ”œโ”€โ”€ pyproject.toml                    # Package configuration
โ”œโ”€โ”€ README.md                         # This file
โ””โ”€โ”€ LICENSE                           # MIT License

Development

Running Tests

# Install dev dependencies
pip install -e ".[dev]"

# Run all tests
pytest src/scheduler_mcp/tests/

# Run specific test file
pytest src/scheduler_mcp/tests/testPrereqs.py -v

# Run with coverage
pytest src/scheduler_mcp/tests/ --cov=scheduler_mcp

Local Development

# Install in development mode
pip install -e .

# Run MCP server locally
scheduler-mcp

# Test with MCP Inspector
npx @modelcontextprotocol/inspector uvx scheduler-mcp

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite (pytest)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Architecture

The system follows a layered architecture:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    MCP Interface Layer (HTTPS)          โ”‚  โ† AI Assistant Integration
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    Tool Implementation Layer            โ”‚  โ† Business Logic
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    Core Logic Layer                     โ”‚  โ† Algorithms
โ”‚  (Scheduling, Validation, Workload)     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    Data Collection Layer                โ”‚  โ† Web Scraping
โ”‚  (Catalog, Schedule, Merging)           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Design Principles:

  • Separation of Concerns: Clear boundaries between layers
  • Stateful Context: Persistent semester selection across tool invocations

Technical Highlights

Prerequisite Parsing

  • Handles AND/OR logic with nested arrays
  • Example: ["MATH150", ["CS130", "CS131"]] means MATH150 AND (CS130 OR CS131)
  • Filters metadata (C-ID, Formerly, etc.) before parsing

Web Scraping

  • Parallel Processing: ThreadPoolExecutor with 5 workers
  • TBA Course Handling: Detects colspan attributes for proper parsing
  • Lab Time Extraction: Associates lab sessions with lecture sections
  • Course ID Normalization: high merge accuracy between catalog and schedule

Deployment

Railway (Production)

The server is deployed on Railway at:

https://schedulermcp-production.up.railway.app/mcp

Features:

  • HTTPS support
  • Automatic updates from main branch
  • Environment variable configuration

Limitations

  • Single Institution: Currently AVC-specific (scraper tied to AVC's HTML structure)
  • No Real-Time Enrollment: Cannot track seat availability or waitlists
  • Semester-Based Updates: Data updated per semester, not continuously
  • Basic Optimization: Simple preference modes (no multi-objective optimization)

Future Enhancements

  • Canvas API integration for real-time enrollment data
  • Multi-institution support with configurable scrapers
  • Visual schedule generation (calendar view)
  • Export to Apple Calendar/Google Calendar
  • Machine learning for schedule recommendations

Research Paper

This project was developed as part of a course assignment on MCP servers. See RESEARCH_PAPER.md for the full research paper.

License

MIT License - see LICENSE file for details.

Contact

Author: Elijah Sayres
Email: elijahsayres@gmail.com
Institution: Antelope Valley College

Acknowledgments

  • Antelope Valley College for course data
  • FastMCP team for the excellent Python MCP SDK
  • Model Context Protocol creators for the open standard
  • Railway for hosting infrastructure

Links


Made with โค๏ธ for AVC students

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scheduler_mcp-1.1.2.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scheduler_mcp-1.1.2-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file scheduler_mcp-1.1.2.tar.gz.

File metadata

  • Download URL: scheduler_mcp-1.1.2.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scheduler_mcp-1.1.2.tar.gz
Algorithm Hash digest
SHA256 074a8c960df2412bad6f3740305b6185bb6d8f1d35be1a74fe00edb47d5d643f
MD5 1a69bcc4de00c4ca4785544fb9ca1ec1
BLAKE2b-256 1349b823d40e3f3263829a1650b4755cdbd9df73f592b870ba8ca87c8fa3fa7e

See more details on using hashes here.

File details

Details for the file scheduler_mcp-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: scheduler_mcp-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scheduler_mcp-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8862850fdda7c4689ab902c3009527d951c03bcffa1d6530153beb76635f55fa
MD5 bbc91fc61d2178df69d090883e45f81d
BLAKE2b-256 9991be71505dfa64144c8c00a492d74af1edc53c54eaca6b48d7b82f2b770bf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page