Buffer MCP Server & CLI

A free, open source Buffer MCP server and CLI that lets Claude Code, Codex, Cursor and other AI agents draft and schedule posts, manage your queues and read your analytics.

Navid Moazzezby Navid Moazzez·Updated Oct 5, 2026·14 min read·
Your computer
  1. 1

    Add it with a single command in a terminal.

    Put your own API key in place of the example.

    claude mcp add buffer \
    -e BUFFER_API_KEY=YOUR_API_KEY \
    -- npx -y @thenavidm/buffer-mcp-cli@latest
  2. 2

    In Claude Code, type /mcp. Buffer should show as connected.

    /mcp

Needs Node 22 or newer and a Buffer API key, on any plan. Get it in a minute.

It's free and open source. If it saves you time, star it on GitHub, so more people find it.

Rate this tool

This free Buffer MCP server and CLI gives your AI real access to your Buffer account: channels, posts and queues, ideas, templates and analytics. It reads your channels and queues, drafts and schedules posts, manages ideas and templates, and adds up how your posts did.

It's one install with two ways in. Claude, Codex, Cursor or any other MCP app calls its 41 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 Buffer 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.mdTL;DR

Key takeaways

It gives Claude, Codex, Cursor and any other MCP app 41 tools for Buffer: your channels, posts and queues, ideas, templates, content items and post analytics.
Buffer's API works on every plan, Free included, with one API key on Free and more on paid plans.
Every new post, edit, delete and queue change waits for your approval, and a draft never goes out on its own.
The same tools run as a CLI, which costs your AI nothing until it runs.

What is the Buffer MCP server & CLI?

The Buffer MCP server & CLI is a free, open source program that lets AI agents plan and publish posts in your Buffer account 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 Buffer's own API.

The CLI is the same program as commands. buffer-cli get-posts runs the same code your AI runs when you ask what's in your queue, 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 Buffer. 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 asking
What's scheduled on my LinkedIn and Bluesky channels this week?
Draft a post about my new course for every channel, and leave them as drafts.
Move tomorrow's post to the top of my Threads queue.
How did my posts do last month, channel by channel?
Save this as an idea in my launch group.
Delete the duplicate post scheduled for Friday.

The second one shows why this is useful. Your AI writes a draft for each channel in its own style, and nothing goes out until you schedule it.

It works well next to my Bluesky MCP server and Threads MCP server, so your AI can post straight to Bluesky and reply on Threads in the same chat. Every server I've made is on my MCP servers page.

For the posts themselves, my free social media image resizer and social media post analyzer help too.

How to install the Buffer MCP server

Pick your app in the box at the top of this page. Each one is a single command or a pasted block, and they all run through npx, so there's nothing to install first.

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:

AppWhere the block goes
WindsurfIn the Cascade panel, open the Actions menu (…) and choose Open MCP config file, then paste the block.
ClineClick the MCP Servers icon in the Cline panel, open the Configure tab, click Configure MCP Servers, and paste the block.
ZedGo 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.
Before you start0/3

Watch out: Buffer's Free plan allows one API key, and every app that uses it shares its limits. Paid plans allow three or five keys.

Set up your Buffer account

It takes a minute.

Get your API key0/4

One key reaches every organization your Buffer login can see. To point the server at one of them by default, set BUFFER_ORGANIZATION_ID, though the key itself still reaches the rest.

Buffer counts each key's requests over three windows, and your plan sets them:

Free
Keys
1
15 minutes
100
24 hours
250
30 days
3,000
Essentials
Keys
3
15 minutes
100
24 hours
250
30 days
7,500
Team
Keys
5
15 minutes
100
24 hours
500
30 days
15,000

An OAuth access token from your own Buffer app works in the same setting, but post analytics need an API key.

To keep the key out of your app's config, save it alone in a file only you can read, and point BUFFER_TOKEN_FILE at that file's full path instead.

Check that it works

Run the doctor with --network. It checks your settings, then asks Buffer for your account's ID to prove the key works. It never prints the ID, and it never posts.

npx -y @thenavidm/buffer-mcp-cli doctor --network

When every line has a check mark, restart your app and ask it which channels you have connected. A failed check usually means the key was mistyped or deleted.

In Claude Code, /mcp also shows whether the Buffer server is connected. It's one of the Claude Code commands worth knowing.

Use the Buffer CLI

The CLI is the same 41 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 get_posts runs as buffer-cli get-posts.

