social
Mastodon MCP, CLI, and Lua Integration for AI Agents
Mastodon integration docs for AI agents: MCP gateway setup, Mastodon CLI commands, Lua API reference, credentials, and function schemas.
6 functions 5 read 1 write Bearer token auth
Mastodon for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
mastodon- route_slug
mastodon- package
mastodon- auth_strategy
bearer_tokenBearer token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Mastodon CLIHeadless setup and direct function calls. Mastodon MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Mastodon MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Mastodon.
Claude Code Mastodon MCP setup for Claude Code. Cursor Mastodon MCP setup for Cursor. Codex Mastodon MCP setup for Codex. OpenAI Agents Mastodon MCP setup for OpenAI Agents SDK. Claude Agent SDK Mastodon MCP setup for Claude Agent SDK. Vercel AI SDK Mastodon MCP setup for Vercel AI SDK. LangChain Mastodon MCP setup for LangChain. LangGraph Mastodon MCP setup for LangGraph. CrewAI Mastodon MCP setup for CrewAI. MCP clients Mastodon MCP setup for Generic MCP Clients.
Mastodon CLI Matrix
Use these pages for direct Mastodon CLI workflows in scripts, CI, cron, and agent wrappers.
CI Mastodon CLI for CI. Cron Jobs Mastodon CLI for cron jobs. Shell Scripts Mastodon CLI for shell scripts. Headless Automation Mastodon CLI for headless automation. Coding Agents Mastodon CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
mastodon.mastodon_list_statuses | Read read | 4 | Browse statuses (toots) from a Mastodon timeline. Use "home" for your home feed, "public" for the federated timeline, or "local" for the local instance timeline. Supports pagination. |
mastodon.mastodon_get_status | Read read | 1 | Retrieve a single Mastodon status (toot) by its ID. Returns the full post content, author details, and engagement metrics. |
mastodon.mastodon_create_status | Write write | 6 | Publish a new status (toot) on Mastodon. Supports content warnings, visibility controls (public, unlisted, private, direct), replies, and language settings. |
mastodon.mastodon_list_accounts | Read read | 3 | List followers of a Mastodon account. Returns account profiles with display names, bios, and follower counts. Supports pagination. |
mastodon.mastodon_get_account | Read read | 1 | Retrieve a Mastodon account profile by ID. Returns display name, bio, follower counts, and other profile details. |
mastodon.mastodon_get_current_user | Read read | 0 | Get the authenticated user's Mastodon profile. Returns display name, bio, follower/following counts, and other account details. |