LinkedIn MCP: connect Claude, ChatGPT, Cursor and other AI agents
By PostPen Team · · Updated
A LinkedIn MCP server lets your AI agent post to LinkedIn through the Model Context Protocol. With PostPen, add https://mcp.postpen.ai as a custom connector in Claude or as a custom MCP server in ChatGPT, or run claude mcp add --transport http postpen https://mcp.postpen.ai in Claude Code, then sign in to PostPen and click Allow. Your agent can then save drafts, schedule posts and read post stats for your LinkedIn profile (and company pages on the Organization plan), and it never sees your LinkedIn token.
Start free. The Free plan includes up to 10 posts a month on one personal profile.
This LinkedIn MCP guide covers every agent. If you only use Claude, see PostPen for Claude.
The steps below work the same way for every agent. You add one URL, sign in once, and your agent gets every PostPen tool. The rest of this guide covers each agent, your first post, safety and troubleshooting.
PostPen is an independent service and isn't affiliated with or endorsed by LinkedIn.
What a LinkedIn MCP server does
Your agent connects to one URL, https://mcp.postpen.ai, over MCP. The agent opens a browser, and you sign in to PostPen and click Allow.
From then on, your agent has tools to save drafts, schedule posts and read post stats, such as save_draft, schedule_post and get_post_stats. It never sees or sends your LinkedIn token.
What you need
A PostPen account with LinkedIn connected
Sign in to PostPen and connect LinkedIn once. Company pages you admin come from the same login, so there is no second account to manage.
The Free plan covers 1 personal profile. Posting to company pages needs the Organization plan ($29/month, personal profile plus 2 company pages). See plans and company pages for details.
The LinkedIn MCP server URL
PostPen's server URL is https://mcp.postpen.ai. It is a remote MCP server over Streamable HTTP with OAuth 2.1 sign-in, as described in PostPen's https://postpen.ai/llms.txt. You paste the same URL into every agent.
If MCP is new to you, the Model Context Protocol is an open standard that lets AI apps connect to outside tools. A LinkedIn MCP connector is one of those tools.
How sign-in works
Your agent opens a browser. You sign in to PostPen, then click Allow, and you are sent back to the chat.
No API key is needed for MCP clients. A bearer API key is only for agents that can't open a browser or need a fixed header.
Quick reference: every agent at a glance
| Agent | How you add PostPen | Sign-in |
|---|---|---|
| Claude (web and desktop) | Custom connector with https://mcp.postpen.ai | Browser, click Allow |
| Claude Code | claude mcp add --transport http postpen https://mcp.postpen.ai | Run /mcp |
| ChatGPT (web) | Add custom MCP server with https://mcp.postpen.ai | Browser, click Allow |
| Grok Bot | Add https://mcp.postpen.ai (settings on app.postpen.ai/agents) | Browser, click Allow |
| Cursor | "Add to Cursor" button, or mcp.json | Browser, click Allow |
| VS Code | "Add to VS Code" button, or MCP: Add Server | Browser, click Allow |
| Muse by Meta | Ask Muse in chat to create a custom connector | Browser, click Allow |
| Codex CLI | codex mcp add postpen --url https://mcp.postpen.ai | codex mcp login postpen |
| Gemini CLI | gemini mcp add --transport http postpen https://mcp.postpen.ai | /mcp auth postpen |
| Bots without MCP | HTTP API, spec at https://postpen.ai/openapi.json | Bearer API key |
The setup page at https://app.postpen.ai/agents has install buttons and copy-ready settings for each agent. Connect your agent.
LinkedIn MCP in Claude and Claude Code
PostPen's LinkedIn MCP for Claude works in the Claude apps and in Claude Code, with the same URL and sign-in. For how MCP works in Claude in general, see Claude MCP.
Claude (web and desktop app)
A Claude LinkedIn connector is added as a custom connector. These steps follow Anthropic's help article on custom connectors using remote MCP, checked 2026-10-19, for individual Pro and Max plans.
- In Claude, go to Customize > Connectors.
- Click + Add, then Add custom connector.
- Enter a name, for example
PostPen. - Paste
https://mcp.postpen.aias the remote MCP server URL and click Continue. - Review the authentication settings Claude detected and click Continue.
- Under Authentication, choose Sign in now (or Sign in when needed).
- Under OAuth client, keep Use Claude's published identity (Recommended). PostPen also supports Register automatically. Leave request headers empty.
- Click Add, then sign in to PostPen in the browser and click Allow.
- In a chat, open the + menu, choose Connectors, and turn PostPen on.
On Team and Enterprise plans, an Owner adds the connector first, then each member connects to it. Anthropic's article says Free users are limited to one custom connector (checked 2026-10-19).
Claude Code
PostPen's LinkedIn MCP for Claude Code takes one command. Run it in your terminal:
claude mcp add --transport http postpen https://mcp.postpen.ai
Then run /mcp inside Claude Code to sign in, or run claude mcp login postpen from your terminal. Your browser opens, you sign in to PostPen and click Allow. Anthropic documents the claude mcp add --transport http form in its Claude Code MCP docs (checked 2026-10-19).
A note on "LinkedIn post generator" skills
Some people search for a Claude LinkedIn integration that writes posts. Your agent can write the post through the PostPen tools, and PostPen schedules and publishes it. In the app, the Composer's AI Assist tab can write it too, for 1 credit per Generate.
If you searched for a LinkedIn post generator MCP, your agent is the generator; PostPen is the publishing step.
LinkedIn MCP in ChatGPT
A ChatGPT LinkedIn integration works the same way. To add PostPen's LinkedIn MCP server, ChatGPT uses a custom MCP server entry. For how MCP works in ChatGPT in general, see ChatGPT MCP.
These steps follow OpenAI's help article on connecting custom MCP servers in ChatGPT, checked October 26, 2026. Per that article (checked October 26, 2026), "Custom MCP server connections and full MCP support are available for ChatGPT Business and Enterprise/Edu customers on ChatGPT web." Per the same article (checked October 26, 2026), "Only admins and owners can create and publish plugins for custom MCP servers for a Business workspace."
- In ChatGPT, go to Plugins.
- Select the plus button, then select Add custom MCP server.
- Enter a name, for example
PostPen, and optionally a description. - Under Connection, enter
https://mcp.postpen.ai. - Configure authentication for the server. PostPen uses OAuth, so when your browser opens, sign in to PostPen and click Allow.
- Review the risk warning and select the I understand and want to continue checkbox.
- Select Create as a plugin, then review the discovered tools and metadata. You should see the PostPen tools, such as
save_draftandschedule_post.
PostPen needs write actions to save and schedule posts, so your ChatGPT account or workspace must allow custom MCP servers with write actions. Per OpenAI's help article (checked October 26, 2026), "Pro users can connect custom MCP servers with read/fetch permissions." So on Pro you can connect PostPen, but you can't publish posts through it.
If your ChatGPT account or workspace can't add custom MCP servers with write actions, use another agent from the table above, or the HTTP API.
As with Claude, ChatGPT can write the post through the PostPen tools, and PostPen schedules and publishes it.
Grok Bot
Grok Bot connects to PostPen as a remote MCP server, the same way as other agents.
- Add
https://mcp.postpen.aias an MCP server in Grok Bot. - A browser opens. Sign in to PostPen and click Allow.
- Ask Grok Bot to run
list_destinationsto check the connection.
The exact Grok Bot settings are on your setup page.
Cursor and Grok Bot receive the sign-in on the same local port. Quit one while you connect the other.
Cursor
You can install PostPen with the Add to Cursor button on postpen.ai or on the setup page. It installs PostPen in Cursor and starts the browser sign-in.
If you prefer a config file, Cursor reads MCP servers from ~/.cursor/mcp.json (global) or .cursor/mcp.json (one project), per Cursor's MCP docs (checked 2026-10-19). Add this entry:
{
"mcpServers": {
"PostPen": {
"url": "https://mcp.postpen.ai"
}
}
}
Save the file, then sign in to PostPen and click Allow when Cursor opens the browser. After that, you can also manage the server from Cursor's Customize page.
VS Code
Use the Add to VS Code button on postpen.ai or the setup page. VS Code adds an HTTP MCP server named postpen pointing at https://mcp.postpen.ai.
To add it by hand, follow VS Code's MCP server docs (checked 2026-10-19):
- Open the Command Palette and run
MCP: Add Server. - Choose an HTTP server and paste
https://mcp.postpen.ai. - Name it
postpenand save it to your workspace (.mcp.json) or to your global configuration. - Sign in to PostPen in the browser and click Allow.
Muse by Meta
Muse connects to PostPen as a remote MCP server. It adds outside services as custom connectors, which you set up by asking Muse in chat. Steps follow the Meta Help Center, checked 2026-10-19.
- In a Muse chat, ask it to create a custom connector for PostPen with the MCP server URL
https://mcp.postpen.ai. - Follow Muse's prompts, then sign in to PostPen in the browser and click Allow.
- Ask Muse to run
list_destinationsto check the connection.
Meta notes that it doesn't review custom connectors, so only add services you trust.
LinkedIn MCP in Codex CLI and Gemini CLI
Terminal agents take one command, then a sign-in.
For Codex CLI:
codex mcp add postpen --url https://mcp.postpen.ai
codex mcp login postpen
For Gemini CLI, run the first command in your shell, then /mcp auth postpen inside Gemini CLI:
gemini mcp add --transport http postpen https://mcp.postpen.ai
Both commands are copied from PostPen support and llms.txt (checked 2026-10-19).
Any other MCP client
PostPen is a remote MCP server over Streamable HTTP with OAuth sign-in. If your client can add a remote MCP server, paste https://mcp.postpen.ai. Sign in to PostPen when the browser opens and click Allow.
No MCP? Use the HTTP API
Bots that can only send HTTP requests can call the same tools. Create an API key at https://app.postpen.ai/agents and send it as Authorization: Bearer.
The spec is at https://postpen.ai/openapi.json. For request examples, see how to post to LinkedIn with an API.
Your first post from the agent
Once connected, try a prompt like this:
Turn my notes from today's standup into a LinkedIn post. Schedule it for my company page on Thursday at 9am.
Your agent writes the text. Behind the scenes it calls three tools:
list_destinationsto see where it may post: your profile and each connected company page.save_draftwith the text and the company page'sdestinationid.schedule_postwith the draftidand ascheduled_fortime, for example2026-10-15T09:00:00-04:00.
PostPen publishes the post when it's due, even if the chat is closed. After it goes out, your agent can call get_post_stats to read impressions, reach, reactions, comments and reposts.
What the agent can do once connected
A short list of tools. That's the whole surface.
| Tool | What it does |
|---|---|
list_destinations | Lists your profile and each connected company page, plus any X, Facebook, Instagram, Threads or YouTube accounts you connected |
save_draft | Saves or updates a post; can tag company pages and add a first comment |
create_upload | Private upload link for an image, video or PDF |
schedule_post | Queues a draft for a future time |
unschedule_post | Moves a scheduled post back to drafts (needs confirm) |
list_posts | Reads drafts, scheduled or sent posts |
publish_now | Posts immediately; refused unless confirm is true |
delete_draft | Deletes an unsent draft (needs confirm) |
get_post_stats | Impressions, reach, reactions, comments, reposts and engagement rate |
list_comments | Reads comments on company page posts |
get_insights | Account growth over the last N days (7 to 90) against the previous period, and flags posts that beat your usual |
list_inspiration | Curated LinkedIn posts that did well, with why each worked |
get_inspiration | One of those posts in full, with its author |
list_prompts | Your Social Prompts and PostPen's public prompt library |
get_prompt | One prompt's full instructions |
list_comments works on company page posts only, so PostPen can't read comments on personal posts (PostPen llms.txt, checked 2026-10-23).
Then open the calendar at app.postpen.ai. Every draft and scheduled post shows up there, whichever agent made it. You can edit, move or delete anything before it goes out.
Is it safe to let an agent post to LinkedIn?
You stay in control at each step:
- The token stays on PostPen. Your LinkedIn connection stays on PostPen's server. No tool accepts or returns a LinkedIn token.
- Publishing now needs a confirm.
publish_nowis refused unless the call includesconfirm: true. - Everything lands on the calendar first. Drafts and scheduled posts appear in one month view for review.
- Deletes and unschedules need a confirm too.
delete_draftandunschedule_postrequireconfirm: true.
To disconnect, you have three options:
- Remove PostPen from your agent's connector or MCP settings.
- Revoke the API key on
https://app.postpen.ai/agents. Agents using it are cut off right away. - Disconnect LinkedIn on the LinkedIn page inside PostPen.
Troubleshooting
These fixes come from PostPen support.
- The agent still says it needs authentication. Remove PostPen from the agent, add it again with
https://mcp.postpen.ai, and click Allow in the browser. - Sign-in never finishes. Keep the agent app open until the browser says authorization is complete.
- Cursor or Grok Bot won't connect. Both receive the sign-in on the same local port. Quit one while you connect the other.
- The browser asks to open the agent app. Choose Open after you click Allow.
- A post did not publish. Open the calendar; a failed post shows the reason. If LinkedIn is disconnected, reconnect it and schedule the post again.
FAQ
PostPen is an independent service. It is not affiliated with or endorsed by LinkedIn.
No. MCP clients like Claude and ChatGPT sign in through the browser: you sign in to PostPen and click Allow. An API key is only for agents that need a header or can't open a browser.
No. You connect LinkedIn once inside PostPen and the token stays on PostPen's server. No tool accepts or returns a LinkedIn token.
publish_now only runs when the call includes confirm: true. Drafts and scheduled posts show up on your calendar first, where you can edit, move or delete them.
Yes, on the Organization plan: your personal profile plus 2 company pages you admin, from one LinkedIn login. For more than 2 pages, contact PostPen about Enterprise.
Your agent can write the post through the PostPen tools, and PostPen schedules and publishes it. In the app, the Composer also has AI Assist: one Generate writes the text for all your networks, plus a version for each network within its limits, for 1 credit. Paid plans have unlimited credits; Free has a limited number.
Give your agent a way to post
Connect LinkedIn, add https://mcp.postpen.ai to your agent, and check the calendar when you want. The Free plan includes up to 10 posts a month.
