Activitypub Mcp

io.github.cameronrye由 GitHub 帳號 cameronrye 發布v3.2.1更新於 Oct 24, 2026

Read-only-by-default MCP server: let LLMs explore the Fediverse — Mastodon, Misskey, Pleroma.

概覽

AI 產生的概覽

讓助理瀏覽 Fediverse(Mastodon、Misskey、Pleroma 等)帳號內容,並在開啟寫入後與之互動的 MCP 伺服器。

可以做什麼
  • 透過標準 ActivityPub 探索帳號並讀取其時間軸
  • 取得貼文串、站點資訊、公開時間軸與熱門標籤或熱門貼文
  • 透過 Mastodon 或 Misskey API 搜尋站點與內容
  • 登入後讀取帳號資料:首頁時間軸、通知、書籤、收藏、關係
  • 在多個帳號之間切換
  • 開啟寫入後可發文、回覆、刪除、轉嘟、收藏、追蹤、靜音、封鎖、投票、上傳媒體與排程貼文
適用情境
適合讓助理研究或摘要 Fediverse 上的帳號與討論串、整理通知與書籤,或在 Mastodon、Misskey 系列帳號上策劃與發布內容。
執行需求
以 npx 啟動的本機程序,需要 Node.js 20 以上版本。公開讀取工具不需帳號;需登入的工具要先透過命令列登入,在瀏覽器中完成 OAuth 或 MiAuth,憑證會存到本機帳號檔案,也可改用預設站點與權杖環境變數。寫入工具需將 ACTIVITYPUB_ENABLE_WRITES 設為 true。需要能連線到目標站點的網路。
安裝前請注意
寫入預設關閉;開啟後會註冊發文、回覆、刪除、追蹤、靜音、封鎖與上傳媒體等工具,啟用前應先閱讀威脅模型。Fediverse 上的貼文、簡介與通知屬於不可信內容,可能夾帶提示注入,通知更是任何人都能觸及的管道。登入憑證會存到本機帳號檔案。可選的 HTTP 模式需以至少 16 個字元的密鑰保護。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Activitypub Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[ActivityPub MCP Logo]

ActivityPub MCP Server

Fediverse Client for LLMs

A lightweight Model Context Protocol (MCP) server that lets an LLM explore and interact with the existing Fediverse — Mastodon, Misskey, Foundkey, Pleroma, and compatible servers. Read-only by default; write tools are opt-in.

[npm version] [License: MIT] [TypeScript] [Node.js] [MCP Compatible]

[CI] [npm downloads] [GitHub stars]

[Glama quality and maintenance score] [Smithery]


Install

Requires Node.js 20+.

bash
npx -y activitypub-mcp

One-click install:

[Add to Cursor] [Install in VS Code]

Claude Desktop

One-click: download the .mcpb bundle (activitypub-mcp-<version>.mcpb) from the latest release and open it in Claude Desktop.

Manual: edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "activitypub": {      "command": "npx",      "args": ["-y", "activitypub-mcp"]    }  }}

Restart Claude Desktop.

Cursor

Edit ~/.cursor/mcp.json:

json
{  "mcpServers": {    "activitypub": {      "command": "npx",      "args": ["-y", "activitypub-mcp"]    }  }}

Restart Cursor.


Read-only by default

Out of the box, only read tools are registered: discover actors, fetch timelines, search, get threads, explore instances, read trending content. No write tools exist in the MCP session, so injected fediverse content cannot trigger account actions.

Public read tools (no account needed): discover-actor, fetch-timeline, get-post-thread, get-instance-info, get-public-timeline, get-trending-hashtags, get-trending-posts, search, discover-instances.

Authenticated read tools (account required): list-accounts, switch-account, verify-account, get-home-timeline, get-notifications, get-bookmarks, get-favourites, get-relationship.

Enabling writes

Set ACTIVITYPUB_ENABLE_WRITES=true in the environment or MCP config env block. This registers the full set of mutation tools: post, reply, delete, boost, favourite, bookmark, follow, mute, block, vote, upload media, and scheduled posts. Read the threat model before enabling.

json
{  "mcpServers": {    "activitypub": {      "command": "npx",      "args": ["-y", "activitypub-mcp"],      "env": {        "ACTIVITYPUB_ENABLE_WRITES": "true"      }    }  }}

Authentication

Log in with the CLI:

bash
npx activitypub-mcp login mastodon.social

This runs OAuth (Mastodon-family) or MiAuth (Misskey) in your browser and saves credentials to ~/.config/activitypub-mcp/accounts.json. Multi-account is supported — use switch-account to change the active account.

Alternatively, set ACTIVITYPUB_DEFAULT_INSTANCE and ACTIVITYPUB_DEFAULT_TOKEN env vars for a single account without the CLI flow.


Platform support

discover-actor and fetch-timeline speak plain ActivityPub (WebFinger → actor → outbox), so they read any conformant ActivityPub server — Mastodon, Misskey, Foundkey, Pleroma/Akkoma, Lemmy (communities and users), PeerTube (channels and accounts), GoToSocial, and Pixelfed.

The instance-API read tools (search, get-trending-hashtags, get-trending-posts, get-public-timeline) and every write tool require a Mastodon- or Misskey-API instance, since they call those platforms' REST APIs. Login uses OAuth (Mastodon-family) or MiAuth (Misskey).


Example

After adding the server to your MCP client, try:

"Look up @[email protected] and summarize their latest posts."

The model will call discover-actor to fetch the profile, then fetch-timeline to read recent posts.

See examples/ for copy-pasteable recipes — Fediverse research digests, scheduled threads, notification triage, image posts with alt text, and topic curation.


HTTP transport

In addition to stdio (default), the server supports HTTP mode with a bearer-gated /mcp endpoint and /health liveness check. Set MCP_HTTP_SECRET (min 16 chars) to enable.

To self-host it as a service, the repo includes a Dockerfile and a docker-compose.yml (HTTP mode):

bash
export MCP_HTTP_SECRET=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")docker compose up --build   # then: curl http://localhost:8080/health

See the docs for full configuration.


Security

This server fetches world-writable fediverse content — posts, bios, notifications — and feeds it to the LLM. That content can contain prompt-injection payloads. Notifications are an unsolicited channel: anyone can mention your account. The <untrusted-content> envelope and read-only default reduce the risk surface, but do not eliminate it.

See SECURITY.md for the full threat model, SSRF protections, credential handling, and reporting instructions.


Documentation

The full tool reference, resource list, prompt catalog, environment variable guide, and deployment notes live on the docs site:

cameronrye.github.io/activitypub-mcp/docs/


License

MIT — see LICENSE.

Acknowledgments

Built on the Model Context Protocol by Anthropic, and interacts with the decentralized social web as specified by ActivityPub (W3C) and ActivityStreams.

來源:README.md,提交 9cfa906

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v3.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分