linkedin-mcp
Enables publishing and scheduling LinkedIn posts through the official API, with content calendar and post brief tools for consistent growth.
README
<div align="center">
linkedin-mcp
Publish and schedule posts on your own LinkedIn — from an AI assistant, via the official API.
An MCP server that lets Claude (or any MCP client) write a post and publish or schedule it on your LinkedIn profile through LinkedIn's official Posts API. Plus a content-calendar helper so you grow the profile the sustainable way.
</div>
✅ What it does — and what it deliberately doesn't
Does: posts as you (immediately or scheduled), lists your queue and history, and gives you proven post structures + a weekly cadence.
Does NOT: auto-connect, auto-like, auto-comment, mass-message, scrape, or run engagement bots. Those violate LinkedIn's User Agreement and get accounts permanently banned. There is no official API for them — only grey scraping — and it's not worth risking your account. Profiles grow from consistent, valuable content, not automation. That's what this tool supports.
Tools
| Tool | What it does |
|---|---|
auth_status |
Is the tool authorized, and as whom |
publish_now(text, visibility) |
Post immediately (PUBLIC / CONNECTIONS) |
schedule_post(text, when) |
Queue for later (+2h, +1d, or ISO time) |
list_posts(kind) |
Scheduled queue + published history |
cancel_scheduled(id) |
Remove a queued post |
post_brief(topic, archetype) |
Structured brief + rules to write a strong post |
content_calendar() |
Safe weekly cadence and best-practice rules |
Setup
1. Create a LinkedIn app (once, ~10 min)
-
Go to developer.linkedin.com → My apps → Create app.
-
Fill in name, associate a LinkedIn Page (create a simple one if you don't have it — required by LinkedIn), upload a logo.
-
Open your app → Auth tab:
- Copy the Client ID and Client Secret.
- Under OAuth 2.0 redirect URLs, add exactly:
http://localhost:8710/callback
-
Open the Products tab and request:
- Sign In with LinkedIn using OpenID Connect (gives
openid profile) - Share on LinkedIn (gives
w_member_social— the posting scope)
These are self-serve for personal use and usually approve instantly. If a scope isn't yet granted, the auth step below will tell you which one is missing.
- Sign In with LinkedIn using OpenID Connect (gives
2. Install
cd linkedin-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
3. Authorize the tool (once)
Put your credentials in the environment (or ~/.linkedin-mcp/token.json):
export LINKEDIN_CLIENT_ID=xxxxxxxx
export LINKEDIN_CLIENT_SECRET=xxxxxxxx
export LINKEDIN_REDIRECT_URI=http://localhost:8710/callback
python -m linkedin_mcp.auth
A browser opens LinkedIn's consent page → approve → the token is saved to
~/.linkedin-mcp/token.json (chmod 600). Done.
4. Connect to Claude
Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"linkedin": {
"command": "python",
"args": ["-m", "linkedin_mcp.server"],
"env": {
"LINKEDIN_CLIENT_ID": "xxxxxxxx",
"LINKEDIN_CLIENT_SECRET": "xxxxxxxx"
}
}
}
}
Now you can say: "Write a build-in-public post about my AST taint scanner and
publish it" — the assistant uses post_brief to shape it, then publish_now.
5. Auto-posting on a schedule
schedule_post queues posts; a small scheduler publishes the due ones. Run it
from cron so posts go out even when you're offline:
*/15 * * * * cd /path/to/linkedin-mcp && .venv/bin/python -m linkedin_mcp.scheduler >> ~/.linkedin-mcp/scheduler.log 2>&1
How growth actually works here
Ask the assistant for content_calendar() — it returns a Mon/Wed/Fri cadence
and rules (hook first, be specific, one idea, real numbers, end with a question).
Then generate posts with post_brief and schedule a week at a time. Consistency
- substance is what moves a profile — and it can't be taken away by a ban.
Security & privacy
- Token and posts are stored locally under
~/.linkedin-mcp/(chmod 600), never in the repo. - The tool only calls the official LinkedIn API and only acts as you.
- Access tokens expire (~60 days); the client auto-refreshes when a refresh token is present, otherwise re-run
python -m linkedin_mcp.auth.
License
MIT © nadirzhon — for use on your own LinkedIn account, within LinkedIn's terms.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.