linkedin-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@linkedin-mcp-serverShare this PDF as a carousel post on LinkedIn."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
linkedin-mcp-server
An MCP server that posts document/"carousel" content (e.g. a Gamma PDF export) to a personal LinkedIn profile via LinkedIn's official REST API. Built for the "post Gamma carousels to LinkedIn automatically" workflow, but the tools are generic enough for any PDF-carousel-to-LinkedIn use case.
It also hosts the LinkedIn OAuth flow itself, so you don't need a separate public server just to catch the redirect — this one is that server.
Tools
Tool | What it does |
| Read-only. Confirms which account is authenticated. |
| Uploads a PDF (from a URL) to LinkedIn as a document asset. Doesn't publish anything. |
| Publishes a post referencing an already-uploaded document. Irreversible. |
| Does both steps in one call: download PDF → upload → publish. Irreversible. |
Use linkedin_upload_document + linkedin_create_post separately if you want
a review step between uploading and going live; use linkedin_post_carousel
for full one-shot automation.
Related MCP server: LinkedIn Post MCP
1. Create the LinkedIn app (one-time, ~5 minutes)
Go to https://www.linkedin.com/developers/apps → Create app.
Fill in the required fields. LinkedIn requires the app be associated with a Company Page even for personal-profile posting — if you don't have one, create a minimal one for this purpose.
On the Products tab, request "Share on LinkedIn". This is self-serve for the scopes this server needs (
openid,profile,w_member_social) — no manual review wait.On the Auth tab, note the Client ID and Client Secret, and add an Authorized redirect URL of:
https://<your-deployed-host>/oauth/linkedin/callback(must match
LINKEDIN_REDIRECT_URIexactly, including scheme/host/path)
2. Deploy the server
Two supported paths — pick based on where you want to host this.
Option A: Vercel (serverless)
Vercel Functions have no persistent disk, so the file-based token store won't survive between requests. Use the built-in Redis-backed store instead:
Push this repo to GitHub, then import it in Vercel (New Project → your repo). It's picked up automatically —
api/index.tsis the serverless entrypoint,vercel.jsonroutes everything there.In the Vercel project, go to Storage → Marketplace Database Providers → Upstash → Redis and create one. This injects Redis env vars into your project automatically.
Add the rest of the environment variables (Project Settings → Environment Variables):
LINKEDIN_CLIENT_ID=... LINKEDIN_CLIENT_SECRET=... LINKEDIN_REDIRECT_URI=https://<your-vercel-domain>/oauth/linkedin/callback TOKEN_STORE_DRIVER=kv MCP_AUTH_TOKEN=<a long random string>Redeploy so the new env vars take effect.
The 4.5 MB request-body limit on Vercel Functions doesn't affect this server
— the PDF is fetched by an outbound request from linkedin_post_carousel
(you pass a pdf_url, not the file itself), not received as an inbound
upload. The 300s default duration on every plan is comfortably more than an
upload+publish needs.
Option B: A host with a real disk (Fly.io, Railway, a VPS)
npm install
npm run build
npm start # or: node dist/index.jsSet these environment variables (see .env.example):
LINKEDIN_CLIENT_ID=...
LINKEDIN_CLIENT_SECRET=...
LINKEDIN_REDIRECT_URI=https://<your-deployed-host>/oauth/linkedin/callback
TOKEN_STORE_DRIVER=file
TOKEN_STORE_PATH=./data/tokens.json # point this at a persistent volume
MCP_AUTH_TOKEN=<a long random string> # protects /mcp and /oauth/linkedin/start
PORT=3000
TRANSPORT=httpEither way, you need a public HTTPS URL (for the OAuth redirect and for
Claude to reach /mcp).
3. Authorize (one-time human step)
Open, in a browser where you're logged into the LinkedIn account you want to post as:
https://<your-deployed-host>/oauth/linkedin/start?token=<MCP_AUTH_TOKEN>Click Allow. You'll land back on /oauth/linkedin/callback, which
exchanges the code for an access + refresh token and saves them to
TOKEN_STORE_PATH. The access token is refreshed automatically by the
server on subsequent tool calls (refresh tokens last ~1 year), so this step
shouldn't need repeating often.
4. Register as a connector
Add https://<your-deployed-host>/mcp as a custom MCP connector, sending
Authorization: Bearer <MCP_AUTH_TOKEN> on every request. Once connected,
the four linkedin_* tools become available to any session that has this
connector enabled.
Local development
npm run dev # tsx watch, auto-reloads on saveFor local testing you can run with TRANSPORT=stdio and connect via any
stdio-based MCP client (e.g. npx @modelcontextprotocol/inspector), though
you'll still need LINKEDIN_REDIRECT_URI reachable from your browser to
complete the OAuth step — a tunnel like ngrok works well for this during
development.
Notes / limitations
Single-user by design (one LinkedIn account, one token file). Don't expose this server publicly without
MCP_AUTH_TOKENset.LinkedIn posts published via
linkedin_create_post/linkedin_post_carouselcannot be edited or deleted through this API — only from the LinkedIn UI. There's no "undo" tool here on purpose; double-check the caption and PDF before calling.LinkedIn's native ads-only "Carousel" format has no organic API equivalent; what these tools produce is a document post, which LinkedIn renders as a swipeable carousel in the feed — visually the same thing users mean by "LinkedIn carousel."
LINKEDIN_API_VERSIONinsrc/constants.tsis a calendar-month version string LinkedIn requires on every REST call. Bump it periodically per LinkedIn's versioning docs.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceAn MCP server for LinkedIn REST API v2 that enables AI assistants to create, list, and delete posts, manage events, upload images, comment, and react—featuring OAuth 2.0 with session persistence, local post history tracking, and multiple automated tests1266MIT
- Alicense-qualityCmaintenanceAn MCP server that lets you publish posts to your LinkedIn profile using the official LinkedIn API, with support for markdown formatting and OAuth authentication.MIT
- AlicenseAqualityCmaintenanceMCP server that posts to LinkedIn through the LinkedIn API. Enables creating text posts on your LinkedIn profile using natural language from any MCP-compatible client.3ISC
- Flicense-qualityCmaintenanceA production-ready MCP server for interacting with the LinkedIn API, enabling profile lookup, post creation and deletion, image posting, and organization page management through a secure tool-based interface.
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
MCP server for LeadDelta — manage LinkedIn connections and CRM data via AI assistants.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Selangwe/linkedin-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server