Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Piazza MCP ServerShow me the last 5 posts from CSE 12"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Piazza MCP Server
An MCP (Model Context Protocol) server that allows Claude Code to interact with Piazza, enabling you to fetch posts and course information directly from your terminal.
Prerequisites
Python 3.10+
A Piazza account
Claude Code CLI
Installation
Clone or download this repository
Create a virtual environment and install dependencies:
python -m venv env # Windows env\Scripts\activate # macOS/Linux source env/bin/activate pip install -r requirements.txt
Configuration
Getting Your Course IDs
To find a course ID:
Log in to Piazza in your browser
Navigate to the course you want to add
Look at the URL - it will look like:
https://piazza.com/class/abc123xyzThe course ID is the part after
/class/(e.g.,abc123xyz)
Setting Up Claude Code
Create or edit the .mcp.json file in your project directory:
Windows example:
macOS/Linux example:
Environment Variables
Variable | Description |
| Your Piazza account email |
| Your Piazza account password |
| JSON object mapping course IDs to course names |
Available Tools
Once configured, Claude Code will have access to these tools:
list_courses
Returns the list of configured courses.
Example usage in Claude Code:
fetch_posts
Fetches recent posts from a specified course.
Parameters:
course_id(required): The Piazza course IDn(optional): Number of posts to fetch (default: 10)
Example usage in Claude Code:
Usage Examples
After configuration, simply start Claude Code in a directory with the .mcp.json file:
Then you can ask natural language questions like:
"What are my Piazza courses?"
"Show me the last 3 posts on ECON 1"
"Are there any new questions about the midterm in CSE 12?"
"What's the latest instructor answer on PHYS 2A?"