Skip to content
MCP server

Mastodon

MCP server that gives Claude and other AI assistants a Mastodon account

Runs locally

Mastodon is an open-source MCP server for social media automation. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Self-hosted
Runs
Locally
What it can do
Can delete data (1 tool)
Version
1.1.1
Listing updated

Similar MCP servers

Install

You install MCP servers on a computer. Send yourself the link.

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

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

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mastodon-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ric_/mastodon-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

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

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

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

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Mastodon

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.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

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_statusName suggests: changes
Post a status with text, media, polls, content warnings, scheduling, replies and quotes.
mastodon_get_timeline_homeName suggests: reads
Home timeline with server-side filters for boosts, replies, quotes and direct posts.
mastodon_searchName suggests: reads
Search accounts, statuses and hashtags.
mastodon_get_notificationsName suggests: reads
List notifications, filtered by type.
mastodon_add_accountName suggests: changes
Start the OAuth flow for an instance.
mastodon_remove_accountName suggests: deletes
Revoke the token and remove an account.

What it does

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

Pricing

Open source

Free and MIT-licensed; self-hosted.

Prices change. Check code.squarecows.com before you buy.

Mastodon 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.

How AIPoweredBot checks servers