# activitypub-mcp

Connect LLMs to the Fediverse. It lets assistants inspect Mastodon, Misskey, and ActivityPub actors in read-only mode or publish posts.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 17
- Author: cameronrye
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cameronrye/activitypub-mcp
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/mcp/activitypub-mcp

## What it does

The server bridges language models with federated social platforms. By default, it operates in read-only mode. The model can inspect actors, fetch outboxes, and review trending topics without risking unwanted mutations from untrusted posts.

Actor lookups rely on standard ActivityPub endpoints, so instances like Lemmy or PeerTube work immediately. Search tools and trending lists require Mastodon or Misskey REST APIs. Mutations stay blocked until you set `ACTIVITYPUB_ENABLE_WRITES=true`.

The package requires Node.js 20 or higher. Running authentication stores credentials locally in `~/.config/activitypub-mcp/accounts.json`, supporting OAuth and MiAuth flows.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ACTIVITYPUB_ENABLE_WRITES`, `LOG_LEVEL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ACTIVITYPUB_ENABLE_WRITES=<ACTIVITYPUB_ENABLE_WRITES> --env LOG_LEVEL=<LOG_LEVEL> --transport stdio activitypub-mcp -- npx -y activitypub-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add activitypub-mcp --env ACTIVITYPUB_ENABLE_WRITES=<ACTIVITYPUB_ENABLE_WRITES> --env LOG_LEVEL=<LOG_LEVEL> -- npx -y activitypub-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "activitypub-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "activitypub-mcp"
            ],
            "env": {
                "ACTIVITYPUB_ENABLE_WRITES": "<ACTIVITYPUB_ENABLE_WRITES>",
                "LOG_LEVEL": "<LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "activitypub-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "activitypub-mcp"
            ],
            "env": {
                "ACTIVITYPUB_ENABLE_WRITES": "<ACTIVITYPUB_ENABLE_WRITES>",
                "LOG_LEVEL": "<LOG_LEVEL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ACTIVITYPUB_ENABLE_WRITES=<ACTIVITYPUB_ENABLE_WRITES> -e LOG_LEVEL=<LOG_LEVEL> activitypub-mcp npx -y activitypub-mcp
```
Replace <…> with your own values

## When to use it
- Inspect profiles and retrieve outbox posts across ActivityPub servers
- Check trending hashtags and public posts on Mastodon or Misskey
- Publish notes, replies, and reactions after enabling write tools
- Manage notifications and bookmarks directly from the model session

## Example prompts
- Show trending posts and hashtags from mastodon.social.
- Fetch recent notifications for my authenticated account.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
