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 "Deploy 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 Server show 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.
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 @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.
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):
export MCP_HTTP_SECRET=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
docker compose up --build # then: curl http://localhost:8080/healthSee 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.
Available Tools
18 toolsdiscover-actorDiscover Fediverse ActorARead-only
Find and retrieve the profile of any fediverse user or account (called an 'actor' in ActivityPub). Returns display name, bio, follower/following URLs, and inbox/outbox endpoints. Pass a handle like '@alice@mastodon.social' or 'alice@mastodon.social'.
Inputs: identifier (required). Returns: actor
discover-instancesDiscover Fediverse InstancesARead-only
Discover fediverse instances in real-time using the instances.social API with advanced filtering
Inputs: software, language, minUsers, maxUsers, +4 more. Returns: instances, hasMore
fetch-timelineFetch Actor TimelineARead-only
Fetch recent posts (the outbox) from any fediverse actor — a user or account — with cursor- and ID-based pagination. Pass a handle like 'alice@mastodon.social'.
Inputs: identifier (required), limit, cursor, minId, +2 more. Returns: posts, nextCursor, hasMore, source
get-bookmarksGet BookmarksBRead-only
Get your bookmarked posts
Inputs: limit, accountId. Returns: posts, nextCursor, hasMore, source
get-favouritesGet FavouritesARead-only
Get posts you have favourited
Inputs: limit, accountId. Returns: posts, nextCursor, hasMore, source
get-home-timelineGet Home TimelineARead-only
Get your personalized home timeline (posts from accounts you follow)
Inputs: limit, maxId, sinceId, accountId. Returns: posts, nextCursor, hasMore, source
get-instance-infoGet Instance InformationARead-only
Get detailed information about a fediverse instance: software and version, description, registration policy, supported languages, user/post/domain counts, and contact account.
Inputs: domain (required). Returns: domain, title, description, version, +3 more
get-notificationsGet NotificationsCRead-only
Get your notifications (mentions, follows, boosts, favourites)
Inputs: limit, types, accountId. Returns: notifications
get-post-threadGet Post ThreadARead-only
Fetch a post and its full conversation thread including replies and parent posts
Inputs: postUrl (required), depth, maxReplies. Returns: ancestors, post, replies
get-public-timelineGet Public TimelineARead-only
Fetch an instance's public timeline. scope 'federated' (default) shows posts the instance has seen from across the fediverse; 'local' shows only posts authored on that instance.
Inputs: domain (required), scope, limit, maxId. Returns: posts, nextCursor, hasMore, source
get-relationshipGet RelationshipARead-only
Check your relationship status with another account (following, followed by, blocking, muting, etc.). Pass a single acct like 'username@instance'. To check multiple accounts, call this tool once per account.
Inputs: acct (required), accountId, accountIds. Returns: acct, following, followedBy, blocking, +2 more
get-scheduled-postsGet Scheduled PostsARead-only
List your scheduled posts that haven't been published yet
Inputs: limit, accountId. Returns: scheduledPosts
get-trending-hashtagsGet Trending HashtagsARead-only
Get currently trending hashtags on a fediverse instance (Mastodon-compatible instances that expose a trends API).
Inputs: domain (required), limit. Returns: hashtags
get-trending-postsGet Trending PostsARead-only
Get currently trending posts on a fediverse instance (Mastodon-compatible instances that expose a trends API).
Inputs: domain (required), limit. Returns: posts, nextCursor, hasMore, source
list-accountsList Configured AccountsARead-only
List all configured authenticated accounts for write operations
Inputs: no named parameters. Returns: accounts, writeEnabled, activeAccountId
searchSearch FediverseARead-only
Unified search across the fediverse - find accounts, posts, or hashtags on any instance
Inputs: query (required), domain, type, limit. Returns: accounts, statuses, hashtags
switch-accountSwitch Active AccountA
Switch the active account used for write operations
Inputs: accountId (required). Returns: accountId, username, instance, active, +1 more
verify-accountVerify Account CredentialsBRead-only
Verify that the account credentials are valid and get account information
Inputs: accountId. Returns: accountId, username, instance, active, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools are clearly scoped by resource type such as actor, instance, timeline, or account, and timeline tools are distinguished by source (actor outbox, instance public, home). A few potential overlaps exist, such as discover-actor vs. search and discover-instances vs. get-instance-info, but the descriptions provide enough context for an agent to choose correctly.
Tool names follow a consistent lowercase hyphenated verb-noun pattern like discover-actor, fetch-timeline, and get-notifications. The main deviation is the bare verb 'search', and the mix of get/fetch/discover/list verbs is mild rather than chaotic.
At 18 tools, the server sits in the heavy range for a typical MCP server. While most tools have distinct uses, several read-only endpoints such as trending hashtags vs. trending posts and bookmarks vs. favourites could potentially be consolidated without losing clarity.
The server covers a broad read surface—profiles, timelines, threads, trends, notifications, and relationships—but lacks any mutation tools for core ActivityPub interactions like posting, replying, boosting, favouriting, or following. This is a significant gap, especially since list-accounts and switch-account are explicitly described as being for write operations yet no write operation exists.
Maintenance
Related MCP Connectors
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MCP server for live public-data APIs and Skills for AI agents.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools for interacting with Mastodon, enabling users to create toots with customizable visibility and attach media files with descriptions.48MIT
- FlicenseNot gradedqualityFmaintenanceAn MCP server that allows Claude to interact with local LLMs running in LM Studio, providing access to list models, generate text, and use chat completions through local models.13-
- FlicenseNot gradedqualityDmaintenanceA customizable Model Context Protocol server built with mcp-framework that enables Claude to access external tools and capabilities through a standardized interface.55 npm-
- AlicenseBqualityDmaintenanceA personal MCP server for AI assistant integration that provides custom tools, resources, and prompts for use with Claude Desktop and other MCP-compatible clients.2MIT