Mastodon MCP Server & CLI
A free, open source Mastodon MCP server and CLI that lets Claude Code, Codex, Cursor and other AI agents post, edit, read your timelines and manage your account on any instance.
0.0(0 ratings)- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
claude mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
In Claude Code, type /mcp. Mastodon should show as connected.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
claude mcp add mastodon -- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
In Claude Code, type /mcp. Mastodon should show as connected.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
claude mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
In Claude Code, type /mcp. Mastodon should show as connected.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2Download the extension
Download the Claude Desktop extension.
- 3
Double-click it, and Claude Desktop installs it.
It uses the token your login stored, so there's nothing to fill in.
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
codex mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Codex lists it.
codex mcp list
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
codex mcp add mastodon -- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Codex lists it.
codex mcp list
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
codex mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Codex lists it.
codex mcp list
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open Cursor's settings, go to the MCP tab, and click Add new global MCP server.
- 3
Add the server.
{
"mcpServers": {
"mastodon": {
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
} - 4
Open the MCP tab again. It should show 76 tools.
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open the Command Palette and run MCP: Open User Configuration.
- 3
Add the server to that mcp.json.
If the file already has servers, add only this one inside servers.
{
"servers": {
"mastodon": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
}
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
copilot mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Copilot CLI has it.
copilot mcp get mastodon
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
copilot mcp add mastodon -- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Copilot CLI has it.
copilot mcp get mastodon
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
copilot mcp add mastodon \
-- npx -y @thenavidm/mastodon-mcp-cli@latest - 3
Check that Copilot CLI has it.
copilot mcp get mastodon
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Gemini CLI settings.
~/.gemini/settings.json - 3
Add the server to settings.json.
If the file already has servers, add only this one inside mcpServers.
{
"mcpServers": {
"mastodon": {
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
} - 4
Restart Gemini CLI and type /mcp to check it.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Gemini CLI settings.
%USERPROFILE%\.gemini\settings.json - 3
Add the server to settings.json.
If the file already has servers, add only this one inside mcpServers.
{
"mcpServers": {
"mastodon": {
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
} - 4
Restart Gemini CLI and type /mcp to check it.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Gemini CLI settings.
~/.gemini/settings.json - 3
Add the server to settings.json.
If the file already has servers, add only this one inside mcpServers.
{
"mcpServers": {
"mastodon": {
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
} - 4
Restart Gemini CLI and type /mcp to check it.
/mcp
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your OpenCode config.
~/.config/opencode/opencode.json - 3
Add the server under mcp.
If the file already has servers, add only this one inside mcp.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mastodon": {
"type": "local",
"command": ["npx", "-y", "@thenavidm/mastodon-mcp-cli@latest"],
"enabled": true
}
}
} - 4
Restart OpenCode.
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your OpenCode config.
%USERPROFILE%\.config\opencode\opencode.json - 3
Add the server under mcp.
If the file already has servers, add only this one inside mcp.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mastodon": {
"type": "local",
"command": ["npx", "-y", "@thenavidm/mastodon-mcp-cli@latest"],
"enabled": true
}
}
} - 4
Restart OpenCode.
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your OpenCode config.
~/.config/opencode/opencode.json - 3
Add the server under mcp.
If the file already has servers, add only this one inside mcp.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mastodon": {
"type": "local",
"command": ["npx", "-y", "@thenavidm/mastodon-mcp-cli@latest"],
"enabled": true
}
}
} - 4
Restart OpenCode.
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
openclaw mcp add mastodon \
--command npx \
--arg -y \
--arg @thenavidm/mastodon-mcp-cli@latest - 3
Check that it starts and lists its tools.
openclaw mcp doctor mastodon --probe
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
openclaw mcp add mastodon --command npx --arg -y --arg @thenavidm/mastodon-mcp-cli@latest - 3
Check that it starts and lists its tools.
openclaw mcp doctor mastodon --probe
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Add it with a single command in a terminal.
openclaw mcp add mastodon \
--command npx \
--arg -y \
--arg @thenavidm/mastodon-mcp-cli@latest - 3
Check that it starts and lists its tools.
openclaw mcp doctor mastodon --probe
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
In the agent panel, click the … menu, then MCP Servers, Manage MCP Servers and View raw config.
- 3
Add the server to mcp_config.json.
If the file already has servers, add only this one inside mcpServers.
{
"mcpServers": {
"mastodon": {
"command": "npx",
"args": ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
}
}
}
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Hermes config.
~/.hermes/config.yaml - 3
Add the server under mcp_servers.
If the file already has mcp_servers, add only this one under it.
mcp_servers:
mastodon:
command: "npx"
args: ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Hermes config.
%USERPROFILE%\.hermes\config.yaml - 3
Add the server under mcp_servers.
If the file already has mcp_servers, add only this one under it.
mcp_servers:
mastodon:
command: "npx"
args: ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
- 1
Log in once in a terminal. It opens your instance in your browser, and you approve.
Put your own instance in place of mastodon.social. The login stores the token, so your app's config needs no password.
npx -y @thenavidm/mastodon-mcp-cli@latest login mastodon.social - 2
Open your Hermes config.
~/.hermes/config.yaml - 3
Add the server under mcp_servers.
If the file already has mcp_servers, add only this one under it.
mcp_servers:
mastodon:
command: "npx"
args: ["-y", "@thenavidm/mastodon-mcp-cli@latest"]
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Claude Code the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Claude Code what each command does and which ones ask first.
mkdir -p ~/.claude/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.claude/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Claude Code to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Claude Code finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Claude Code the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Claude Code what each command does and which ones ask first.
New-Item -ItemType Directory -Force "$HOME\.claude\skills\mastodon" | Out-Null
Copy-Item "$(npm root -g)\@thenavidm\mastodon-mcp-cli\SKILL.md" "$HOME\.claude\skills\mastodon\" - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Claude Code to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Claude Code finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Claude Code the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Claude Code what each command does and which ones ask first.
mkdir -p ~/.claude/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.claude/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Claude Code to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Claude Code finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Codex the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Codex what each command does and which ones ask first.
mkdir -p ~/.agents/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.agents/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Codex to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Codex finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Codex the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Codex what each command does and which ones ask first.
New-Item -ItemType Directory -Force "$HOME\.agents\skills\mastodon" | Out-Null
Copy-Item "$(npm root -g)\@thenavidm\mastodon-mcp-cli\SKILL.md" "$HOME\.agents\skills\mastodon\" - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Codex to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Codex finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Codex the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Codex what each command does and which ones ask first.
mkdir -p ~/.agents/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.agents/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Codex to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Codex finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
Ask Cursor to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Cursor finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
Ask VS Code to use mastodon-cli.
Running mastodon-cli on its own lists every command, so VS Code finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Copilot CLI the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Copilot CLI what each command does and which ones ask first.
mkdir -p ~/.copilot/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.copilot/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Copilot CLI to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Copilot CLI finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Copilot CLI the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Copilot CLI what each command does and which ones ask first.
New-Item -ItemType Directory -Force "$HOME\.copilot\skills\mastodon" | Out-Null
Copy-Item "$(npm root -g)\@thenavidm\mastodon-mcp-cli\SKILL.md" "$HOME\.copilot\skills\mastodon\" - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Copilot CLI to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Copilot CLI finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give Copilot CLI the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells Copilot CLI what each command does and which ones ask first.
mkdir -p ~/.copilot/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.copilot/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask Copilot CLI to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Copilot CLI finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
Ask Gemini CLI to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Gemini CLI finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenCode the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenCode what each command does and which ones ask first.
mkdir -p ~/.config/opencode/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.config/opencode/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenCode to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenCode finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenCode the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenCode what each command does and which ones ask first.
New-Item -ItemType Directory -Force "$HOME\.config\opencode\skills\mastodon" | Out-Null
Copy-Item "$(npm root -g)\@thenavidm\mastodon-mcp-cli\SKILL.md" "$HOME\.config\opencode\skills\mastodon\" - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenCode to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenCode finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenCode the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenCode what each command does and which ones ask first.
mkdir -p ~/.config/opencode/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.config/opencode/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenCode to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenCode finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenClaw the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenClaw what each command does and which ones ask first.
mkdir -p ~/.openclaw/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.openclaw/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenClaw to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenClaw finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenClaw the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenClaw what each command does and which ones ask first.
New-Item -ItemType Directory -Force "$HOME\.openclaw\skills\mastodon" | Out-Null
Copy-Item "$(npm root -g)\@thenavidm\mastodon-mcp-cli\SKILL.md" "$HOME\.openclaw\skills\mastodon\" - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenClaw to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenClaw finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Give OpenClaw the skill, so it knows every command.
The skill is the SKILL.md in the package. It tells OpenClaw what each command does and which ones ask first.
mkdir -p ~/.openclaw/skills/mastodon
cp "$(npm root -g)/@thenavidm/mastodon-mcp-cli/SKILL.md" ~/.openclaw/skills/mastodon/ - 3
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 4
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 5
Ask OpenClaw to use mastodon-cli.
Running mastodon-cli on its own lists every command, so OpenClaw finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
Ask Antigravity to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Antigravity finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
Ask Hermes to use mastodon-cli.
Running mastodon-cli on its own lists every command, so Hermes finds the one it needs.
- 1
Install the CLI. It needs Node 22 or newer.
npm install -g @thenavidm/mastodon-mcp-cli@latest - 2
Log in once. The token is stored on this computer.
mastodon-cli login mastodon.social - 3
Check your setup.
It names anything that's wrong and the fix.
mastodon-cli doctor - 4
List every command, then try one.
mastodon-cli
mastodon-cli get-home-timeline --limit 20
Needs Node 22 or newer and a Mastodon account on any instance. How the login works.
It's free and open source. If it saves you time, star it on GitHub, so more people find it.
This free Mastodon MCP server and CLI gives your AI real access to your Mastodon account, on any instance. It posts, edits, reads your timelines, follows hashtags and keeps your lists in order.
It's one install with two ways in. Claude, Codex, Cursor or any other MCP app calls its 76 tools for you, and the same tools work as a CLI that agents like Claude Code, Codex and OpenCode run, or that you type yourself.
In this guide, I'll show you:
- What the Mastodon MCP server & CLI is, and what you can ask it
- How to install it and check that it works
- When to use the MCP server, and when the CLI
- Every tool, and how to keep your account safe
Every tool on this page comes from the server itself, and every cost was measured in Claude Code.
Key takeaways
What is the Mastodon MCP server & CLI?
The Mastodon MCP server & CLI is a free, open source program that lets AI agents act on Mastodon for you, in two ways. The MCP server is what an AI app like Claude, Codex or Cursor connects to, through MCP (Model Context Protocol), the open standard AI apps use to call outside tools.
You ask in plain language. Your AI picks the right tool, and the server makes the call to your instance.
The CLI is the same program as commands. mastodon-cli get-home-timeline runs the same code your AI runs when you ask about your timeline, whether an agent like Claude Code runs it or you do.
In an AI OS, the layer that connects your AI to your context, your data and your tools, a server like this is how your AI reaches Mastodon. I explain how the parts fit together in how to build an AI operating system, and here's how I use AI myself.
What can you ask it?
Once it's set up, you ask the way you'd ask an assistant. These are real prompts it handles:
Try askingPost this, and put a content warning on it.
There's a typo in Tuesday's post. Fix it without losing the boosts.
What did my timeline talk about in the last 12 hours?
Find people posting about local-first software and tell me who's worth following.
Make a list called "rust people" and put everyone I follow who posts about Rust on it.
Turn these notes into a thread. My instance allows 11,000 characters, so check before you split it.
The second one shows why this is useful. Mastodon lets you edit a published post and keeps its boosts, replies and favorites, so fixing a typo doesn't mean starting over.
It works well next to my Bluesky MCP server and Threads MCP server, so your AI can post the same update to Bluesky and share it on Threads in the same chat. Every server I've made is on my MCP servers page.
For the posts themselves, my free Mastodon character counter and Mastodon bio generator help too.
How to install the Mastodon MCP server
Pick your app in the box at the top of this page. You log in once in a terminal, then add the server to your app with a single command or a pasted block. Nothing about your account goes in the app's config.
Windsurf, Zed and Cline take the same server, though they don't have a tab in the box yet. Follow the box's Cursor tab, and put its block here instead:
| App | Where the block goes |
|---|---|
| Windsurf | In the Cascade panel, open the Actions menu (…) and choose Open MCP config file, then paste the block. |
| Cline | Click the MCP Servers icon in the Cline panel, open the Configure tab, click Configure MCP Servers, and paste the block. |
| Zed | Go to Settings, then AI, then MCP Servers, and choose Add Server, then Add Local Server. Enter the block's command, arguments and variables, and Zed saves them under context_servers. |
Set up your Mastodon account
Mastodon has no central developer portal, because every instance is its own server. So the login does the setup for you, on your instance.
npx -y @thenavidm/mastodon-mcp-cli login mastodon.socialBehind that one command, the login registers itself as an app on your instance, catches the answer on your own computer and checks the token. It doesn't ask for push notifications, because nothing here uses them.
Or let your AI set it up
Paste this into Claude Code, Codex or any agent that can run commands:
Set up the Mastodon MCP serverSet up the Mastodon MCP server for me.
1. Ask me which instance my account is on, e.g. mastodon.social. Do not guess.
2. Run: npx -y @thenavidm/mastodon-mcp-cli login <instance>
It opens my browser and waits. Tell me to approve the request there, and wait for it to finish. It asks for read, write and follow; that is correct. If there is no browser available, re-run it with --oob and I will paste the code back to you.
3. Register the server with my MCP client. For Claude Code that is:
claude mcp add mastodon -- npx -y @thenavidm/mastodon-mcp-cli
No environment variables: step 2 already stored the token.
4. Run: npx -y @thenavidm/mastodon-mcp-cli doctor
Show me the output. Pay attention to the line about scopes: if it says the account cannot post, the token is read-only and step 2 needs redoing.
5. Tell me to restart the client. Do not post anything.
If I have more than one account, repeat step 2 per account and per instance.
It stops at step 2 and waits, because only you can approve the request in your browser.
Other ways to log in
With no browser, login mastodon.social --oob prints the address and takes a pasted code. If you already made an app on your instance by hand, login mastodon.social --token=YOUR_ACCESS_TOKEN stores it.
If you make that app yourself, tick read, write and follow, and copy "Your access token", not the client secret.
Check that it works
Run the doctor. It reports your instance's real limits, checks the token and checks what the token is allowed to do.
npx -y @thenavidm/mastodon-mcp-cli doctorThat last check matters most. A read-only token passes everything else, then fails on the first post with an error that never mentions why.
In Claude Code, /mcp also shows whether the Mastodon server is connected. It's one of the Claude Code commands worth knowing.
Use the Mastodon CLI
The CLI is the same 76 tools as commands. AI agents that run commands, like Claude Code, Codex and OpenCode, use it on their own, and you can type the same commands in a terminal or a script. Every tool name becomes a command with dashes, so post_status runs as mastodon-cli post-status.
npm install -g @thenavidm/mastodon-mcp-cli
mastodon-cli
mastodon-cli get-home-timeline --limit 50
mastodon-cli search --q "model context protocol"
mastodon-cli post-status --status "Shipped." --confirmThe bare mastodon-cli lists every command, mastodon-cli which <words> finds the command for a task, and mastodon-cli <command> --help shows what a command takes. Posting, editing, deleting and blocking need --confirm, the terminal's version of your approval.
mastodon-cli install <app> adds the server to Claude Code, Codex, Claude Desktop, Cursor, VS Code or Gemini CLI, in each app's own format.
These are the flags you'll use most:
| Flag | What it does |
|---|---|
--json | Prints JSON |
--compact | Prints the JSON on one line |
--select a,b.c | Keeps only those fields, and a dotted path goes deeper |
--agent | Machine mode: compact JSON, no prompts, and it never confirms anything |
--confirm | Lets a write that asks first go ahead |
--dry-run | Shows what a write would do, without doing it |
A script can branch on the exit code:
| Exit code | What it means |
|---|---|
| 0 | It worked |
| 1 | Something unexpected went wrong |
| 2 | The command was typed wrong, or a write needed --confirm |
| 3 | It wasn't found |
| 4 | Your instance rejected the token |
| 5 | Your instance failed or couldn't be reached |
| 7 | You hit a rate limit, so wait and try again |
| 10 | Nothing is set up yet, so run the login |
MCP server or CLI: which one?
Both are the same program with the same 76 tools. The difference is when your AI pays for them, in the tokens it reads.
- MCP server
- 21,600 tokens
- CLI
- Nothing
- MCP server
- 1,700 tokens
- CLI
- Nothing
- MCP server
- Nothing more, or in Claude Code the tools it picks
- CLI
- 3,600 tokens, once
- MCP server
- 432,000 tokens
- CLI
- 3,600 tokens
- MCP server
- Yes
- CLI
- No, there's no terminal there
- MCP server
- No
- CLI
- Yes
An app that loads every tool up front sends the full list with every message, whether you mention Mastodon or not. Claude Code doesn't by default: its tool search sends only the tool names and the server's instructions, and loads a tool's full definition when your AI reaches for it.
The CLI costs nothing until Mastodon comes up. Then your agent reads its skill file once and runs the commands it needs. With the skill added, Claude Code also lists its one-line description with every message, about 140 tokens.
When the whole conversation is about Mastodon, the gap closes. Then the MCP server is the better experience, because you ask in plain language and your AI never has to look up a command.
Where the MCP server's tokens go
| Part of the tool list | Share |
|---|---|
| JSON Schema structure, like types, required lists and nesting | 59% |
| Argument descriptions | 29% |
| Tool descriptions | 12% |
59% of it is MCP writing every tool out as JSON Schema, which any server with this many tools pays. The rest is the wording that lets your AI use each tool without guessing.
How to spend less
In Claude Code, leave tool search on, which it is unless you've set ENABLE_TOOL_SEARCH=false.
Turn the server off when you aren't using Mastodon. In Claude Code that's the /mcp panel, and every AI app has its own switch. MASTODON_READ_ONLY=1 cuts it to the 39 reading tools.
Or install the CLI and connect the server later, on the days it earns its place. Every tool stays in reach, and the standing cost drops to nothing.
Every number here was measured on October 5, 2026 in Claude Code 2.1.286 with Claude Opus 5.5. It's the same one-line prompt with and without the server connected, once with tool search off so every tool loads, and once with Claude Code's default. The skill was measured the same way, and other apps and models count tokens a little differently.
What makes Mastodon different
Mastodon isn't one website. Thousands of independent instances talk to each other, and yours decides your limits, what it can show you and which servers it connects to.
A post that seems not to exist may just not have reached your instance yet. Searching for its link with resolve on makes your instance go and fetch it.
Search is usually not full text, because most instances only index your own posts and ones you interacted with. A thin result is the instance's choice, not a bad search.
Timelines have no algorithm, so hashtags, trends, lists and the directory are how you find people. Following a hashtag puts every public post with it into your home timeline.
The server works on Pleroma, Akkoma, GoToSocial and other software that speaks the same API. get_instance_info tells you which one your instance runs, and the doctor warns you when edits or trends may be missing.
Every Mastodon tool
The tables below list all 76 tools, grouped the way the repo groups them. Of these, 39 only read, and 37 change something on your account.
Posting and editing
post_status- What it does
- Publish a status.
- Kind
- Asks first
post_thread- What it does
- Publish several statuses as one thread, each replying to the last.
- Kind
- Asks first
edit_status- What it does
- Change the text, content warning, media alt text or poll of a status that is already published.
- Kind
- Asks first
get_status_source- What it does
- The plain-text source of one of your own statuses, exactly as it was typed, plus its content warning.
- Kind
- Reads
get_status_history- What it does
- Every published version of a status, oldest first.
- Kind
- Reads
delete_status- What it does
- Delete one of your own statuses.
- Kind
- Asks first
get_status- What it does
- A single status by id, with its media, poll, link preview and engagement counts.
- Kind
- Reads
get_thread- What it does
- A status together with everything above and below it, nested into the real reply tree.
- Kind
- Reads
list_scheduled_statuses- What it does
- Statuses queued with scheduled_at that have not published yet.
- Kind
- Reads
reschedule_status- What it does
- Change when a scheduled status will publish.
- Kind
- Writes
cancel_scheduled_status- What it does
- Cancel a status that was scheduled but has not published.
- Kind
- Writes
get_favourites- What it does
- Statuses a connected account has favourited, newest first.
- Kind
- Reads
get_bookmarks- What it does
- Statuses a connected account has bookmarked.
- Kind
- Reads
Timelines
get_home_timeline- What it does
- Statuses from the accounts and hashtags you follow, newest first.
- Kind
- Reads
get_local_timeline- What it does
- Everything public posted by accounts on your own instance.
- Kind
- Reads
get_federated_timeline- What it does
- Everything public your instance has federated in from the rest of the network.
- Kind
- Reads
get_hashtag_timeline- What it does
- Public statuses carrying a hashtag.
- Kind
- Reads
get_list_timeline- What it does
- Statuses from the accounts on one of your lists.
- Kind
- Reads
get_account_statuses- What it does
- Statuses by one account, newest first.
- Kind
- Reads
Favorites, boosts and polls
favourite_status- What it does
- Favourite a status.
- Kind
- Writes
unfavourite_status- What it does
- Remove your favourite from a status.
- Kind
- Writes
boost_status- What it does
- Boost a status to your followers.
- Kind
- Writes
unboost_status- What it does
- Undo a boost.
- Kind
- Writes
bookmark_status- What it does
- Bookmark a status.
- Kind
- Writes
unbookmark_status- What it does
- Remove a bookmark.
- Kind
- Writes
pin_status- What it does
- Pin one of your own statuses to the top of your profile.
- Kind
- Writes
unpin_status- What it does
- Unpin a status from your profile.
- Kind
- Writes
mute_conversation- What it does
- Stop being notified about replies to this thread, without leaving it.
- Kind
- Writes
unmute_conversation- What it does
- Start being notified about this thread again.
- Kind
- Writes
vote_poll- What it does
- Vote in a poll by option index, counting from zero.
- Kind
- Asks first
translate_status- What it does
- Translate a status into your language using the instance's translation backend.
- Kind
- Reads
get_favourited_by- What it does
- The accounts that favourited a status.
- Kind
- Reads
get_boosted_by- What it does
- The accounts that boosted a status, as far as your instance knows.
- Kind
- Reads
report- What it does
- Report an account, optionally with specific statuses, to your instance's moderators.
- Kind
- Asks first
Search and hashtags
search- What it does
- Search for accounts, statuses or hashtags.
- Kind
- Reads
get_trends- What it does
- What is trending on this instance right now: hashtags, statuses, or links.
- Kind
- Reads
get_followed_hashtags- What it does
- Hashtags you follow.
- Kind
- Reads
follow_hashtag- What it does
- Follow a hashtag, so every public post carrying it appears in your home timeline.
- Kind
- Writes
unfollow_hashtag- What it does
- Stop a hashtag's posts appearing in your home timeline.
- Kind
- Writes
browse_directory- What it does
- Accounts that have opted into being discoverable, newest or most recently active first.
- Kind
- Reads
get_suggested_follows- What it does
- Accounts the instance suggests you follow, with the reason for each suggestion.
- Kind
- Reads
get_conversations- What it does
- Direct conversations, newest first, each with its participants and last message.
- Kind
- Reads
Follows, mutes and blocks
get_account- What it does
- Full profile for any account: bio, counts, the metadata fields with their verification state, and whether you follow each other.
- Kind
- Reads
get_followers- What it does
- Accounts that follow a given account.
- Kind
- Reads
get_following- What it does
- Accounts a given account follows.
- Kind
- Reads
get_relationships- What it does
- For each account named, whether you follow them, whether they follow you, and whether either of you has muted or blocked the other.
- Kind
- Reads
follow_account- What it does
- Follow an account.
- Kind
- Writes
unfollow_account- What it does
- Stop following an account.
- Kind
- Writes
mute_account- What it does
- Hide an account from your timelines without them knowing.
- Kind
- Writes
unmute_account- What it does
- Stop hiding an account.
- Kind
- Writes
block_account- What it does
- Block an account.
- Kind
- Asks first
unblock_account- What it does
- Remove a block.
- Kind
- Writes
block_domain- What it does
- Hide every account on an entire instance and remove their followers.
- Kind
- Asks first
unblock_domain- What it does
- Lift a domain block.
- Kind
- Writes
get_mutes- What it does
- Accounts you have muted.
- Kind
- Reads
get_blocks- What it does
- Accounts you have blocked.
- Kind
- Reads
get_endorsements- What it does
- Accounts you feature on your own profile.
- Kind
- Reads
get_blocked_domains- What it does
- Whole instances you have blocked.
- Kind
- Reads
get_follow_requests- What it does
- Accounts waiting for you to approve their follow.
- Kind
- Reads
answer_follow_request- What it does
- Approve or reject a pending follow request.
- Kind
- Writes
Notifications and lists
get_notifications- What it does
- Mentions, boosts, favourites, follows, poll results and edits to posts you interacted with.
- Kind
- Reads
get_read_position- What it does
- The last notification and home-timeline entry you marked read, shared across every client on this account.
- Kind
- Reads
mark_read- What it does
- Record how far you have read, so the next get_notifications with since_id returns only what is new.
- Kind
- Writes
dismiss_notification- What it does
- Remove a single notification from the list.
- Kind
- Writes
clear_notifications- What it does
- Delete all notifications permanently.
- Kind
- Asks first
get_lists- What it does
- Your curated lists.
- Kind
- Reads
create_list- What it does
- Create a curated list.
- Kind
- Writes
delete_list- What it does
- Delete a list.
- Kind
- Asks first
get_list_members- What it does
- The accounts on one of your lists.
- Kind
- Reads
add_to_list- What it does
- Add accounts to a list.
- Kind
- Writes
remove_from_list- What it does
- Remove accounts from a list.
- Kind
- Writes
get_announcements- What it does
- Announcements from the people who run your instance: downtime, rule changes, moderation decisions.
- Kind
- Reads
Accounts and your instance
list_accounts- What it does
- Every Mastodon account this server can act as, and which instance each lives on.
- Kind
- Reads
whoami- What it does
- Authenticate against the instance and return the live profile.
- Kind
- Reads
get_instance_info- What it does
- What this instance actually allows: the character limit, how many attachments and poll options, media size ceilings, the software version, and the server rules.
- Kind
- Reads
update_profile- What it does
- Change your display name, bio, or the four metadata fields on your profile.
- Kind
- Asks first
Is the Mastodon MCP server safe?
A post is public the moment it lands, and deleting it doesn't pull it back off the instances that already have it. So 11 tools ask first. They're the ones marked "Asks first" in the tool tables above.
When your AI calls one of them, the call needs a yes first. Where you use it decides who gives it:
- Claude Code (2.1.246 and later) asks you before every call, in every one of its permission modes.
- An app that can show forms asks you in a form.
- Any other app takes your AI's
confirm: trueas the yes, so tell your AI to check with you first. - An agent with no person to ask needs
MASTODON_CONFIRM=model, so itsconfirm: truecounts in every app. - In a terminal, you add
--confirmto the command.
If the answer is no, nothing reaches Mastodon.
vote_poll asks because a Mastodon vote can't be changed. report asks because it goes to human moderators.
Favorites, boosts, follows and mutes don't ask, because each is one call to undo. Asking on every favorite would only train your AI to pass the check without thinking.
Make it read-only
Set MASTODON_READ_ONLY=1 and every write disappears from the tool list, leaving 39 reading tools. Your AI can't call a tool it can't see.
MASTODON_ALLOW_DESTRUCTIVE=0 is the middle setting. Favorites and follows still work, and posting and deleting don't.
Keep a log of every write
Set MASTODON_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked.
Watch out: On an open network, anyone can put text in front of your AI, and a post can try to give it orders. The server tells your AI to treat it as data, but MASTODON_READ_ONLY=1 is the real defense for an agent reading other people's posts.
Your instance's admin can read your direct messages, and so can the admin at the other end. Mastodon DMs aren't encrypted.
Your data
Nothing goes anywhere but your instance. Your token is stored in ~/.mastodon-mcp/accounts.json, readable only by your user account, and there's no tracking of any kind.
To disconnect, open https://your-instance/oauth/authorized_applications and remove the app, which cuts access right away. mastodon-cli logout <handle> only forgets the token on your computer.
Connect more than one Mastodon account
On Mastodon, an account is a token plus an instance, and a personal account and a project account often live on different instances. Run the login once for each:
mastodon-cli login mastodon.social
mastodon-cli login fosstodon.orgBoth are stored. Every tool that acts as you takes an optional account, so you can say which one posts, and list_accounts shows them all.
Mastodon MCP server settings
The login is all most people need. These environment variables cover the rest, in your app's config or your shell.
MASTODON_URL- Default
- none
- What it does
- Sets your instance when you skip the login
MASTODON_ACCESS_TOKEN- Default
- none
- What it does
- Holds a token for it when you skip the login
MASTODON_ACCOUNTS- Default
- none
- What it does
- Lists several accounts across instances, as JSON
MASTODON_DEFAULT_ACCOUNT- Default
- the first one
- What it does
- Picks the account that acts when a tool names none
MASTODON_MCP_HOME- Default
~/.mastodon-mcp- What it does
- Sets where the login keeps accounts
MASTODON_READ_ONLY- Default
0- What it does
1hides every write
MASTODON_ALLOW_DESTRUCTIVE- Default
1- What it does
0blocks posting, editing and deleting
MASTODON_AUDIT_LOG- Default
- none
- What it does
- Logs every attempted write to a file
MASTODON_REQUEST_TIMEOUT_MS- Default
30000- What it does
- Sets how long a request can take
MASTODON_MAX_RETRIES- Default
3- What it does
- Retries after a rate limit or a server error
MASTODON_INSTANCE_URL- Default
- none
- What it does
- Another name for MASTODON_URL
MASTODON_API_BASE_URL- Default
- none
- What it does
- Another name for MASTODON_URL
MASTODON_HANDLE- Default
- none
- What it does
- Its full handle. Resolved on first use when absent
MASTODON_MIN_REQUEST_INTERVAL_MS- Default
120- What it does
- Spacing between requests
MASTODON_USER_AGENT- Default
mastodon-mcp- What it does
- The User-Agent sent to the instance
MASTODON_LOGIN_PORT- Default
33517- What it does
- The local port
loginlistens on for the OAuth redirect
MASTODON_SURFACE- Default
full- What it does
searchlists three tools that find, describe and run the rest
MASTODON_TOOL_TIMEOUT_MS- Default
- none
- What it does
- Gives up on any tool after this many milliseconds
MASTODON_CONFIRM- Default
human- What it does
modellets your AI'sconfirm: trueapprove on its own, for an agent with no person to ask
MASTODON_HTTP_PORT- Default
8787- What it does
- Sets the port for
--http
MASTODON_HTTP_HOST- Default
127.0.0.1- What it does
- Sets the address for
--http, and any other needs a token
MASTODON_HTTP_TOKEN- Default
- none
- What it does
- Sets the bearer token every
--httprequest needs
MASTODON_HTTP_ALLOWED_ORIGINS- Default
- none
- What it does
- Lists other websites allowed to call
--http, comma separated
MASTODON_DEBUG- Default
- off
- What it does
1prints debug lines
Troubleshooting
Run the doctor first. It names the step that failed and the fix.
| What you see | What to do |
|---|---|
| Reading works, but the first post fails | The token can't write. Run the login again |
| "rejected the access token" | It was revoked, or it belongs to another instance |
| "No account found for …" | Use the full @user@instance form |
| A post that exists comes back not found | Your instance hasn't seen it yet. Search its link with resolve on |
| Search returns almost nothing | Most instances don't index every public post |
| "Status is N characters" | Your instance sets its own limit. get_instance_info shows it |
| "…so it will not run without confirm: true" | That's the safety check working. Approve it when your app asks, or say you want it posted |
If the server doesn't show up in your app at all, run the command your app runs, in a terminal, and read the error.
More free Mastodon tools
Check a post's length against your instance before your AI sends it, or turn a post into an image to share.
Free tools
FAQs about the Mastodon MCP server & CLI
Here are the questions people ask most about the Mastodon MCP server and CLI.
The Mastodon MCP server & CLI is a free, open source program that lets an AI app like Claude, Codex or Cursor act on your Mastodon account, on any instance.
It has 76 tools for posting, editing, threads, timelines, search, lists, notifications and follows, and the same tools run as a CLI that agents like Claude Code and Codex use, or that you type yourself.
An MCP server is a standard way to give an AI app real access to a tool, so it can act instead of guessing.
MCP stands for Model Context Protocol, and Claude, Codex, Cursor and many other AI apps speak it.
The Mastodon CLI is the same program as the Mastodon MCP server, run as commands.
AI agents like Claude Code, Codex and OpenCode run them for you, and you can type them in a terminal or a script.
Every tool is a command with dashes, so post_status runs as mastodon-cli post-status, and one npm package installs both.
Use the Mastodon MCP server in an AI app with no terminal, like Claude Desktop's chat, and the CLI in a terminal, a script or a cron job.
In an AI app that can run commands, like Claude Code, Codex or Cursor, the CLI is the lighter choice, because it costs nothing until it runs.
Yes, the Mastodon MCP server is free and open source under the MIT license.
Mastodon's API is free too, so the only thing you pay for is your own AI app.
The Mastodon MCP server works on any Mastodon instance, and on Pleroma, Akkoma, GoToSocial and other software that speaks the same API.
The login registers it on your instance for you.
No, the Mastodon MCP server's login registers the app on your instance for you.
You only approve the request in your browser.
Yes, the Mastodon MCP server edits published posts with edit_status, which keeps their boosts, replies and favorites.
Editing asks first, like posting does.
The Mastodon MCP server posts when you ask it to.
Posting, editing, deleting, voting, reporting and blocking wait for your approval in an app that can ask, like Claude Code, and read-only mode removes every write so your AI can't see them at all.
The Mastodon MCP server works with any app that speaks MCP.
That includes Claude Code, Claude Desktop, Codex, Cursor, VS Code, GitHub Copilot CLI, Gemini CLI, OpenCode, OpenClaw, Antigravity and Hermes.
Yes, the Mastodon MCP server connects as many accounts as you log in, on as many instances as you like.
Every tool takes an optional account, and a default decides which one acts when you don't say.
I did.
I'm Navid Moazzez, and I made the Mastodon MCP server & CLI as one of my free tools on navid.me.
You can read more about me.
The code is on GitHub under the MIT license, and the package is on npm.
More MCP servers & CLIs
Related free tools
Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Read the affiliate disclaimer.
On this page
The most actionable AI newsletter for founders
Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.
No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.
P.S. Sign up now to get free access to my ultimate AI tools guide for creators.
