LinkedIn MCP Server
This server acts as a LinkedIn MCP server, enabling AI agents to perform read/write operations on the LinkedIn API across several areas:
Profile & Identity
Fetch the authenticated user's profile (name, picture, unique ID) and email address
Personal Post Management
Create text, link, image, and document posts
Delete personal posts by URN
Media Upload
Upload images from a URL to LinkedIn, receiving an image URN for use in posts
Organization Management
Fetch organization details by numeric ID or vanity name
Create, retrieve, and delete posts on behalf of an organization
Social Actions
Fetch, create, and delete comments on posts
Add or remove reactions (LIKE, CELEBRATE, SUPPORT, LOVE, INSIGHTFUL, CURIOUS)
Organization Analytics
Retrieve page view stats, follower counts/demographics, and share/engagement metrics (with optional time range or URN filters)
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 Serverpost a text update saying 'Excited to announce our new feature!'"
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
A Model Context Protocol (MCP) server that provides AI agents with read/write access to the LinkedIn API.
Features
Profile Tools: Fetch user profile and email.
Post Tools: Create text, link, image, and document posts. Delete posts.
Media Tools: Upload images and documents to LinkedIn.
Organization Tools: Fetch organization details, post on behalf of an organization, fetch and delete org posts.
Social Action Tools: Fetch, create, and delete comments on posts. Add or remove reactions (like, celebrate, etc.).
Organization Analytics Tools: Get organization page, follower, and share statistics.
Related MCP server: LinkedIn MCP Server
Prerequisites
You need a LinkedIn Access Token. Create an app on the LinkedIn Developer Portal, then either:
Use the built-in OAuth flow (see Development Setup), or
Generate a token manually from the developer portal.
Quick Start (npm — recommended)
The easiest way to use this server is via the published npm package. No cloning required.
Install globally
npm install -g @himanshu31shr/linkedin-mcp-serverThen run it:
LINKEDIN_ACCESS_TOKEN=your-token linkedin-mcp-serverOr run directly with npx
LINKEDIN_ACCESS_TOKEN=your-token npx -y @himanshu31shr/linkedin-mcp-serverMCP Client Configuration
Claude Desktop
Add the following to your claude_desktop_config.json:
Using npx (no install needed):
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "@himanshu31shr/linkedin-mcp-server"],
"env": {
"LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
}
}
}
}Using a global install:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server",
"env": {
"LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
}
}
}
}Using a local clone:
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/path/to/linkedin-mcp-server/dist/index.js"],
"env": {
"LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
}
}
}
}Cursor
In Cursor's Settings > AI > MCP Servers, add a new server:
Type:
commandName:
linkedinCommand:
npx -y @himanshu31shr/linkedin-mcp-serverEnvironment Variables: Add
LINKEDIN_ACCESS_TOKENwith your token.
Antigravity / Windsurf / Other MCP Clients
Use the same pattern — point the MCP client to:
npx -y @himanshu31shr/linkedin-mcp-serverAnd set the LINKEDIN_ACCESS_TOKEN environment variable.
Available Tools
Tool | Description |
| Fetch the authenticated user's LinkedIn profile |
| Fetch the authenticated user's email address |
| Create a text-only post |
| Create a post with a link attachment |
| Create a post with an image |
| Create a post with a document (PDF, etc.) |
| Delete a post by URN |
| Upload an image to LinkedIn |
| Fetch organization details |
| Create a post on behalf of an organization |
| Fetch recent posts for an organization |
| Delete an organization post |
| Fetch comments on a post |
| Add a comment to a post |
| Delete a comment |
| Add a reaction to a post |
| Remove a reaction from a post |
| Get organization page statistics |
| Get organization follower statistics |
| Get organization share statistics |
Development Setup
If you want to contribute or run from source:
Clone and install:
git clone https://github.com/himanshu31shr/linkedin-mcp-server.git cd linkedin-mcp-server npm installBuild:
npm run buildGet a LinkedIn Access Token (automated OAuth flow):
npm run authFollow the prompts — this will save your
LINKEDIN_ACCESS_TOKENto the.envfile automatically.Run locally:
npm run dev
Scripts
Script | Description |
| Compile TypeScript to JavaScript |
| Run in development mode with |
| Run the OAuth token flow |
| Run tests with Vitest |
| Run tests with coverage report |
| Type-check with TypeScript |
| Launch MCP Inspector for debugging |
Releasing a New Version
The CD pipeline automatically publishes to npm when a version tag is pushed.
# Bump version (creates commit + tag automatically)
npm version patch # or: npm version minor / npm version major
# Push commit and tag to trigger publish
git push origin main --tagsThe pipeline will:
Validate the tag matches
package.jsonversionRun lint, tests, and build
Publish to npm with provenance
Create a GitHub Release with auto-generated notes
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/himanshu31shr/linkedin-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server