A comprehensive MCP server for Mastodon integration
Project description
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.
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
Installation
pip install mastodon-mcp-server
Or from deb package (Debian 13+ / Ubuntu 24+):
apt install mastodon-mcp-server
Configuration
Copy .env.example to .env and fill in your credentials:
cp .env.example .env
Required variables:
| Variable | Description |
|---|---|
MASTODON_INSTANCE |
URL of your Mastodon instance (e.g. https://mastodon.social) |
MASTODON_ACCESS_TOKEN |
Your OAuth access token |
Optional variables:
| Variable | Default | Description |
|---|---|---|
READ_ONLY |
false |
Disable all write operations |
MASTODON_MCP_TRANSPORT |
stdio |
Transport: stdio or streamable-http |
MASTODON_MCP_HOST |
127.0.0.1 |
HTTP transport host |
MASTODON_MCP_PORT |
8000 |
HTTP transport port |
DEBUG |
not set | Enable verbose logging |
Getting an Access Token
- Go to your Mastodon instance → Preferences → Development → New application
- Grant required scopes (
read,write,follow) - Copy the Your access token value
Usage
stdio (default, for Claude Desktop / Claude Code)
mastodon-mcp
Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"mastodon": {
"command": "mastodon-mcp",
"env": {
"MASTODON_INSTANCE": "https://mastodon.social",
"MASTODON_ACCESS_TOKEN": "your-token-here"
}
}
}
}
HTTP transport
MASTODON_MCP_TRANSPORT=streamable-http mastodon-mcp
Available Tools
| Tool | Description |
|---|---|
instance_info |
Instance details |
account_verify |
Own profile |
account_get |
Account by ID |
account_search |
Search accounts |
account_statuses |
Account's posts |
account_followers / account_following |
Social graph |
account_follow / account_unfollow |
Follow management |
account_block / account_unblock |
Block management |
account_mute / account_unmute |
Mute management |
account_relationships |
Relationship status |
account_update |
Update own profile |
timeline_home |
Home timeline |
timeline_local |
Local public timeline |
timeline_public |
Federated timeline |
timeline_hashtag |
Hashtag timeline |
status_get |
Get single status |
status_context |
Thread context |
status_post |
Post a status |
status_delete |
Delete a status |
status_favourite / status_unfavourite |
Favourite management |
status_reblog / status_unreblog |
Boost management |
status_bookmark / status_unbookmark |
Bookmark management |
status_favourited_by / status_reblogged_by |
Engagement lists |
notifications_get |
Get notifications |
notification_dismiss |
Dismiss one notification |
notifications_clear |
Clear all notifications |
search |
Search accounts/statuses/hashtags |
trending_tags / trending_statuses / trending_links |
Trending content |
favourites |
Own favourites |
bookmarks |
Own bookmarks |
lists_get / list_create / list_delete |
List management |
list_accounts / list_accounts_add / list_accounts_delete |
List members |
poll_vote |
Vote in a poll |
follow_requests / follow_request_authorize / follow_request_reject |
Follow requests |
mutes / blocks |
Muted/blocked accounts |
media_post |
Upload media |
directory |
Profile directory |
License
MIT — Vítězslav Dvořák info@vitexsoftware.cz
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mastodon_mcp_server-1.0.1.tar.gz.
File metadata
- Download URL: mastodon_mcp_server-1.0.1.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8aae4a37c6af1f6f0497f245e7fc93a20829c26257b32a8ca266c405538f389
|
|
| MD5 |
c5c1091404a3c6272f71770edad4ef18
|
|
| BLAKE2b-256 |
872de9fa429112ad71c6d4ce2f6ef25837d4775860fcf58c66fe6dac73deef9e
|
File details
Details for the file mastodon_mcp_server-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mastodon_mcp_server-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e3c12bb2ccdce8668e87f4109e3f1998605f43576e2f598619670f35d87ffd
|
|
| MD5 |
83fff3208bff11864e1676f1bc86912c
|
|
| BLAKE2b-256 |
afbf8daedc261fa7db64242978b18e6ffe25cc8811a1c7855afe510d1a094cf2
|