npm install -g @thenavidm/buffer-mcp-cli
buffer-cli
buffer-cli get-account
buffer-cli get-channels --organizationId YOUR_ORG_ID
buffer-cli get-posts --organizationId YOUR_ORG_ID --first 10
buffer-cli move-post-in-queue --id YOUR_POST_ID --position top --confirm

The bare buffer-cli lists every command, buffer-cli which <words> finds the command for a task, and buffer-cli <command> --help shows what a command takes. Creating, editing, moving and deleting need --confirm, the terminal's version of your approval.

buffer-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:

FlagWhat it does
--jsonPrints JSON
--compactPrints the JSON on one line
--select a,b.cKeeps only those fields, and a dotted path goes deeper
--agentMachine mode: compact JSON, no prompts, and it never confirms anything
--confirmLets a write that asks first go ahead
--dry-runShows what a write would do, without doing it

A script can branch on the exit code:

Exit codeWhat it means
0It worked
1Something unexpected went wrong
2The command was typed wrong, or a write needed --confirm
3It wasn't found
4Buffer rejected the credentials
5Buffer failed or couldn't be reached
7You hit a rate limit, so wait and try again
10Nothing is set up yet

MCP server or CLI: which one?

Both are the same program with the same 41 tools. The difference is when your AI pays for them, in the tokens it reads.

Every message, in an app that loads every tool
MCP server
60,700 tokens
CLI
Nothing
Every message, in Claude Code
MCP server
740 tokens
CLI
Nothing
When Buffer comes up
MCP server
Nothing more, or in Claude Code the tools it picks
CLI
3,500 tokens, once
20 messages with Buffer in one, every tool loaded
MCP server
1,214,000 tokens
CLI
3,500 tokens
Works in Claude Desktop's chat
MCP server
Yes
CLI
No, there's no terminal there
Works in a script, a cron job or CI
MCP server
No
CLI
Yes

An app that loads every tool up front sends the full list with every message, whether you mention Buffer 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 Buffer 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 50 tokens.

When the whole conversation is about Buffer, 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.

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 planning posts. In Claude Code that's the /mcp panel, and every AI app has its own switch. BUFFER_READ_ONLY=1 cuts it to the 24 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.

Drafts, the queue and posting now

Every post has a mode. addToQueue puts it in the channel's next free slot, shareNext puts it at the front of the queue, customScheduled gives it a time of its own, and shareNow sends it at once. Set saveToDraft and it stays a draft, whatever the mode.

schedulingType decides how it goes out: automatic posts it for you, and notification reminds you to post it yourself, which some networks need.

Your AI checks a post with preview_operation first, on your computer. That catches a missing field or a wrong value, but not a network's own rules, which Buffer checks when the post arrives.

Content items are Buffer's newer way to plan one piece of content across several channels. They're an early preview at Buffer, so they can change, and turning a draft content item into posts can't be undone.

Watch out: A post Buffer accepted isn't published yet. Check it with get_post, because approvals, reminders and the network's own processing can all hold it back.

Every Buffer tool

The tables below list all 41 tools, grouped by what they're for. Of these, 24 only read, and 17 change something in your Buffer account.

Posts and queues

create_post
What it does
Creates a post: a draft, a queued post, a scheduled one or one that goes out now.
Kind
Asks first
delete_post
What it does
Deletes a post.
Kind
Asks first
edit_post
What it does
Changes a post's text, media, tags or schedule.
Kind
Asks first
move_post_in_queue
What it does
Moves a queued post to the top or bottom of its channel's queue.
Kind
Asks first
get_post
What it does
Reads one post, with its status.
Kind
Reads
get_posts
What it does
Lists posts, filtered by channel, status or date.
Kind
Reads

Your account and channels

get_account
What it does
Reads your Buffer account and the organizations in it.
Kind
Reads
get_channel
What it does
Reads one channel.
Kind
Reads
get_channels
What it does
Lists an organization's connected channels.
Kind
Reads
get_configuration
What it does
Reads an organization's connected channels and what each one can do.
Kind
Reads
get_daily_posting_limits
What it does
Shows how many posts each channel can still send on a given day.
Kind
Reads

Content items

add_post_to_content_item
What it does
Adds an existing post to a content item.
Kind
Asks first
get_content_item
What it does
Reads one content item.
Kind
Reads
get_content_items
What it does
Lists an organization's content items, newest first.
Kind
Reads
create_content_item
What it does
Creates a content item with a post for each channel, all or nothing.
Kind
Asks first
create_content_item_draft
What it does
Creates a content item as a draft, before you pick channels.
Kind
Asks first
delete_content_item
What it does
Deletes a content item and every post made from it.
Kind
Asks first
promote_content_item_draft_to_posts
What it does
Turns a draft content item into posts for its channels, which can't be undone.
Kind
Asks first
remove_post_from_content_item
What it does
Takes a post out of a content item, and keeps the post.
Kind
Asks first
update_content_item
What it does
Changes a content item's title or target date.
Kind
Asks first
update_content_item_draft
What it does
Replaces a content item's draft.
Kind
Asks first

