Claude Code LinkedIn MCP: setup in one command
MagicPost is a hosted LinkedIn MCP server that you add to Claude Code with claude mcp add --transport http magicpost https://mcp.magicpost.in/mcp, then /mcp to sign in. After that, Claude Code can draft, schedule and publish LinkedIn posts, attach files from your machine and pull your post metrics into a file. Cursor takes a block in mcp.json, Codex a table in config.toml; both are below.
- Server URL
https://mcp.magicpost.in/mcp- Authentication
- OAuth sign-in, no API key
- Plan
- Creator: $48 (€41) per month, or $27 (€23) per month billed yearly
- Tools available
- 108
- Tested on
- Version tested
- MagicPost connector for Claude, run in Claude Code
Nothing runs on your machine: the server is hosted, so there is no package to install and no process to keep alive.
The three runs further down were made in Claude Code, through the MagicPost connector of a Claude account. Writes went to a managed test account with no LinkedIn profile attached, and every draft is prefixed with [TEST MCP]. The Cursor and Codex sections are configuration only: they come from MagicPost's Connect a tool window and from each tool's own documentation, and were not part of the runs. The account figures in the third run are rounded.
Connection steps
Claude Code: add the server
Run this in a terminal:
claude mcp add --transport http magicpost https://mcp.magicpost.in/mcpBy default the server is registered for you, in the current project. Per the Claude Code documentation,
--scope usermakes it available in all your projects, and--scope projectwrites it to.mcp.jsonat the project root so the team shares it.Claude Code: sign in with /mcp
Start Claude Code, type
/mcp, select magicpost and follow the browser. The MagicPost page shows the account email and the requested access; click Authorize. From a shell,claude mcp login magicpostruns the same flow.claude mcp listthen shows the server, and MagicPost lists a Claude Code row in Your connections, separate from the Claude row of the web connector.Claude Code: reuse the connector of your Claude account
If MagicPost is already a connector on your Claude account, the Claude Code documentation says it is available automatically when you are signed in to Claude Code with that claude.ai account, and
/mcpmarks it as coming from claude.ai. Our runs used this route.A server added by command takes precedence over a connector that points at the same URL:
/mcpthen lists the connector as hidden.Cursor: one block in mcp.json
MagicPost's window gives this block to add to your
mcp.jsonfile:{ "mcpServers": { "magicpost": { "url": "https://mcp.magicpost.in/mcp" } } }Cursor's documentation places the file at
~/.cursor/mcp.jsonfor every project, or at.cursor/mcp.jsoninside one project. Log in to MagicPost when Cursor prompts you.Codex: one table in config.toml
For Codex, MagicPost's window only says to add a custom MCP connector with the OAuth connection. OpenAI's Codex documentation gives the detail: in
~/.codex/config.toml, add a table[mcp_servers.magicpost]with the lineurl = "https://mcp.magicpost.in/mcp", then runcodex mcp login magicpost.The same page states that the Codex CLI, the IDE extension and the ChatGPT desktop app share this configuration.
Limits
- Its own connection. Claude Code added by command is a separate connection from Claude on the web and has its own row in MagicPost.
- Output size. Claude Code warns when one tool answer passes 10,000 tokens and stops at 25,000 by default;
MAX_MCP_OUTPUT_TOKENSraises the ceiling. Long reads are paged on the MagicPost side:list_linkedin_post_metricsreturns at most 100 posts per call, with a cursor for the next page. - Tool loading. Claude Code defers tool definitions until they are needed and sets no fixed cap on tools per server, so the 108 MagicPost tools do not fill the context at startup.
- API key sessions. Connectors from claude.ai load only when Claude Code is signed in with a claude.ai subscription. With
ANTHROPIC_API_KEYor a cloud provider as the active credential, add the server by command. - Local files. The upload slot for a local file is short-lived: in our run it was valid for 900 seconds and accepted an image of up to 52,428,800 bytes.
- Request limits. Post generation is capped at 3 per minute, 20 per day and 50 per week per account. A loop that drafts in bulk hits the minute cap first.
- Cursor approvals. Cursor's documentation says it asks for approval before using an MCP tool by default.
- MagicPost plan. The server answers accounts on Creator and above, $48 (€41) per month, and accounts in free trial. On Growth the authorization page shows Restricted API access.
Prompts and answers
Other ways to connect Claude Code to LinkedIn
stickerdaniel/linkedin-mcp-server
Open source under Apache-2.0, self-hosted with uvx or Docker, with plugins listed for Claude Code, Codex and Cursor. It is the most starred LinkedIn MCP repository on GitHub (4,340 stars on November 29, 2026). It drives a real browser through Patchright, with your LinkedIn login stored at ~/.linkedin-mcp/profile/. 26 tools: profiles, connections, messaging, companies, jobs, search. No tool creates a post or a comment.
- Difference
- The README warns: "Automated access may violate LinkedIn's terms and can lead to account restrictions." It reads and messages; it does not publish. MagicPost publishes through LinkedIn's official API, with no session cookie and no LinkedIn password.
bcharleson/linkedincli
A CLI and local MCP server, MIT licensed, for Claude Code, Cursor and Windsurf. Its README states the method: "This tool uses LinkedIn's internal Voyager API via cookie session authentication." Setup asks for two cookies, li_at and JSESSIONID. All 43 commands are available as MCP tools, three of them for posts (create, edit, delete). A small project: 75 stars.
- Difference
- The README says the
li_atcookie expires periodically and can be invalidated at once when the client does not look like Chrome, and that the authors are not responsible for account restrictions. MagicPost never asks for a cookie: you authorize it on LinkedIn's own screen.
southleft/linkedin-mcp
A self-hosted hybrid, MIT licensed, that announces 83 tools. Posting goes through LinkedIn's official API, with a LinkedIn Developer app that you create yourself. Messaging, connection requests and people search use browser session cookies on LinkedIn's unofficial API. Profile research relies on a RapidAPI subscription.
- Difference
- Its README rates the cookie layer lowest, as prone to blocking, and says browser cookies expire every 24 to 48 hours. With MagicPost there is no developer app to register and no cookie to refresh: the server is hosted and the LinkedIn authorization is already in place on your account.
Composio
A hosted LinkedIn toolkit over MCP with 31 tools, on LinkedIn's official API through OAuth2, with Claude Code and Codex in its list of supported frameworks. It creates posts, comments and media uploads and reads share statistics. Its list has no scheduling tool and no messaging tool. Free plan available.
- Difference
- Pick Composio to wire LinkedIn into an agent you are building. Pick MagicPost when you want the LinkedIn work itself done from the terminal: drafts in your style, a schedule, a paced engagement queue, post metrics.
What Claude Code can do once connected
Posts & media
Claude Code can send a file straight from disk, which a chat assistant cannot always do. It can also write the HTML of a visual itself: one slide becomes an image, 2 to 20 slides become a PDF carousel, rendered by MagicPost with scripts and network blocked.
attach_html_slidesprepare_post_media_uploadcomplete_post_media_uploadlist_media_libraryattach_library_media_to_post
Analytics
Post lists come back as structured data, newest first, with nulls where a metric was not collected. Keep nulls as nulls in whatever you export, since a zero means LinkedIn answered zero.
list_linkedin_post_metricsget_metrics_summarysync_received_comments
Team & agency
With an administrator account, one session covers every member of the organization: pass the member and the tool runs as if you had switched to that account in the app.
list_org_memberslist_org_member_postsget_team_activitymanage_org_group
Engagement
Likes, comments and replies never leave all at once. They enter a queue that MagicPost paces, and a queued action can be read back or cancelled.
list_engagement_queuecancel_queued_engagementget_engagement_activity
Troubleshooting
/mcp shows magicpost as needing authentication
Select it in /mcp and complete the sign-in in the browser, or run claude mcp login magicpost. To drop the stored sign-in, the /mcp menu has Clear authentication.
The MagicPost connector from claude.ai is missing in Claude Code
Run /status. The Claude Code documentation says claude.ai connectors are not loaded when an API key, an auth token or a third-party provider is the active credential. Sign in with /login and your claude.ai account, or add the server with the command.
The file upload fails on the network
The server's own answer covers this case, under if_upload_blocked: do not retry. If you built the file yourself, rebuild it as HTML slides and send those. Otherwise ask for a drop link for the draft and drop the file from a browser.
Creating a draft for a managed account is refused
During the runs, new drafts on the managed account went through create_member_post. create_or_update_post creates on your own account and only edits a member's existing post.
About MagicPost
MagicPost is the LinkedIn tool to write, schedule and analyze your posts, in your own voice and through LinkedIn's official API.
Try MagicPost