All integrations
Get an API key
Mastodon
Post statuses, read timelines and follow accounts on any Mastodon server.
Social
How an agent reaches it
MCPREST APICLI
How you authenticate
API key
- On YOUR server open Preferences, then Development, then New application.
- Grant read and write scopes, then copy the access token.
- Set the URI rule to your own server's domain. A token from one Mastodon server is worthless on another.
Connection details
- Base URL
- https://mastodon.social/api/v1
- Pagination
- link_header
Common endpoints
| who am I | GET /accounts/verify_credentials |
| post a status | POST /statuses |
| home timeline | GET /timelines/home |
| search | GET /../v2/search?q={q} |
Worth knowing
- Mastodon is federated: the base URL is the user's OWN server. mastodon.social is only the largest instance, not the API.
- Posting the same text twice in quick succession is deduplicated silently unless Idempotency-Key differs.
- Character limits are per-server (500 by default) and are advertised at /api/v1/instance.