Mcp Piazza

io.github.jadenpxrk由 GitHub 账号 jadenpxrk 发布v0.1.0更新于 Oct 24, 2026

Read-only Piazza access: activity, search, unread posts, full threads, and course info

已验证STDIO仅桌面知识与记忆沟通与协作

概览

AI 生成的概览

一个只读的 Piazza MCP 服务器,让助手浏览课程、搜索帖子、阅读完整讨论串并汇总动态。

可以做什么
列出课程并读取课程信息、答疑时间、教职人员和统计页面,同时提供各课程未读数和指定时间以来的最新动态。按未读、未解决、未回答、我的、星标等筛选条件列出和搜索帖子摘要,并阅读完整讨论串,包括回答、追问、回复、投票和版本历史。打开帖子附带的图片和文件,列出教师笔记和投票。使用内置提示和技能来补看某段时间的内容、确认问题是否已被回答,或为考试复习收集事实。
适用场景
适合关注 Piazza 讨论的学生和课程工作人员,希望助手汇总错过的内容、在提问前查找已有答案,或收集关于某场考试或主题的帖子。
运行要求
通过 uvx 作为本地 Python 包运行。需要 Piazza 账号并完成一次登录,可通过浏览器登录页、已有浏览器会话、密码或粘贴会话 cookie 完成;PIAZZA_EMAIL 和 PIAZZA_PASSWORD 可启用自动登录。会话 cookie 保存在本地文件,路径可用 PIAZZA_COOKIE_FILE 设置。需要访问 piazza.com 的网络连接。
安装前请注意
服务器以你的身份登录并在磁盘上保存会话 cookie,请保护好该文件。PIAZZA_PASSWORD 是真实的账号凭据;若不希望它出现在环境变量中,优先使用浏览器登录。除非启用 PIAZZA_KEEP_UNREAD,阅读完整帖子会在 Piazza 上标记为已读并计入浏览。帖子内容由其他课程成员撰写,请保持不可信文本围栏开启,并考虑启用 PIAZZA_ANONYMIZE_STUDENTS。Piazza 的内部接口可能变化并导致工具失效。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Piazza,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-piazza

[CI] [PyPI] [Python] [OpenSSF Scorecard] [License: MIT]

A read-only Model Context Protocol server for Piazza. It works with every MCP client: Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed, Cline, Codex, Gemini CLI, Goose, opencode, JetBrains, LM Studio, Continue, and others.

Ask your assistant about your courses:

  • "What did I miss on Piazza this week?"
  • "Are there unresolved questions about HW3 in CSE 12?"
  • "Did anyone already ask about the midterm room?"
  • "When are the TA office hours?"
  • "What did the instructor change in @142?"

The server only reads data. It cannot post, edit, endorse, or delete.

Quick start

  1. Install uv.

  2. Log in one time. The command opens a login page in your browser:

    bash
    uvx mcp-piazza login

    You can also skip this step. If the server has no session, the first tool call opens the same page and shows its link.

  3. Add the server to your client. The server command is uvx with the argument mcp-piazza. For example:

    bash
    claude mcp add --scope user --transport stdio piazza -- uvx mcp-piazza   # Claude Codecodex mcp add piazza -- uvx mcp-piazza                                   # Codex CLI

    See docs/clients.md for Claude Desktop, Cursor, VS Code, Windsurf, Zed, Gemini CLI, and other clients.

  4. Ask: "List my Piazza courses."

Tools, prompts and resources

ToolPurpose
list_coursesList your courses with ID, course number, term, role, active status, and folders.
get_course_infoGet the course page: description, syllabus, office hours, general information, and staff with emails.
get_unread_countsCount unread posts in each active course.
recent_activityList posts with new activity since a time (24h, 7d, 2026-10-01), in all active courses or one course.
list_postsList post summaries. Filters: all, unread, following, unresolved, unanswered, mine, starred. Optional folder and paging.
search_postsSearch posts by keywords in one course or in all active courses.
get_postRead one full thread: question, instructor answer, student answer, followups, replies, and poll data.
get_postsRead up to 20 full threads in one call.
get_post_historyShow every version of a post, with a diff between versions.
list_instructor_notesList notes and polls written by instructors.
get_attachmentOpen an image or file from a post. The model can see images.
get_course_statsGet the data from the course Statistics page.

