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
- Claude Desktop: Download and install from claude.ai/download
- MCP Proxy: Install the proxy to connect Claude Desktop to Pawtograder
- 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:Step 3: Create an API token
- Navigate to your user menu in Pawtograder
- Click Settings → API Tokens
- Click Create New Token
- Enter a name (e.g., “Claude Desktop”)
- 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):
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:- Diagnosis with evidence: The AI fetches the student’s code, test results, and assignment spec to identify the issue
- Draft responses: Two versions (Socratic/exploratory and direct/efficient) that you can copy or adapt
- Verification checklist: Reminders to verify the AI’s analysis before sending
- 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
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:- Analyze the error pattern across multiple submissions
- Determine if it’s a student error or an assignment/test issue
- 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
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_profilefield - 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 historyget_discussion_thread: Fetch discussion thread with repliesget_assignment: Get assignment details including handout URL
Submission tools
get_submission: Get submission metadatalist_submission_files: See what files were submittedget_submission_files: Fetch specific source files (supports glob patterns)
Test and build tools
list_submission_tests: See all test resultsget_test_output: Get detailed output for a specific testget_submission_build_output: Get compilation/build errors
Repository tools
list_grader_files: List files in the grader/solution repositoryget_grader_files: Fetch grader files (tests, mutants, solution code)list_handout_files: List files in the template/handout repositoryget_handout_files: Fetch handout/starter code files
Search tools
search_help_requests: Find related help requestssearch_discussion_threads: Find related discussion threadsget_submissions_for_student: Get a student’s submission history
Managing API tokens
Viewing tokens
- Click your user menu
- Select Settings → API Tokens
- View all your tokens with their status (Active, Expired, or Revoked)
Creating tokens
- Click Create New Token
- Enter a descriptive name
- Copy the token immediately - it won’t be shown again
- Tokens are valid for 90 days by default
Revoking tokens
- Find the token in your token list
- Click the trash icon
- 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.jsonis in the correct location - Check that the JSON syntax is valid
- Ensure you replaced
YOUR_TOKEN_HEREwith 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