Skip to main content

AI assistance for helping students

Pawtograder provides AI assistance tools that help instructors and graders support students more effectively. These tools use the Model Context Protocol (MCP) to give AI assistants structured access to student help requests, discussion threads, and submission data.

Overview

AI assistance is available in several contexts:
  • Office hours help requests: Get AI help analyzing student questions and drafting responses
  • Discussion threads: Get AI assistance for answering student questions on the discussion board
  • Test failures: Analyze why students are failing specific tests
  • Build errors: Diagnose compilation and build failures
  • Test insights: Analyze common error patterns across multiple submissions

Setting up AI assistance

Prerequisites

  1. Claude Desktop: Download and install from claude.ai/download
  2. MCP Proxy: Install the proxy to connect Claude Desktop to Pawtograder
  3. API Token: Create a token in Pawtograder to authenticate the MCP server

Step 1: Install Claude Desktop

Download and install Claude Desktop from Anthropic at claude.ai/download.

Step 2: Install the MCP proxy

Claude Desktop currently only supports stdio-based MCP servers. Install the proxy to connect to Pawtograder:
npx @anthropic-ai/mcp-proxy@latest

Step 3: Create an API token

  1. Navigate to your user menu in Pawtograder
  2. Click SettingsAPI Tokens
  3. Click Create New Token
  4. Enter a name (e.g., “Claude Desktop”)
  5. Copy the token immediately - it will only be shown once

Step 4: Configure Claude Desktop

Open Claude Desktop settings and add the Pawtograder MCP server configuration: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Add this configuration (replace YOUR_TOKEN_HERE with your token):
{
  "mcpServers": {
    "pawtograder": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-proxy@latest", "https://app.pawtograder.com/functions/v1/mcp-server"],
      "env": {
        "MCP_HEADERS": "{\"Authorization\": \"Bearer YOUR_TOKEN_HERE\"}"
      }
    }
  }
}

Step 5: Restart Claude Desktop

Quit and reopen Claude Desktop. You should see “pawtograder” listed as an available MCP server in the tools menu.

Using AI assistance

Office hours and discussion threads

When viewing a help request or discussion thread, click the AI Help button (robot icon) to copy a pre-formatted prompt. Paste this into Claude Desktop to get:
  1. Diagnosis with evidence: The AI fetches the student’s code, test results, and assignment spec to identify the issue
  2. Draft responses: Two versions (Socratic/exploratory and direct/efficient) that you can copy or adapt
  3. Verification checklist: Reminders to verify the AI’s analysis before sending
The AI will automatically fetch:
  • The student’s question and conversation history
  • The assignment specification and handout URL
  • The student’s submission files and test results
  • Related discussion threads from other students

Test failures and build errors

When viewing submission results, you’ll see AI Help buttons next to:
  • Build errors: Click to analyze compilation failures
  • Failing tests: Click to analyze why a specific test is failing
The AI will fetch the relevant code, test output, and assignment requirements to provide a diagnosis.

Test insights

When viewing common error patterns in the test insights dashboard, click AI Analyze to get help understanding why multiple students are making the same mistake. The AI will:
  1. Analyze the error pattern across multiple submissions
  2. Determine if it’s a student error or an assignment/test issue
  3. Draft a discussion post you can share with the class

Providing feedback

After using AI assistance, Pawtograder will prompt you to provide feedback:
  • Thumbs up/down: Rate whether the AI’s analysis was accurate
  • Optional comment: Provide additional details about what was helpful or not
This feedback helps improve the AI assistance feature for your course.

Privacy and security

The MCP server is designed with privacy in mind:
  • Never exposes the users table or email addresses
  • Never exposes the is_private_profile field
  • Only accessible to instructors and graders
  • Class-level access control: You can only access data from classes where you have instructor/grader permissions
  • Token-based authentication: API tokens can be revoked at any time

Available MCP tools

The Pawtograder MCP server provides these tools for AI assistants:

Context tools

  • get_help_request: Fetch help request with conversation history
  • get_discussion_thread: Fetch discussion thread with replies
  • get_assignment: Get assignment details including handout URL

Submission tools

  • get_submission: Get submission metadata
  • list_submission_files: See what files were submitted
  • get_submission_files: Fetch specific source files (supports glob patterns)

Test and build tools

  • list_submission_tests: See all test results
  • get_test_output: Get detailed output for a specific test
  • get_submission_build_output: Get compilation/build errors

Repository tools

  • list_grader_files: List files in the grader/solution repository
  • get_grader_files: Fetch grader files (tests, mutants, solution code)
  • list_handout_files: List files in the template/handout repository
  • get_handout_files: Fetch handout/starter code files

Search tools

  • search_help_requests: Find related help requests
  • search_discussion_threads: Find related discussion threads
  • get_submissions_for_student: Get a student’s submission history

Managing API tokens

Viewing tokens

  1. Click your user menu
  2. Select SettingsAPI Tokens
  3. View all your tokens with their status (Active, Expired, or Revoked)

Creating tokens

  1. Click Create New Token
  2. Enter a descriptive name
  3. Copy the token immediately - it won’t be shown again
  4. Tokens are valid for 90 days by default

Revoking tokens

  1. Find the token in your token list
  2. Click the trash icon
  3. The token will be immediately revoked and can no longer be used

Troubleshooting

Claude Desktop doesn’t show the Pawtograder server

  • Verify your claude_desktop_config.json is in the correct location
  • Check that the JSON syntax is valid
  • Ensure you replaced YOUR_TOKEN_HERE with your actual token
  • Restart Claude Desktop after making changes

”Invalid or expired API token” error

  • Your token may have expired (tokens last 90 days)
  • Your token may have been revoked
  • Create a new token and update your Claude Desktop configuration

AI can’t access my class data

  • Verify you have instructor or grader permissions in the class
  • The MCP server only works for instructors and graders, not students
  • Check that you’re using the correct class ID in your prompts