Ideas and templates

create_idea
What it does
Saves a new idea.
Kind
Asks first
create_post_template
What it does
Makes a post template, for you alone or your whole organization.
Kind
Asks first
delete_post_template
What it does
Deletes a post template.
Kind
Asks first
get_idea_groups
What it does
Lists your idea groups.
Kind
Reads
get_ideas
What it does
Lists your ideas, filtered by group or tag.
Kind
Reads
get_post_template
What it does
Reads one post template.
Kind
Reads
get_post_templates
What it does
Lists the post templates you can use.
Kind
Reads
update_post_template
What it does
Changes a post template.
Kind
Asks first

Analytics and tags

get_aggregated_post_metrics
What it does
Adds up your posts' performance over a date range, by channel or tag.
Kind
Reads
get_tag
What it does
Reads one tag.
Kind
Reads
get_tags_v2
What it does
Lists your organization's tags.
Kind
Reads

Instagram audio

get_instagram_audio
What it does
Reads one Instagram audio track, for a channel connected through Facebook.
Kind
Reads
get_search_instagram_audio
What it does
Searches Instagram audio, for a channel connected through Facebook.
Kind
Reads
get_trending_instagram_audio
What it does
Lists trending Instagram audio, for a channel connected through Facebook.
Kind
Reads

Your accounts and requests

list_accounts
What it does
Lists the Buffer logins you've set up, without their keys.
Kind
Reads
graphql_query
What it does
Runs one read-only GraphQL query against Buffer's API.
Kind
Reads
graphql_mutation
What it does
Runs one GraphQL change against Buffer's API.
Kind
Asks first
preview_operation
What it does
Checks a request on your computer, before anything goes to Buffer.
Kind
Reads
query_pages
What it does
Reads up to five pages of one list at once.
Kind
Reads
get_operation_schema
What it does
Shows every field a Buffer request takes, and every field it can return.
Kind
Reads

Is the Buffer MCP server safe?

A post can reach your followers in seconds, and a deleted one is gone. So 17 tools ask first: creating, editing, moving or deleting posts, content items, ideas and templates, and any change sent as raw GraphQL. They're the ones marked "Asks first" in the tool tables above.

Reading your queue, ideas or analytics never asks, because it changes nothing.

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: true as the yes, so tell your AI to check with you first.
  • An agent with no person to ask needs BUFFER_CONFIRM=model, so its confirm: true counts in every app.
  • In a terminal, you add --confirm to the command.

If the answer is no, nothing reaches Buffer.

Make it read-only

Set BUFFER_READ_ONLY=1 and every tool that asks first disappears from the tool list, leaving 24 reading tools.

Keep a log of every write

Set BUFFER_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked, with what it was about to do and who approved it.

Watch out: Ideas and post text can come from teammates or other people, and one can try to give your AI orders. Treat them as data, and use BUFFER_READ_ONLY=1 for an agent working on its own.

Your data

Your requests go straight to Buffer, with no server of ours in between and no tracking. Your key stays in your app's config, your shell or your token file.

Media in a post goes to Buffer as a link, so it has to be reachable online. The server never uploads a file from your computer.

To cut access, delete the key in Settings, then API, and remove the server from your app's config.

Connect more than one Buffer account

One key already reaches every organization your Buffer login can see, so you need this only for a second Buffer login. Set BUFFER_ACCOUNTS to a JSON list with a name and a key, or a token file, for each one, plus an organization ID where you want it, and BUFFER_DEFAULT_ACCOUNT to the one that acts when a tool names none. Every tool takes an optional account.

An account never borrows another one's key. If the account you name has no key, the call stops instead of posting from a different login.

Buffer MCP server settings

Every setting is an environment variable, in your app's config or your shell.

