ActivityPub MCP Server for LLMs Fediverse Exploration
Explore the Fediverse with an MCP server enabling LLMs to discover actors, fetch timelines, resolve WebFinger, and browse instances via ActivityPub.
npx -y @cameronrye/activitypub-mcpOverview
This project implements an MCP (Model Context Protocol) server that exposes ActivityPub-focused discovery and browsing capabilities for LLMs and other agentic systems. It lets a model discover actors and instances on the Fediverse, resolve WebFinger addresses, and fetch timelines (outbox/collections) so a language model can retrieve real-time social context without embedding a full ActivityPub client.
By offering a lightweight HTTP API that maps common ActivityPub operations to MCP-style tool calls, the server makes it straightforward to plug fediverse exploration into an LLM toolchain. Typical uses include automated research, summarization of public timelines, moderation context lookup, and building downstream assistants that need to reason about social content or network topology.
Features
- Resolve WebFinger addresses (user@instance) to ActivityPub actor URLs
- Discover actor metadata (profile, inbox/outbox) and follow relationships
- Fetch timelines / collections (public timelines, actor outboxes, ordered collections)
- Browse or enumerate instances and their public actor lists
- HTTP API suitable for embedding as an MCP tool in LLM agents
- Configurable caching and timeouts to limit external requests
- Simple JSON responses designed for easy consumption by LLMs
Installation / Configuration
Basic quickstart (uses the repository on GitHub):
# Clone the repo
# Install dependencies (Node.js example)
# Copy and edit .env
# Edit .env to set PORT, CACHE_TTL, etc.
# Start the server
Example .env (recommended values):
PORT=3000
LOG_LEVEL=info
CACHE_TTL_SECONDS=300
HTTP_TIMEOUT_MS=10000
USER_AGENT="mcp-server/1.0 (+https://github.com/cameronrye/activitypub-mcp)"
If the project uses a different runtime (Python, Rust), substitute the appropriate package manager and start command (pip install -r requirements.txt / cargo run). See the repository README for runtime-specific notes.
Available Resources
The server exposes a small set of HTTP endpoints that map to useful ActivityPub operations for LLMs. Typical endpoints (path names may vary — check the repo for exact routes):
| Endpoint | Method | Purpose |
|---|---|---|
| /mcp/webfinger | POST | Resolve a WebFinger address to an actor URL |
| /mcp/actor | POST | Fetch actor metadata by URL |
| /mcp/timeline | POST | Fetch a timeline (outbox, collection, public timeline) |
| /mcp/instances | GET | Browse known instances and basic stats |
Example: resolve WebFinger with curl
Sample response (abbreviated):
Fetch an actor’s outbox:
Use Cases
- LLM-informed summarization: An agent can call /mcp/timeline to retrieve the latest posts from an actor’s outbox, then generate concise summaries or digests for a user.
- Context-aware moderation: Given a reported actor or post URL, an assistant can resolve the actor via /mcp/webfinger and fetch recent activity to determine pattern-of-behavior context.
- Research and trend analysis: Aggregate /mcp/instances and timeline data across instances to identify cross-instance trends, hashtags, or conversation propagation.
- Conversational assistants: Use the MCP server as a tool in an LLM agent so it can “look up” people and posts on the Fediverse during a multi-step reasoning chain, without needing to implement ActivityPub logic inside the model.
- Discovery tooling: Build indexers or crawlers that programmatically discover actors and instance information using the server’s discovery endpoints and configured caching to minimize remote requests.
Notes for Developers
- The server is intended as a bridge between LLM tool frameworks and the wider Fediverse; it favors predictable JSON outputs over full-fidelity ActivityPub objects.
- Respect remote instance rate limits and robots policies; configure reasonable timeouts and cache TTLs in .env.
- Extend the server by adding endpoint handlers that enrich responses (e.g., attach derived sentiment, media metadata) to better suit downstream LLM prompts.
Repository and source code: https://github.com/cameronrye/activitypub-mcp