To connect LinkedIn and X to Claude Code, add Flaghand's MCP server and sign in:
claude mcp add --transport http --scope user flaghand https://app.flaghand.com/mcp
Then run / in Claude Code, pick flaghand and sign in. Claude Code can then draft LinkedIn and X posts from your
work, such as what you shipped this week, and send them to you for approval. You approve each exact post with your
passkey, and Flaghand posts it.
Checked on October 28, 2026, with Claude Code 2.1.312, against Claude Code's MCP docs and Flaghand's setup docs, linked under Sources.
Connect it in four steps
Get a Flaghand account and connect your accounts. Start here, then connect your LinkedIn profile and X account under Settings › Account. Each network shows its own sign-in; Flaghand never asks for your LinkedIn password or browser cookies. Or let Claude Code do the setup: ask it to read
https://and set Flaghand up for you. It signs you up over Flaghand's API and hands you only the links that need you: sign-up, billing, and LinkedIn's and X's own consent screens.app .flaghand .com/ docs/ setup .md Add the server. Run the command above in your terminal.
--scope usermakes Flaghand available in every project; leave it out to add it to the current project only.Sign in. In Claude Code, run
/, select flaghand and choose to authenticate. Flaghand's page opens in your browser: sign in with your passkey, Google or email and click Allow (pick the workspace first if you have more than one).mcp claude mcp login flaghanddoes the same from the terminal.Ask for a post. In a project, try:
Use Flaghand: draft a LinkedIn post and an X thread about what I shipped this week, from the git log, and send them to me for approval.
Claude Code writes the posts, Flaghand checks them against each network's rules, and Claude Code gives you one approval link for the plan. Open it on your phone or computer, look at the posts as LinkedIn and X will show them, and approve with Face ID, Touch ID or a security key. Nothing posts until you do.
Or install the plugin
The Flaghand plugin installs the server and Flaghand's skill (its instructions for Claude) together. In Claude Code:
/plugin marketplace add https://app.flaghand.com/agent-plugin/marketplace.json
/plugin install flaghand@flaghand
Then sign in through / as above. Use the plugin or the claude mcp add command, not both. The plugin adds
/, which drafts posts from what your repository merged in the last 7 days, or since a date you give
it.
With a token instead of a sign-in
For a script or a machine without a browser, create a token in Flaghand under Settings › Agents › Create token (it's shown once), keep it in your secret store, and pass it as a header:
claude mcp add --transport http --scope user flaghand https://app.flaghand.com/mcp --header 'Authorization: Bearer ${FLAGHAND_TOKEN}'
The single quotes keep ${FLAGHAND_TOKEN} as a reference, so Claude Code saves the variable's name, not the token.
Start Claude Code with FLAGHAND_TOKEN set from your secret store.
What Claude Code can and can't do through Flaghand
| X (Twitter) | ||
|---|---|---|
| Draft | Posts on your personal profile, up to 3,000 characters, with up to 20 photos, one video, one PDF document or a link card | Posts and threads of 2 to 25 posts, with up to 4 photos or one video on each |
| Check | Length, media, company-page tags and the posting time | X's own character count, media, replies and the posting time |
| Approve, schedule or post | No. Only you, with your passkey | No. Only you, with your passkey |
| After posting | The post's link. LinkedIn doesn't let Flaghand read the post back | Flaghand reads the post back and compares it with what you approved |
The sign-in and the default token both have four scopes: read, drafts, media and request-approval. No scope
can approve, schedule or post, so Flaghand's server refuses Claude Code if it tries. Flaghand posts to LinkedIn only
through LinkedIn's official API and only to your personal profile. It doesn't read profiles, your feed, messages or
jobs.
Flaghand's server also offers ready-made prompts as slash commands, such as /,
/ and /. Type / to see them.
Questions
Is there a Twitter (X) MCP for Claude Code? The same server drafts X posts and threads. One approval can cover a whole plan, such as an X thread and a LinkedIn post together.
Can Claude Code post to LinkedIn without asking me? No. Approving takes your passkey, and no Flaghand token can approve, schedule or post. The server checks your signed approval again right before it posts.
Can it post photos from my project? Yes. Claude Code uploads them to Flaghand with alt text, and they're part of what you approve.
How do I take Claude Code's access away? In Flaghand, open Settings › Agents and click Revoke. Or run
claude mcp remove flaghand.
Other apps
The same server works in Claude, ChatGPT, Codex, Cursor and Gemini. The LinkedIn MCP server explains what Flaghand does on LinkedIn; the X MCP server and the X API and MCP servers, compared covers X, and Flaghand compared sets it beside other schedulers and posting APIs.
Sources
All read on October 28, 2026.
- Claude Code: MCP, plugin marketplaces
- Flaghand: set up and connect, agents: the Claude Code plugin and prompts, sign-in and tokens
Claude Code is a trademark of Anthropic. LinkedIn and X are trademarks of their owners. Flaghand isn't affiliated with or endorsed by them.