Every tool accepts a course ID, a course number such as CSE 12 or cse12, or part of the course name.

PromptPurpose
catch_upRead all posts since a time and summarize them, with actions for you.
before_askingFind out if a question was already asked and answered.
exam_prepRead all posts about an exam or topic and collect the facts.

Many clients show prompts as slash commands.

SkillPurpose
piazza-catch-upThe catch_up steps, for agents that use skills.
piazza-exam-prepThe exam_prep steps.
piazza-before-askingThe before_asking steps.

Skills work in Claude Code, Cursor, Codex, opencode, and other agents. They need the server. To install them:

bash
npx skills add jadenpxrk/mcp-piazza
ResourceContent
piazza://coursesYour courses
piazza://courses/{course_id}/posts/{number}One full thread

See docs/tools.md for parameters and output fields, and docs/workflows.md for examples.

Authentication

Piazza has no public API. This server uses piazza-api, which logs in as the Piazza website does.

MethodHowUse it when
Login pagemcp-piazza login, or the link from the first tool callMost people. The page offers the three methods below.
Browser sessionmcp-piazza login --browserYou are logged in to piazza.com in Chrome, Arc, Brave, Edge, Firefox, Safari, Chromium, Vivaldi, or Opera. This works with school SSO.
Passwordmcp-piazza login --passwordYou want to type your email and password in the terminal.
Session cookiemcp-piazza login --cookieYou want to paste the session_id cookie from the browser developer tools.
Environment variablesPIAZZA_EMAIL, PIAZZA_PASSWORDYou want automatic login when the session expires.

All methods save only the session cookies to ~/.config/mcp-piazza/cookies.json with file mode 600. They do not save your password. When the session expires, the next tool call opens the login page again. mcp-piazza logout deletes the session.

Configuration

VariableDefaultPurpose
PIAZZA_EMAILnoneAccount email for automatic login.
PIAZZA_PASSWORDnoneAccount password for automatic login.
PIAZZA_COOKIE_FILE~/.config/mcp-piazza/cookies.jsonPath of the saved session.
PIAZZA_ANONYMIZE_STUDENTSfalseReplace student names with pseudonyms.
PIAZZA_FENCE_CONTENTtrueMark post text as untrusted data.
PIAZZA_KEEP_UNREADfalseMark unread posts unread again after the server reads them.
PIAZZA_MIN_INTERVAL0.5Minimum seconds between Piazza requests.
PIAZZA_CACHE_TTL60Seconds to keep feeds and posts in memory. 0 turns off the cache.

See docs/configuration.md for examples and the command line.

Privacy and safety

  • Read-only. The server has no tools that change Piazza data. The only write is the optional PIAZZA_KEEP_UNREAD restore.
  • Prompt-injection fencing. Other course members write the post text. The server puts that text between <<<UNTRUSTED PIAZZA TEXT ...>>> markers, and the server instructions tell the model to treat it as data.
  • Student pseudonyms. When PIAZZA_ANONYMIZE_STUDENTS=true, other students show as Student 3f2a1c. Staff keep their names. Your own posts show as you.
  • Local only. The server runs on your computer. It sends your cookies only to piazza.com.

See docs/privacy.md for the full model and its limits.

Development

bash
uv syncuv run pytest               # offline tests, no Piazza account neededuv run ruff check src testsuv run ruff format src testsuv run mypy src

See AGENTS.md for the project layout and rules.

Limitations

  • Piazza can change its internal API at any time. If tools fail after a Piazza update, see docs/troubleshooting.md.
  • When the server reads a full post, Piazza marks the post as read and counts a view, as the website does. Set PIAZZA_KEEP_UNREAD=true to mark unread posts unread again.
  • The course page files and links (the Resources tab) are not available. get_course_info shows the names of the resource sections only.
  • Piazza does not document the poll format. get_post returns the poll data as Piazza sends it.
  • Some instructors hide the Statistics page. For those courses, get_course_stats returns an error.

License

MIT. This project is not affiliated with Piazza.

来源:README.md,提交 42303db

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分