Inspiration
SJMaths is a static educational platform built for CBSE mathematics students. We host structured notes, formulas, and practice problems with zero backend servers.
With the rise of AI agents like ChatGPT and Claude that can browse the web, we noticed a major dilemma for static educational websites:
- Students try using AI to learn from websites, but models usually just read the text, summarize blindly, or blurt out the answer keys immediately when asked for hints.
- Adding an embedded AI tutor is expensive: Running server-side LLM wrappers requires API keys, ongoing GPU server costs, and constant maintenance.
When we discovered the Web Model Context Protocol (WebMCP), we realized the perfect architecture: Keep the website 100% static, and let the user's external AI agent (ChatGPT, Gemini, etc.) connect via WebMCP directly in the browser.
What it does
SJMaths WebMCP converts our entire static CBSE Class 10 mathematics curriculum into 13 browser-native WebMCP tools registered in document.modelContext.
When any external AI agent visits the site, it instantly gets structured, typed tools to teach the student:
- Discover Curriculum Structure: Explore 14 chapters, 45 topics, and 85 skills (
get_curriculum_outline,get_chapter_topics). - Diagnose Prerequisite Foundations: Test foundational prerequisite readiness before introducing advanced concepts (
get_prerequisite_check). - Teach with Verified Concepts & Worked Models: Retrieve verified formulas, common math traps, and step-by-step worked examples (
get_topic_concepts,get_worked_examples). - Anti-Leak Assessment Mode: When students practice, the tools automatically strip answer keys from the content on the client side. The external AI evaluates student attempts through
evaluate_practicerather than reading raw answers. - 3-Tier Progressive Hints: Provide subtle conceptual nudges (Level 1), calculation steps (Level 2), or full solutions (Level 3) only when the student is stuck (
get_hint). - Client-Side State Tracking: Track error streaks and recommend adaptive next steps (
get_next_learning_action,get_learning_progress).
All tools run client-side in memory with sub-millisecond execution (<1.5ms) and zero server costs.
How we built it
- Universal Curriculum Schema: Organized all 14 chapters into a unified JSON format (
cbse-class-10-mathematics.json). - WebMCP Tool Dispatcher: Built
webmcp-tools.jsto expose 13 standards-compliant tools viadocument.modelContextandnavigator.modelContext. - Client-Side Security & State: Created a lightweight in-memory
StateStorethat prevents solution leakage and tracks student performance locally in the browser. - Interactive Visual Inspector: Built a real-time tool inspector in
demo/index.htmlallowing learners and judges to watch live JSON payloads and latency metrics. - Edge-Case Test Suite: Authored
webmcp-edge-cases.test.mjswith 61 automated assertions across all 45 topics (100% passing).
Challenges we ran into
- Designing clean, anti-leak filters that give external AI agents rich pedagogical context while strictly withholding answers during assessments.
- Creating a progressive 3-tier hint engine that adapts to error streaks without leaking solutions prematurely.
- Ensuring WebMCP tool registration works reliably across multiple browser execution environments.
Accomplishments that we're proud of
- 100% static architecture: zero backend servers or LLM API keys required.
- Full curriculum coverage: all 14 chapters and 45 topics of CBSE Class 10 Mathematics.
- Blazing performance: sub-1.5ms in-memory execution latency.
- Rock-solid stability: 61/61 edge-case tests passing.
What we learned
WebMCP proves that static websites don't need expensive AI backends to be AI-native. By providing clean, typed tools in the browser, any static site can become an interactive learning environment for external AI agents.
What's next for SJMaths
- Expanding the WebMCP tool schemas to CBSE Classes 9, 11, and 12.
- Canvas-based handwritten math equation evaluation.
Built With
- ai-agents
- cbse-mathematics
- chatgpt
- css3
- document.modelcontext
- edtech
- gemini
- html5
- javascript
- json-schema
- node.js
- webmcp

Log in or sign up for Devpost to join the conversation.