Skip to content

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

AgentHow you add PostPenSign-in
Claude (web and desktop)Custom connector with https://mcp.postpen.aiBrowser, click Allow
Claude Codeclaude mcp add --transport http postpen https://mcp.postpen.aiRun /mcp
ChatGPT (web)Add custom MCP server with https://mcp.postpen.aiBrowser, click Allow
Grok BotAdd https://mcp.postpen.ai (settings on app.postpen.ai/agents)Browser, click Allow
Cursor"Add to Cursor" button, or mcp.jsonBrowser, click Allow
VS Code"Add to VS Code" button, or MCP: Add ServerBrowser, click Allow
Muse by MetaAsk Muse in chat to create a custom connectorBrowser, click Allow
Codex CLIcodex mcp add postpen --url https://mcp.postpen.aicodex mcp login postpen
Gemini CLIgemini mcp add --transport http postpen https://mcp.postpen.ai/mcp auth postpen
Bots without MCPHTTP API, spec at https://postpen.ai/openapi.jsonBearer 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.

  1. In Claude, go to Customize > Connectors.
  2. Click + Add, then Add custom connector.
  3. Enter a name, for example PostPen.
  4. Paste https://mcp.postpen.ai as the remote MCP server URL and click Continue.
  5. Review the authentication settings Claude detected and click Continue.
  6. Under Authentication, choose Sign in now (or Sign in when needed).
  7. Under OAuth client, keep Use Claude's published identity (Recommended). PostPen also supports Register automatically. Leave request headers empty.
  8. Click Add, then sign in to PostPen in the browser and click Allow.
  9. 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."

  1. In ChatGPT, go to Plugins.
  2. Select the plus button, then select Add custom MCP server.
  3. Enter a name, for example PostPen, and optionally a description.
  4. Under Connection, enter https://mcp.postpen.ai.
  5. Configure authentication for the server. PostPen uses OAuth, so when your browser opens, sign in to PostPen and click Allow.
  6. Review the risk warning and select the I understand and want to continue checkbox.
  7. Select Create as a plugin, then review the discovered tools and metadata. You should see the PostPen tools, such as save_draft and schedule_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.

  1. Add https://mcp.postpen.ai as an MCP server in Grok Bot.
  2. A browser opens. Sign in to PostPen and click Allow.
  3. Ask Grok Bot to run list_destinations to 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):

  1. Open the Command Palette and run MCP: Add Server.
  2. Choose an HTTP server and paste https://mcp.postpen.ai.
  3. Name it postpen and save it to your workspace (.mcp.json) or to your global configuration.
  4. 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.

  1. In a Muse chat, ask it to create a custom connector for PostPen with the MCP server URL https://mcp.postpen.ai.
  2. Follow Muse's prompts, then sign in to PostPen in the browser and click Allow.
  3. Ask Muse to run list_destinations to 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:

  1. list_destinations to see where it may post: your profile and each connected company page.
  2. save_draft with the text and the company page's destination id.
  3. schedule_post with the draft id and a scheduled_for time, for example 2026-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.

ToolWhat it does
list_destinationsLists your profile and each connected company page, plus any X, Facebook, Instagram, Threads or YouTube accounts you connected
save_draftSaves or updates a post; can tag company pages and add a first comment
create_uploadPrivate upload link for an image, video or PDF
schedule_postQueues a draft for a future time
unschedule_postMoves a scheduled post back to drafts (needs confirm)
list_postsReads drafts, scheduled or sent posts
publish_nowPosts immediately; refused unless confirm is true
delete_draftDeletes an unsent draft (needs confirm)
get_post_statsImpressions, reach, reactions, comments, reposts and engagement rate
list_commentsReads comments on company page posts
get_insightsAccount growth over the last N days (7 to 90) against the previous period, and flags posts that beat your usual
list_inspirationCurated LinkedIn posts that did well, with why each worked
get_inspirationOne of those posts in full, with its author
list_promptsYour Social Prompts and PostPen's public prompt library
get_promptOne 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_now is refused unless the call includes confirm: 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_draft and unschedule_post require confirm: true.

To disconnect, you have three options:

  1. Remove PostPen from your agent's connector or MCP settings.
  2. Revoke the API key on https://app.postpen.ai/agents. Agents using it are cut off right away.
  3. 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.

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.

Start free or connect your agent.