
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.
概览
让助手读取 Fediverse(Mastodon、Misskey、Pleroma 等)内容,并在启用后发布动态。
- 可以做什么
- 通过 ActivityPub 以及 Mastodon/Misskey API 把助手接入 Fediverse。只读工具涵盖账号发现、时间线、帖子串、搜索、实例信息、热门标签与热门帖子,以及需要账号的主页时间线、通知、书签、收藏和关系查询。写入工具默认关闭,启用后可发帖、回复、删除、转发、收藏、加书签、关注、静音、屏蔽、投票、上传媒体和定时发帖。
- 适用场景
- 适合研究或总结公开的 Fediverse 账号与讨论、处理通知、整理话题。只有在需要助手操作你自己控制的账号时,才应启用写入功能。
- 运行要求
- 本地 stdio 进程需要 Node.js 20+ 和 npx。公开只读工具无需账号;需认证的工具要通过 CLI 的 OAuth 或 MiAuth 流程登录,或设置 ACTIVITYPUB_DEFAULT_INSTANCE 与 ACTIVITYPUB_DEFAULT_TOKEN。可选的 HTTP 模式需要 MCP_HTTP_SECRET。需要能访问 Fediverse 实例的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Activitypub Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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+.
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):
Restart Claude Desktop.
Cursor
Edit ~/.cursor/mcp.json:
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.
Authentication
Log in with the CLI:
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):
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版本历史
1- v3.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分