Skip to content

How to connect the LinkedIn MCP to Claude, ChatGPT, Cursor and other AI agents

By PostPen Team ·

To connect a LinkedIn MCP server to Claude with PostPen, add https://mcp.postpen.ai as a custom connector, or run claude mcp add --transport http postpen https://mcp.postpen.ai in Claude Code. Then sign in to PostPen in the browser 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 covers 10 published posts a month on one personal profile.

The steps below work the same way for every agent. You add one URL, sign in once, and your agent gets eleven tools. 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 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 (Business, Enterprise, Edu on 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.

Claude / Claude Code

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-09, 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-09).

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.

A note on "LinkedIn post generator" skills

Some people search for a Claude LinkedIn integration that writes posts. PostPen does not write posts. Your agent writes it, and PostPen schedules and publishes it.

If you searched for a LinkedIn post generator MCP, your agent is the generator; PostPen is the publishing step.

ChatGPT

A ChatGPT LinkedIn integration works the same way: you add PostPen's LinkedIn MCP server to ChatGPT as a custom MCP server. Check your plan first, because write actions are limited. These steps follow OpenAI's developer page Connect and test your plugin, checked 2026-10-09.

You need developer mode turned on (see the plan note below).

  1. Go to ChatGPT Plugins (chatgpt.com/plugins).
  2. Select the plus button, then Add custom MCP server.
  3. Enter a name and description, for example PostPen and "Schedule LinkedIn posts".
  4. Under Connection, enter https://mcp.postpen.ai.
  5. Configure authentication, review the risk warning, and select I understand and want to continue.
  6. Select Create as a plugin, then sign in to PostPen in the browser and click Allow.
  7. Review the tools ChatGPT discovered. You should see the eleven PostPen tools.

Custom MCP servers with write actions, which PostPen needs to save and schedule posts, are currently in beta on ChatGPT Business, Enterprise and Edu on the web. Pro accounts can only connect MCP servers with read/fetch permissions, per OpenAI's help article on developer mode and MCP apps (checked 2026-10-09). On a Business workspace, only admins can turn on developer mode.

If your ChatGPT plan can't add write-capable MCP servers, use another agent from the table above, or the HTTP API.

As with Claude, there is no ChatGPT LinkedIn plugin that writes posts for you here. ChatGPT writes the post, and PostPen 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

The fastest route is 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. 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:

  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-09.

  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.

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.

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 eleven 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

Eleven tools. That's the whole surface.

ToolWhat it does
list_destinationsLists your profile and each connected company page
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–90) against the previous period, and flags posts that beat your usual

list_comments works on company page posts only. LinkedIn does not allow apps to read comments on personal posts.

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

Is there an official LinkedIn MCP server?

PostPen is an independent service. It is not affiliated with or endorsed by LinkedIn.

Do I need an API key to connect Claude or ChatGPT?

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.

Does my agent see my LinkedIn token?

No. You connect LinkedIn once inside PostPen and the token stays on PostPen's server. No tool accepts or returns a LinkedIn token.

Can my agent publish without asking me?

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.

Can the agent post to my company page?

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.

Does PostPen write the posts?

No. Your agent writes the post, and PostPen schedules and publishes it. You can also write and schedule posts by hand in the app.

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 covers 10 published posts a month.

Start free or connect your agent.