mastodon-mcp-server
A comprehensive MCP (Model Context Protocol) gateway enabling AI assistants to interact with Mastodon instances, supporting both read and write operations across all major API areas:
Instance Information: Retrieve instance metadata (name, description, version, rules).
Account Management: View/update your own profile, look up and search accounts, browse followers/following, follow/unfollow, block/unblock, mute/unmute, and check relationships.
Timelines: Read home, local, public, and hashtag timelines.
Statuses: Fetch statuses and thread context; post new statuses (with content warnings, visibility, media, polls, and reply threading); delete, favourite/unfavourite, reblog/unreblog, bookmark/unbookmark; see who favourited or reblogged.
Notifications: List (with filtering), dismiss individual, or clear all notifications.
Search & Discovery: Search accounts, statuses, and hashtags; view trending tags, statuses, and links; browse the profile directory.
Collections: View your favourited statuses, bookmarked statuses, muted accounts, and blocked accounts.
Lists: Create/delete lists, view/add/remove list members.
Polls: Vote in active polls.
Follow Requests: View, approve, or reject pending follow requests.
Media: Upload image, video, or audio attachments with alt text.
Read-Only Mode: Optionally disable all write operations for safe browsing.
Provides tools for interacting with Mastodon instances, enabling AI assistants to read timelines, post and manage statuses, follow/unfollow accounts, search, and handle notifications, lists, polls, and media.
Click on "Install 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., "@mastodon-mcp-servershow me my home timeline"
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.
mastodon-mcp-server
A comprehensive MCP (Model Context Protocol) server for Mastodon integration. Enables AI assistants and other MCP clients to interact with Mastodon instances — read timelines, post statuses, manage accounts, search, and more.
Features
Timelines: home, local, public, hashtag
Statuses: post, delete, favourite, reblog, bookmark
Accounts: follow, unfollow, block, mute, relationships, profile update
Notifications: read, dismiss individual or all
Search: accounts, statuses, hashtags
Trending: tags, statuses, links
Lists: create, delete, manage members
Media: upload attachments
Polls: vote
Read-only mode: safe browsing without write access
STDIO and HTTP transports: works with any MCP-compatible client
Related MCP server: groupme-mcp
Installation
Debian 13+ / Ubuntu 24+
apt install mastodon-mcp-serverpip
pip install mastodon-mcp-serverFrom source
git clone https://github.com/VitexSoftware/mastodon-mcp-server.git
cd mastodon-mcp-server
pip install -e .Configuration
Copy .env.example to .env and fill in your credentials:
cp .env.example .envVariable | Required | Default | Description |
| yes | — | Mastodon instance URL (e.g. |
| yes | — | OAuth access token |
| no |
| Disable all write operations |
| no |
| Transport: |
| no |
| HTTP transport bind address |
| no |
| HTTP transport port |
| no |
| Disable HTTP session state |
| no |
| Enable verbose logging |
Getting an Access Token
Go to your Mastodon instance → Preferences → Development → New application
Grant required scopes:
read,write,followCopy the Your access token value
Client Setup
Claude Code (CLI)
claude mcp add --scope user mastodon /usr/bin/mastodon-mcp \
-e MASTODON_INSTANCE=mastodon.social \
-e MASTODON_ACCESS_TOKEN=your-token-hereClaude Desktop
~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"mastodon": {
"command": "mastodon-mcp",
"env": {
"MASTODON_INSTANCE": "https://mastodon.social",
"MASTODON_ACCESS_TOKEN": "your-token-here"
}
}
}
}Warp Terminal
~/.warp/mcp_config.json:
{
"mcpServers": {
"mastodon": {
"command": "/usr/bin/mastodon-mcp",
"args": [],
"env": {
"MASTODON_INSTANCE": "https://mastodon.social",
"MASTODON_ACCESS_TOKEN": "your-token-here"
}
}
}
}VSCode (GitHub Copilot / Continue)
~/.config/Code/User/mcp.json:
{
"servers": {
"MastodonMCP": {
"type": "stdio",
"command": "/usr/bin/mastodon-mcp",
"args": [],
"env": {
"MASTODON_INSTANCE": "https://mastodon.social",
"MASTODON_ACCESS_TOKEN": "your-token-here"
}
}
}
}HTTP transport (any MCP client)
MASTODON_MCP_TRANSPORT=streamable-http mastodon-mcpUsage
usage: mastodon-mcp [-h] [--version]
Model Context Protocol server for Mastodon integration.
options:
-h, --help show this help message and exit
--version show program's version number and exit
Environment variables:
MASTODON_INSTANCE Mastodon instance URL (required)
MASTODON_ACCESS_TOKEN OAuth access token (required)
MASTODON_MCP_TRANSPORT Transport mode: stdio (default) or streamable-http
MASTODON_MCP_HOST HTTP bind address (default: 127.0.0.1)
MASTODON_MCP_PORT HTTP port (default: 8000)
MASTODON_MCP_STATELESS_HTTP Disable HTTP session state (default: false)
READ_ONLY Restrict to read-only operations (default: false)
DEBUG Enable verbose logging (default: false)Available Tools
Instance
Tool | Description |
| Instance name, description, version, rules |
Accounts
Tool | Description |
| Own profile |
| Account by numeric ID |
| Search accounts by username or display name |
| Posts by an account |
| Social graph |
| Follow management |
| Block management |
| Mute management |
| Relationship to one or more accounts |
| Update own display name, bio, locked status |
Timelines
Tool | Description |
| Home timeline (followed accounts) |
| Local instance public timeline |
| Federated public timeline |
| Statuses with a specific hashtag |
Statuses
Tool | Description |
| Single status by ID |
| Thread ancestors and descendants |
| Post a new status (supports CW, visibility, media, polls) |
| Delete own status |
| Favourite management |
| Boost management |
| Bookmark management |
| Who engaged with a status |
Notifications
Tool | Description |
| List notifications (filterable by type) |
| Dismiss a single notification |
| Clear all notifications |
Search & Discovery
Tool | Description |
| Search accounts, statuses, and hashtags |
| Trending hashtags |
| Trending statuses |
| Trending links/articles |
| Browse the instance profile directory |
Collections
Tool | Description |
| Own favourited statuses |
| Own bookmarked statuses |
| Muted accounts |
| Blocked accounts |
Lists
Tool | Description |
| All lists |
| Accounts in a list |
| Create/delete lists |
| Add/remove list members |
Polls
Tool | Description |
| Vote in a poll |
Follow Requests
Tool | Description |
| Pending follow requests |
| Accept/reject requests |
Media
Tool | Description |
| Upload image/video/audio attachment |
Future Tools (Mastodon.py ≥ 2.x / Mastodon server ≥ 3.5)
The following tools are implemented but commented out in server.py. Uncomment them when your distribution ships python3-mastodon >= 2.0.1 (already available on Debian 13/trixie):
Tool | Requirement |
| Edit a status (server 3.5+) |
| Edit history (server 3.5+) |
| Plain-text source for editing |
| Translate a status (server 4.0+) |
| Direct-message conversations |
| List scheduled posts |
| Reschedule a post |
| Cancel a scheduled post |
| Unread notification count |
Testing
# Offline (tool registration + helper functions + version check)
python3 scripts/test_server.py
# With live instance
MASTODON_INSTANCE=mastodon.social \
MASTODON_ACCESS_TOKEN=your-token \
python3 scripts/test_server.pyArchitecture
The server uses a bundled stdlib-only MCP implementation (mastodon_mcp_server/_mcp.py) so it has no dependency on python3-fastmcp or its deep dependency chain. This makes packaging for Debian/Ubuntu straightforward. The implementation is compatible with the FastMCP decorator API (@mcp.tool()).
Citation
This project is built on Mastodon.py. If you use it in academic work, please cite:
@article{Diener2026,
author = {Diener, Lorenz and Delcourt, Corentin},
title = {Mastodon.py: A Python library for the Mastodon API},
journal = {Journal of Open Source Software},
year = {2026},
volume = {11},
number = {120},
pages = {8946},
doi = {10.21105/joss.08946},
url = {https://doi.org/10.21105/joss.08946}
}See Mastodon.py's CITATION.cff for details.
License
MIT — Vítězslav Dvořák info@vitexsoftware.cz
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VitexSoftware/mastodon-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server