# Mastodon

> Mastodon is an open-source MCP server for social media automation. MCP server that gives Claude and other AI assistants a Mastodon account. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Linux, macOS, Windows
- **Website:** https://code.squarecows.com/ric/mastodon-mcp
- **Repository:** https://github.com/richarvey/mastodon-mcp
- **MCP Registry name:** io.github.richarvey/mastodon-mcp
- **Categories:** [social media automation](https://ai-powered.com/categories/social-media-automation)
- **Listing updated:** 2026-12-04

## About

Connecting this server lets an AI assistant act on Mastodon through the standard client API: reading home, public and hashtag timelines, posting and editing statuses, searching, handling notifications, and managing lists, collections and profile fields. It runs over stdio or streamable HTTP and can hold several accounts on different instances at once, switching between them by handle.

Accounts are linked through Mastodon's own OAuth flow, started from inside the conversation, so no API keys need to be pasted into configuration. Tokens are stored encrypted on the local machine. Each tool is annotated to show whether it only reads or changes data and whether it deletes or overwrites anything, so clients can require approval for destructive actions.

It suits people who already use an MCP client and want to triage a feed, schedule or draft posts, or curate their presence without switching apps. Developers can also review the TypeScript source, which is released under the MIT licence.

## Features

- **Timeline and feed reading:** Reads home, public, hashtag and list timelines, with server-side filters to drop boosts, replies or quotes.
- **Posting and status management:** Creates, edits, deletes and schedules statuses, including media, polls, content warnings and quotes.
- **Multiple account support:** Holds several Mastodon accounts across different instances and selects one per call by handle.
- **OAuth account linking:** Adds accounts through the instance's own authorisation page, without manual API key handling.
- **Notifications and search:** Lists, groups and dismisses notifications and searches accounts, statuses and hashtags.
- **Profile and relationship tools:** Updates profile fields and avatar, manages follows, mutes, blocks and curated collections.

## Good for

- Summarising the overnight home timeline without boosts or replies
- Drafting and scheduling announcements for a Mastodon account
- Grouping mentions and notifications to find what needs a reply
- Building lists or collections of accounts on a topic
- Tidying a profile, featured hashtags and bio from a chat window

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mastodon-mcp -- npx -y @ric_/mastodon-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mastodon-mcp -- npx -y @ric_/mastodon-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mastodon-mcp]
command = "npx"
args = ["-y", "@ric_/mastodon-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mastodon-mcp npx -- -y @ric_/mastodon-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools deletes data and 2 change data. From the server's own tool labels and tool names; not verified by us.

- `mastodon_create_status` (name suggests: changes): Post a status with text, media, polls, content warnings, scheduling, replies and quotes.
- `mastodon_get_timeline_home` (name suggests: reads): Home timeline with server-side filters for boosts, replies, quotes and direct posts.
- `mastodon_search` (name suggests: reads): Search accounts, statuses and hashtags.
- `mastodon_get_notifications` (name suggests: reads): List notifications, filtered by type.
- `mastodon_add_account` (name suggests: changes): Start the OAuth flow for an instance.
- `mastodon_remove_account` (name suggests: deletes): Revoke the token and remove an account.

## FAQ

### Which Mastodon versions does it support?

It targets the Mastodon 5.0.0 API and remains usable on older 4.x instances, where newer tools return the instance's own error.

### Do I need to paste API keys?

No. Accounts are added through Mastodon's OAuth flow, started from inside the conversation.

### Can Mastodon work with several accounts?

Yes. With more than one account configured, calls must name the account in username@instance form, so the assistant asks rather than guesses.

### What does Mastodon require to run?

Node.js 22.12 or newer. It can be started with npx from the npm package @ric_/mastodon-mcp.

### Is Mastodon free?

Yes. Mastodon is open source, so you can use and self-host it for free.

### How do I add Mastodon to Claude Code?

Run this command in your terminal: claude mcp add mastodon-mcp -- npx -y @ric_/mastodon-mcp

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Rostido](https://ai-powered.com/mcp/rostido): Rostido is a freemium MCP server for social media automation.

---
Source: https://ai-powered.com/mcp/mastodon-2
