← /projectsMCPTypeScript · MCP · Node.js

19-tool MCP server that gives Claude natural-language access to your StudentVue gradebook — grades, GPA, attendance, schedule, missing work, and grade simulation.

Built with TypeScript, MCP, Node.js, Zod and StudentVue API. The code is on GitHub.

A fully local Model Context Protocol (MCP) server written in TypeScript that bridges Claude Desktop to the StudentVue / Synergy school information system used by thousands of US school districts. Every aspect of a student's academic record becomes conversationally accessible: ask Claude "what's my current GPA?", "which assignments am I missing in AP Calc?", or "what score do I need on the final to get an A?" and the server fetches live data, computes the answer, and responds in plain English.

The 19 registered tools span three categories. Grade Analysis tools (7) — get_gradebook, get_grade_summary, get_grade_details, get_grade_needed, simulate_grade_scenario, get_low_grades, get_category_breakdown — parse the raw Points[] arrays from the Synergy SOAP API, compute weighted averages, project hypothetical scores, and convert percentages to letter grades via percentToLetter(). Academic Info tools (6) — get_student_info, get_school_info, get_schedule, get_calendar, get_documents, get_report_cards — surface every piece of institutional data StudentVue exposes. Smart Insights tools (6) — get_gpa, get_assignments_due, get_missing_assignments, ask_about_grades, get_attendance, get_messages — implement a full 4.0-scale GPA calculator, a missing-work detector, and a comprehensive context dump that feeds all course data to Claude for open-ended analysis.

Architecturally, the server uses the @modelcontextprotocol/sdk McpServer class with a StdioServerTransport, communicating over JSON-RPC 2.0 via stdin/stdout. All tool inputs are validated with Zod schemas before execution. A singleton StudentVue client (src/client.ts) lazily authenticates once and reuses the session across all 19 tools, avoiding repeated SOAP handshakes. A custom errFrom() utility handles the studentvue library's unusual behavior of throwing plain JavaScript objects rather than Error instances, serializing them to JSON for readable error messages in Claude.

What it does

  • 19 tools registered via McpServer + StdioServerTransport (JSON-RPC 2.0 over stdin/stdout)
  • Grade simulation: project hypothetical assignment scores to see grade impact before submitting
  • GPA calculator: 4.0-scale weighted GPA across all scored courses with letterToGpa() mapping
  • Missing assignment detector: flags any Score that is blank, 'Not Graded', or contains 'missing'
  • ask_about_grades: full context dump of all courses, assignments, and priorities for AI analysis
  • Grade needed calculator: computes exact score required on next assignment to hit target grade
  • Singleton client pattern: one authenticated StudentVue session shared across all 19 tools
  • Custom errFrom() serializer: handles plain-object throws from the studentvue npm library
  • Zod input validation on all tool schemas with typed argument destructuring
  • Category breakdown: per-category weighted averages (Homework, Tests, Quizzes, etc.)

From the code

typescript
// Grade simulation tool — core logic
async ({ courseName, hypotheticalScores }) => {
  const client = await getClient();          // singleton
  const gradebook = await client.gradebook(0);
  const courses = extractCourses(gradebook);
  const course = findCourse(courses, courseName);

  // Tally current earned / total points
  let earnedPoints = 0, totalPoints = 0;
  for (const a of extractAssignments(extractMarks(course)[0])) {
    const parts = a.Points?.split('/') ?? [];
    if (parts.length !== 2) continue;
    const possible = parsePoints(parts[1]);
    const earned  = parsePoints(a.Score);
    if (possible === null || earned === null) continue;
    earnedPoints += earned;
    totalPoints  += possible;
  }

  // Add hypothetical assignments
  let simEarned = earnedPoints, simTotal = totalPoints;
  for (const h of hypotheticalScores) {
    simEarned += h.score;
    simTotal  += h.outOf;
  }

  const currentPct   = totalPoints > 0 ? (earnedPoints / totalPoints) * 100 : null;
  const projectedPct = simTotal   > 0 ? (simEarned   / simTotal)    * 100 : null;

  return ok({
    currentGrade:    currentPct   !== null ? Math.round(currentPct   * 100) / 100 : null,
    projectedGrade:  projectedPct !== null ? Math.round(projectedPct * 100) / 100 : null,
    projectedLetter: projectedPct !== null ? percentToLetter(projectedPct) : 'N/A',
    change: currentPct !== null && projectedPct !== null
      ? Math.round((projectedPct - currentPct) * 100) / 100 : null,
  });
}

Keep reading

A few sentences is plenty. If it's a fit, our first call starts with the work instead of an intro.

Send me a noteClass of 2029