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:- Help requests: Get AI help when responding to student questions in office hours
- Discussion threads: Analyze student questions and draft responses
- Test failures: Understand why students are failing specific tests
- Build errors: Diagnose compilation and build issues
- Test insights: Analyze common error patterns across multiple submissions
How It Works
When you click an AI Help button, Pawtograder generates a structured prompt that includes:- Context about the student’s question or issue
- Links to relevant assignment details and handout URLs
- Suggested MCP tools for fetching additional data
- Guidance on how to structure your analysis
Setting Up AI Assistance
Prerequisites
- You must be an instructor or grader in the course
- Claude Desktop (recommended) or another MCP-compatible AI assistant installed
Install Claude Desktop
Download and install Claude Desktop from claude.ai/download.
Install the MCP Proxy
Claude Desktop currently only supports stdio-based MCP servers. Install the proxy to connect to Pawtograder’s HTTP-based MCP server:
Create an API Token
- Click your profile menu in Pawtograder
- Select Settings → API Tokens
- Click Create New Token
- Enter a descriptive name (e.g., “Claude Desktop”)
- Copy the token immediately — it will only be shown once
Configure Claude Desktop
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
YOUR_PAWTOGRADER_URL with your Pawtograder instance URL, e.g. https://app.pawtograder.com, and YOUR_TOKEN_HERE with the token you created):Using AI Assistance
In Help Requests
When helping a student in office hours:- Click the AI Help button (robot icon) in the help request chat
- The system copies a pre-formatted prompt to your clipboard
- Paste the prompt into Claude Desktop
- Claude will automatically fetch:
- The student’s question and conversation history
- Their latest submission with test results
- The assignment specification and handout URL
- Related discussion threads
- Diagnosis with evidence: Specific code snippets and test outputs showing the issue
- Two draft responses: Socratic (exploratory) and Direct (efficient) versions
- Verification checklist: Items to confirm before sending
In Discussion Threads
When responding to student questions on the discussion board:- Click the AI Help icon in the thread actions
- Paste the copied prompt into Claude
- Claude fetches the thread, replies, and related context
- Review the suggested response and adapt as needed
For Test Failures and Build Errors
When viewing a student’s submission results:- Click the AI Help icon next to a failing test or build error
- Paste the copied prompt into your AI assistant
- Claude analyzes:
- The test output and error messages (or build output)
- The student’s source code
- The assignment specification
- The expected behavior
For Common Error Patterns
In the test insights dashboard:- Click AI Analyze on an error group
- Claude examines submissions from multiple students
- Determines whether it’s a student error or an assignment/test issue
- Drafts a discussion post you can share with the class
Available MCP Tools
The Pawtograder MCP server provides these tools to AI assistants:Context Tools
get_help_request— Fetch help request with conversation historyget_discussion_thread— Fetch discussion thread with repliesget_assignment— Get assignment details, handout URL, and rubric
Submission Tools
get_submission— Get submission metadata and summarylist_submission_files— See what files the student submittedget_submission_files— Fetch specific source files using glob patternslist_submission_tests— See all test results (pass/fail, scores)get_test_output— Get detailed output for specific testsget_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, solutions)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 all submissions for a student
Handout URLs
To provide better context to AI assistants, add a Handout URL when creating assignments:- Navigate to the assignment creation form
- Fill in the Handout URL field with a link to your assignment instructions
- The URL will be provided to AI assistants when analyzing student issues
Privacy and Security
The MCP server is designed with privacy and security in mind:- Access control: Only instructors and graders can use AI assistance
- Class-level authorization: You can only access data from classes where you have instructor or grader role
- Privacy protection: The system never exposes user email addresses or private profile flags
- Token-based authentication: API tokens are long-lived JWTs that can be revoked at any time
- Audit trail: Token usage is tracked with last-used timestamps
Providing Feedback
After using AI assistance, you’ll be prompted to provide feedback:- Thumbs up/down: Rate whether the AI analysis was helpful
- Optional comment: Provide details about what worked or didn’t work
Managing API Tokens
Viewing Your Tokens
- Click your profile menu
- Select Settings → API Tokens
- View all your tokens with their status, creation date, and last used date
Creating a Token
- Click Create New Token
- Enter a descriptive name (e.g., “Claude Desktop”, “VS Code”)
- Copy the token immediately — it will only be shown once
Revoking a Token
- Find the token in your token list
- Click the trash icon
- Confirm revocation
Best Practices
When to Use AI Assistance
- Complex debugging: When a student’s error is difficult to diagnose or spans multiple layers
- Pattern recognition: When multiple students have similar issues
- Time-saving: When you need to draft a detailed, well-structured response quickly
- Learning: When you want to see different approaches to explaining a concept
When to Skip AI Assistance
- Simple questions: Quick answers you can provide immediately
- Policy questions: Course-specific policies that AI won’t know
- Personal situations: Student accommodations or sensitive issues requiring human judgment
Reviewing AI Responses
Always review and verify AI-generated content before sending to students:- Check the evidence: Verify code snippets and line numbers are accurate
- Adjust the tone: Match how long you’ve been helping the student
- Verify against the spec: Ensure the advice aligns with assignment requirements
- Don’t give away solutions: Make sure hints guide without revealing answers
Effective Prompting
The AI assistance feature provides structured prompts, but you can enhance them:- Add context: Mention how long you’ve been helping the student
- Specify tone: Request Socratic questioning or direct hints
- Request specific analysis: Ask for focus on particular aspects
- Iterate: Follow up with additional questions as needed
Troubleshooting
”pawtograder” server not showing in Claude
- Verify your
claude_desktop_config.jsonsyntax is valid - Check that your token hasn’t expired (tokens are valid for 90 days)
- Ensure you replaced
YOUR_TOKEN_HEREwith your actual token - Restart Claude Desktop completely after configuration changes
- Check Claude Desktop logs for connection errors
”Access denied” or “Invalid or expired API token” errors
- Verify you have instructor or grader role in the class
- Check that your API token hasn’t been revoked or expired
- Ensure your API token has the required scopes (
mcp:read) - Create a new token in Settings → API Tokens if needed
AI can’t access 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 requesting data from the correct class ID
Token creation fails
- Verify you have instructor or grader role in at least one class
- Check that your token name is not empty and under 100 characters
- Ensure you’re not exceeding any token limits