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 分