ActivityPub MCP Server
The ActivityPub MCP Server acts as a Fediverse client for LLMs, enabling exploration and interaction with decentralized social networks (Mastodon, Misskey, Pleroma, etc.) via the Model Context Protocol — read-only by default, with optional write access.
Public Read Tools (no account needed)
Discover actors — Look up any Fediverse user profile by handle, retrieving bio, follower/following URLs, and inbox/outbox endpoints
Fetch actor timelines — Retrieve posts from any user's public timeline with pagination
Get post threads — Fetch a post and its full conversation (replies and parent posts) up to configurable depth
Search the Fediverse — Unified search for accounts, posts, or hashtags across any instance
Get trending hashtags/posts — See what's currently trending on a given instance
Get public timelines — Browse an instance's local or federated public timeline
Get instance info — Retrieve detailed metadata about any Fediverse instance
Discover instances — Find instances with filters for software type, language, user count, registration status, and more
Authenticated Read Tools (account required)
List and switch between configured accounts
Verify credentials and obtain account information
Get your personalized home timeline
Retrieve notifications (mentions, follows, boosts, favourites)
Access bookmarks and favourited posts
Check relationship status with other accounts (following, blocked, muted, etc.)
Write Tools (opt-in via ACTIVITYPUB_ENABLE_WRITES=true)
Post, reply, and delete statuses
Boost, favourite, and bookmark posts
Follow, mute, and block accounts
Vote in polls, upload media, and schedule posts
Authentication is handled via OAuth/MiAuth with multi-account support and CLI login. An HTTP transport mode with bearer authentication and a health check endpoint is also available.
Enables interaction with the ActivityPub protocol, allowing discovery and interaction with actors and content across the Fediverse.
Provides tools to interact with Mastodon instances, including reading timelines, posting, and managing accounts.
Provides tools to interact with Misskey instances, including reading timelines, posting, and managing accounts.
Provides tools to interact with Pleroma instances, including reading timelines, posting, and managing accounts.
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., "@ActivityPub MCP Servershow trending posts on mastodon.social"
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.
Install
Requires Node.js 20+.
npx -y activitypub-mcpOne-click install:
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):
{
"mcpServers": {
"activitypub": {
"command": "npx",
"args": ["-y", "activitypub-mcp"]
}
}
}Restart Claude Desktop.
Cursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"activitypub": {
"command": "npx",
"args": ["-y", "activitypub-mcp"]
}
}
}Restart Cursor.
Related MCP server: Claude-LMStudio Bridge
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.
{
"mcpServers": {
"activitypub": {
"command": "npx",
"args": ["-y", "activitypub-mcp"],
"env": {
"ACTIVITYPUB_ENABLE_WRITES": "true"
}
}
}
}Authentication
Log in with the CLI:
npx activitypub-mcp login mastodon.socialThis 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.
Example
After adding the server to your MCP client, try:
"Look up @gargron@mastodon.social and summarize their latest posts."
The model will call discover-actor to fetch the profile, then fetch-timeline to read recent posts.
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. 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.
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cameronrye/activitypub-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server