pw-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pw-mcp How much physics backlog do I have?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pw-mcp
Physics Wallah Study MCP Server
Schedule tracking, backlog management, and progress monitoring for PW students — powered by the Model Context Protocol.
What it does
Connect your AI assistant to your PW study data. Ask questions like:
"What classes do I have today?"
"How much physics backlog do I have?"
"Generate a 7-day study plan for 4 hours/day"
"Mark the chemical bonding lecture as done"
The server exposes 15 MCP tools that any MCP-compatible client (Claude, opencode, etc.) can call.
Related MCP server: TechMCP - PSG College of Technology MCP Server
Quick Start
# Clone
git clone https://github.com/vspcoderz/pw-mcp.git
cd pw-mcp
# Install
uv venv && source .venv/bin/activate
uv sync
# Run (mock mode — no credentials needed)
uv run pw-mcpThat's it. Mock mode works offline with realistic sample data across Physics, Chemistry, and Mathematics.
Real PW Integration
To connect to your actual PW account:
Get your API token:
Log into pw.live in your browser
Open DevTools → Network tab
Filter by
token, find theverify-tokenrequestCopy the
Authorization: Bearer <token>value
Configure:
cp .env.example .envEdit
.env:PW_PROVIDER=pw PW_API_TOKEN=your_token_here PW_DEFAULT_BATCH=your-batch-slugRun:
uv run pw-mcp
How it works:
The real provider uses PW's
weekly-scheduleendpoint to fetch today's and upcoming lectures — the same data the PW app shows in the "Weekly Schedule" tabFalls back to the topics/contents endpoint for older lectures
Progress tracking is stored locally in SQLite (PW doesn't expose a server-side progress API)
Set
PW_DEFAULT_BATCHto your batch slug (the part after/batches/in the PW URL)
Configuration
Variable | Default | Description |
|
|
|
| — | Bearer token for pw.live |
| — | Override API base URL |
|
| Batch slug for schedule fetching |
|
| Request timeout in seconds |
|
| SQLite database path |
|
| Timezone for schedule calculations |
|
| Logging verbosity |
Architecture
┌─────────────────────────────────────────────┐
│ MCP Client │
│ (Claude, opencode, etc.) │
└──────────────────┬──────────────────────────┘
│ stdio
┌──────────────────▼──────────────────────────┐
│ MCP Server (server.py) │
├─────────────┬───────────────┬───────────────┤
│ Schedule │ Backlog │ Progress │
│ Service │ Service │ Service │
├─────────────┴───────────────┴───────────────┤
│ PWProvider (ABC) │
├──────────────────┬──────────────────────────┤
│ MockPWProvider │ RealPWProvider │
│ (offline) │ (pw.live API) │
└──────────────────┴──────────────────────────┘Design principle: Services never know where data comes from. The provider abstraction makes swapping mock ↔ real trivial.
MCP Tools
Schedule
Tool | Description |
| Today's lectures |
| Next N days (1-30) |
| Custom date range |
| Next upcoming incomplete lecture |
| Single lecture by ID |
Backlog
Tool | Description |
| Incomplete past lectures (filterable) |
| Backlog for a subject |
| Backlog for a chapter |
| Aggregate statistics |
| Oldest incomplete lecture |
Progress
Tool | Description |
| Mark lecture done |
| Mark lecture not done |
| Update watch progress |
| Overall progress |
Planning
Tool | Description |
| Personalized study plan from backlog |
MCP Client Setup
opencode
Add to your opencode.json:
{
"mcp": {
"pw": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/pw-mcp", "pw-mcp"]
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pw": {
"command": "uv",
"args": ["run", "--directory", "/path/to/pw-mcp", "pw-mcp"]
}
}
}MCP Inspector
Test with the official inspector:
npx @modelcontextprotocol/inspector uv run pw-mcpTesting
uv run pytest -v78 tests covering:
Schedule queries (today, upcoming, date range)
Backlog calculation (subject/chapter filtering, summary)
Progress tracking (mark complete/incomplete, watched minutes)
SQLite persistence (upsert, delete, reconnection)
Study plan generation (hours constraint, subject filter)
Model validation and timezone handling
Provider selection and configuration
Project Structure
pw-mcp/
├── pyproject.toml
├── .env.example
├── src/pw_mcp/
│ ├── server.py # MCP tool definitions + wiring
│ ├── config.py # pydantic-settings config
│ ├── exceptions.py # Custom exceptions
│ ├── models/ # Pydantic data models
│ │ ├── lecture.py
│ │ ├── schedule.py
│ │ ├── backlog.py
│ │ └── progress.py
│ ├── providers/ # Data source abstraction
│ │ ├── base.py # PWProvider ABC
│ │ ├── mock.py # Offline with sample data
│ │ └── pw.py # Real pw.live API
│ ├── services/ # Business logic
│ │ ├── schedule.py
│ │ ├── backlog.py
│ │ ├── progress.py
│ │ └── study_plan.py
│ ├── storage/ # SQLite persistence
│ │ └── sqlite.py
│ └── utils/ # Date/formatting helpers
│ ├── dates.py
│ └── formatting.py
├── tests/ # pytest suite
└── docs/
└── pw-api.md # PW API reverse-engineering docsPW API Notes
See docs/pw-api.md for full endpoint documentation.
Key findings:
PW uses OTP-based auth (no username/password)
Weekly schedule is available via
/v3/batches/{slug}/weekly-scheduleProgress tracking is client-side only
Two platforms:
pw.live(school/exam prep) andpwskills.com(professional courses)
License
MIT
Available Tools
15 toolsgenerate_study_planC
Generate a study plan from backlog.
Inputs: days (required), hours_per_day (required), subject.
get_backlogC
Get incomplete past lectures (backlog).
Inputs: limit, chapter, subject.
get_backlog_summaryC
Get aggregate backlog statistics.
Inputs: no named parameters.
get_chapter_backlogC
Get backlog for a specific chapter.
Inputs: chapter (required), subject (required).
get_completion_statsA
Get overall course completion statistics.
Inputs: no named parameters.
get_lectureA
Get details for a specific lecture by ID.
Inputs: lecture_id (required).
get_next_lectureB
Get the next upcoming incomplete lecture.
Inputs: no named parameters.
get_oldest_backlog_lectureB
Get the oldest incomplete lecture.
Inputs: no named parameters.
get_scheduleB
Get lecture schedule for a specific date range.
Inputs: end_date (required), start_date (required).
get_subject_backlogC
Get backlog for a specific subject.
Inputs: subject (required).
get_today_scheduleA
Get today's PW lecture schedule.
Inputs: no named parameters.
get_upcoming_scheduleA
Get upcoming lecture schedule for the next N days.
Inputs: days.
mark_lecture_completedC
Mark a lecture as completed in local storage.
Inputs: lecture_id (required).
mark_lecture_incompleteB
Mark a lecture as incomplete in local storage.
Inputs: lecture_id (required).
update_watched_minutesC
Update how many minutes of a lecture have been watched.
Inputs: minutes (required), lecture_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Tools are mostly distinct by resource and filter: schedule queries differ by time range, and backlog queries differ by subject/chapter/aggregate. Minor ambiguity exists between get_next_lecture and get_oldest_backlog_lecture, and get_backlog vs get_backlog_summary, but descriptions largely resolve this.
All tool names follow a consistent verb-first pattern: get_, mark_, update_, generate_. Nouns are clear and singular, with no mixed casing or vague action verbs.
15 tools is at the upper edge of well-scoped, and most tools serve a distinct purpose. A few convenience getters (today's schedule, upcoming schedule, date-range schedule) could be consolidated, but the count is still reasonable for the domain.
The surface covers schedule lookup, backlog filtering, completion state changes, watched minutes, stats, and study plan generation. Minor gaps like explicit subject/chapter listing or a way to view all lectures outside a date range are workable around.
Related MCP Connectors
YouTube playlists to AI flashcards, spaced repetition and guided learning missions.
Your planner in every AI chat: tasks, calendar, docs, habits, goals and memory, over MCP.
Voice-led, FSRS-scheduled flashcards from YouTube, PDFs, web, or text. Auto-graded quizzes.
Your life dashboard for AI: tasks, habits, goals, budgets, workouts, nutrition, journal, notes.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceConnects AI assistants to the FAST-NUCES Flex Student Portal, enabling students to query their academic data including attendance, marks, transcript, and fee reports through natural language conversations.6-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to access PSG College of Technology e-campus portal data including CA marks, attendance records, timetable schedules, and course information through natural language queries.4MIT

MCPaeroeduofficial
AlicenseAqualityCmaintenanceEnables AI assistants to interact with the AeroEduVision platform, allowing exam generation, course management, knowledge graph queries, and student progress tracking through natural language commands.24MIT- FlicenseNot gradedqualityDmaintenanceEnables an AI assistant to help students by providing tools for math calculations, attendance tracking, marks analysis, reading PDF notes, searching lecture notes, and checking college regulations.-