BUFFER_API_KEY
Default
none
What it does
Holds your API key, or an OAuth access token
BUFFER_API_TOKEN
Default
none
What it does
Holds the same, under its other name
BUFFER_TOKEN_FILE
Default
none
What it does
Points at a private file holding the key, instead
BUFFER_ACCOUNTS
Default
none
What it does
Lists several Buffer logins, as JSON
BUFFER_DEFAULT_ACCOUNT
Default
the first one
What it does
Picks the login that acts when a tool names none
BUFFER_ORGANIZATION_ID
Default
none
What it does
Fills in an organization when a tool needs one and you don't name it
BUFFER_REQUEST_TIMEOUT_MS
Default
30000
What it does
Gives up on a Buffer request after this many milliseconds
BUFFER_MIN_REQUEST_INTERVAL_MS
Default
200
What it does
Waits this many milliseconds between requests
BUFFER_READ_ONLY
Default
off
What it does
1 hides every tool that changes something
BUFFER_ALLOW_DESTRUCTIVE
Default
on
What it does
0 refuses the tools that ask first
BUFFER_AUDIT_LOG
Default
none
What it does
Names a file that gets one line per attempted write
BUFFER_SURFACE
Default
full
What it does
search lists three tools that find, describe and run the rest
BUFFER_TOOL_TIMEOUT_MS
Default
none
What it does
Gives up on any tool after this many milliseconds
BUFFER_CONFIRM
Default
human
What it does
model lets your AI's confirm: true approve on its own, for an agent with no person to ask
BUFFER_HTTP_PORT
Default
8787
What it does
Sets the port for --http
BUFFER_HTTP_HOST
Default
127.0.0.1
What it does
Sets the address for --http, and any other needs a token
BUFFER_HTTP_TOKEN
Default
none
What it does
Sets the bearer token every --http request needs
BUFFER_HTTP_ALLOWED_ORIGINS
Default
none
What it does
Lists other websites allowed to call --http, comma separated
BUFFER_DEBUG
Default
off
What it does
1 prints debug lines

Troubleshooting

Run the doctor first. It names the step that failed and the fix.

What you seeWhat to do
The key check failsThe key was mistyped or deleted. Make a new one in Settings, then API
A 429 errorYou've hit one of Buffer's windows: 100 requests in 15 minutes, or your plan's daily or monthly limit. Wait, then try again
A post was accepted but didn't go outCheck its status. Approvals, reminders and the network's own processing can hold it back
Analytics come back emptyAnalytics need an API key, not an OAuth token, and they update once a day. Check the date range
Instagram audio says the channel needs a refreshInstagram audio needs a channel connected through Facebook Login. Reconnect it that way in Buffer
A field you asked for is unknownRun get_operation_schema to see the fields each request can return
"…so it will not run without confirm: true"That's the safety check working. Approve it when your app asks

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.

FAQs about the Buffer MCP server & CLI

Here are the questions people ask most about the Buffer MCP server and CLI.

The Buffer MCP server & CLI is a free, open source program that lets an AI app like Claude, Codex or Cursor plan and publish posts in your Buffer account.

It has 41 tools for channels, posts, queues, ideas, templates, content items and analytics, 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.

Every server I've made is on my MCP servers page.

The Buffer CLI is the same program as the Buffer 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.

One npm package installs both.

Use the Buffer 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 Buffer MCP server is free and open source under the AGPL-3.0-or-later license.

Buffer's API works on every plan, Free included, so the only thing you pay for is your own AI app.

Yes, Buffer's Free plan includes one API key, with up to 100 requests every 15 minutes, 250 a day and 3,000 a month.

Paid plans allow more keys and more requests.

Yes, a post with the shareNow mode goes out at once, after you approve it.

Drafts, queued posts and scheduled posts wait for their time.

Yes, it adds up your posts' performance over a date range of up to a year, by channel or tag.

That needs an API key, because Buffer's OAuth tokens can't read analytics.

Yes, the Buffer MCP server connects as many Buffer logins as you set up in BUFFER_ACCOUNTS, each with its own key.

One key already reaches every organization its login can see.

To disconnect the Buffer MCP server, delete its key in Buffer's Settings, then API, which cuts access right away.

Then remove the server from your AI app's config.

The Buffer MCP server works with any app that speaks MCP.

That includes Claude Code, Claude Desktop, Codex, Cursor, VS Code, Windsurf, Zed, Cline, GitHub Copilot CLI, Gemini CLI, OpenCode, OpenClaw, Antigravity and Hermes.

I did.

I'm Navid Moazzez, and I made the Buffer 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 AGPL-3.0-or-later license, and the package is on npm.

More MCP servers & CLIs

Related free tools

Navid Moazzez

AI business strategist

Navid Moazzez helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life.

Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Read the affiliate disclaimer.

Free AI newsletter

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.

Loved by 10,000+ readers
Loved by 10,000+ readers