linkedin-mcp
TypeScript/Node.js MCP server for LinkedIn API integration - Create posts, manage content, and interact with LinkedIn through Claude Desktop and Windsurf IDE
Install / Use
claude mcp add lurenss -- npx -y github:lurenss/linkedin-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of linkedin-mcp
linkedin-mcp scores 71/100 on our quality scale, 2646th of 2,873 Automation skills we index.
Its MCP Server is 9.7 KB long, well organised into 37 sections with 14 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 17 months ago. Expect some instructions to reference tool versions or APIs that have since changed.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-07. Automated pattern scan on 2026-11-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
linkedin-mcp compared with similar skills
All 4 of these similar skills score higher than linkedin-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| linkedin-mcp (this skill)by lurenss | 71 | 3 | 17mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 109.8k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.1k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 99.1k | 1d ago | MCP Server |
Frequently asked questions
- How do I install linkedin-mcp?
- Run
claude mcp add lurenss -- npx -y github:lurenss/linkedin-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does linkedin-mcp work with?
- It is written for Claude Code, Claude Desktop and Windsurf, as a MCP Server file. Other agents that read the same format can often use it too.
- Is linkedin-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is linkedin-mcp still maintained?
- The repository was last updated about 17 months ago. Expect some instructions to reference tool versions or APIs that have since changed.
Skill content
View source on GitHubLinkedIn MCP Server
A Model Context Protocol (MCP) server for creating and managing LinkedIn posts. This server enables AI assistants to interact with LinkedIn's API to create text posts, image posts, and retrieve profile information.
Features
- ✅ Create text-only LinkedIn posts
- ✅ Create LinkedIn posts with images
- ✅ Get authenticated user's profile information
- ✅ Validate LinkedIn API credentials
- ✅ Support for post visibility settings (PUBLIC, CONNECTIONS)
- ✅ Compatible with Claude Desktop and Windsurf IDE
Prerequisites
- Node.js 18 or higher
- npm or yarn
- LinkedIn Developer App with OAuth 2.0 credentials
- Required LinkedIn API permissions:
w_member_social- Create and manage postsr_liteprofile(optional) - Access basic profile informationr_emailaddress(optional) - Access email address
Installation
- Clone the repository:
git clone https://github.com/yourusername/linkedin-mcp.git
cd linkedin-mcp
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
LinkedIn App Setup
Step 1: Create a LinkedIn Developer App
- Go to LinkedIn Developers
- Click "Create app"
- Fill in the required information:
- App name: Choose a descriptive name (e.g., "My LinkedIn MCP Server")
- LinkedIn Page: Select or create a company page to associate with your app
- App logo: Upload an app logo (120x120px minimum)
- Check the legal agreement checkbox
- Click "Create app"
Step 2: Configure OAuth 2.0 Settings
- In your app dashboard, go to the "Auth" tab
- Add Redirect URLs (for OAuth flow):
http://localhost:8080/callbackhttps://oauth.pstmn.io/v1/callback(for Postman testing)
- Note your credentials:
- Client ID: Found at the top of the Auth page
- Client Secret: Found below the Client ID (keep this secure!)
Step 3: Request API Access
- Go to the "Products" tab in your app dashboard
- Request access to the following products:
- Share on LinkedIn - Required for posting capabilities
- Sign In with LinkedIn - Required for authentication
- These products will be automatically approved for development
Step 4: Generate an Access Token
Option A: Using LinkedIn's Token Generator (Easiest)
- In your app dashboard, look for "OAuth Token Tools" or similar in the Auth section
- Select the scopes:
w_member_social - Click "Generate token"
- Copy the access token (valid for 60 days)
Option B: Using Postman
- Open Postman and create a new request
- Go to the Authorization tab
- Select Type: OAuth 2.0
- Configure:
- Token Name: LinkedIn Token
- Grant Type: Authorization Code
- Callback URL:
https://oauth.pstmn.io/v1/callback - Auth URL:
https://www.linkedin.com/oauth/v2/authorization - Access Token URL:
https://www.linkedin.com/oauth/v2/accessToken - Client ID: Your LinkedIn app's Client ID
- Client Secret: Your LinkedIn app's Client Secret
- Scope:
w_member_social r_liteprofile r_emailaddress
- Click "Get New Access Token"
- Authorize the app in the browser window that opens
- Copy the access token from Postman
Option C: Manual OAuth Flow
- Direct users to:
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=http://localhost:8080/callback&scope=w_member_social%20r_liteprofile%20r_emailaddress
-
After authorization, extract the
codeparameter from the callback URL -
Exchange the code for an access token:
curl -X POST https://www.linkedin.com/oauth/v2/accessToken \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=authorization_code' \
-d 'code=YOUR_AUTH_CODE' \
-d 'redirect_uri=http://localhost:8080/callback' \
-d 'client_id=YOUR_CLIENT_ID' \
-d 'client_secret=YOUR_CLIENT_SECRET'
Configuration
Environment Variables
Create a .env file in the project root:
# Required LinkedIn API credentials
LINKEDIN_CLIENT_ID=your_client_id_here
LINKEDIN_CLIENT_SECRET=your_client_secret_here
LINKEDIN_ACCESS_TOKEN=your_access_token_here
# Optional: API version (default: 202406)
LINKEDIN_API_VERSION=202406
Setting up with Claude Desktop
-
Find your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
- macOS:
-
Add the LinkedIn MCP server configuration:
{
"mcpServers": {
"linkedin-mcp": {
"command": "/usr/bin/env",
"args": ["node", "/path/to/linkedin-mcp/build/index.js"],
"env": {
"PATH": "/usr/local/bin:/usr/bin:/bin",
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_ACCESS_TOKEN": "your_access_token",
"LINKEDIN_API_VERSION": "202406"
}
}
}
}
- For macOS users with Homebrew Node.js:
{
"mcpServers": {
"linkedin-mcp": {
"command": "/usr/bin/env",
"args": ["node", "/path/to/linkedin-mcp/build/index.js"],
"env": {
"PATH": "/opt/homebrew/opt/node@20/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_ACCESS_TOKEN": "your_access_token",
"LINKEDIN_API_VERSION": "202406"
}
}
}
}
-
Restart Claude Desktop
-
Verify the server is running:
- Look for the tools icon (🔨) in Claude Desktop
- You should see the LinkedIn MCP server listed
Setting up with Windsurf IDE
-
Create or edit the Windsurf MCP configuration file:
- Location:
~/.codeium/windsurf/mcp_config.json
- Location:
-
Add the LinkedIn MCP server configuration:
{
"mcpServers": {
"linkedin-mcp": {
"command": "/usr/bin/env",
"args": ["node", "/path/to/linkedin-mcp/build/index.js"],
"env": {
"PATH": "/opt/homebrew/opt/node@20/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_ACCESS_TOKEN": "your_access_token",
"LINKEDIN_API_VERSION": "202406"
}
}
}
}
- Enable MCP in Windsurf:
- Open Windsurf Settings (Cmd+Shift+P → "Open Windsurf Settings")
- Navigate to the "Cascade" section
- Enable Model Context Protocol
- Restart or refresh the MCP servers
Available Tools
1. create_linkedin_post
Create a text-only LinkedIn post.
Parameters:
text(required): The text content of the post (max 3000 characters)visibility(optional): Post visibility - "PUBLIC" or "CONNECTIONS" (default: "PUBLIC")
Example:
Create a LinkedIn post saying "Excited to share my latest project!"
2. create_linkedin_image_post
Create a LinkedIn post with an image.
Parameters:
text(required): The text content of the postimageUrl(required): URL of the image to includevisibility(optional): Post visibility - "PUBLIC" or "CONNECTIONS" (default: "PUBLIC")
Example:
Post to LinkedIn with the text "Check out this amazing view!" and image https://example.com/image.jpg
3. get_linkedin_profile
Get the authenticated user's LinkedIn profile information.
Note: Requires additional profile permissions that may not be available with basic app access.
4. validate_linkedin_credentials
Validate that the LinkedIn credentials are working correctly.
Development
Running in development mode
npm run dev
Building the project
npm run build
Running tests
npm test
Troubleshooting
"403 Forbidden" Error
- Ensure your app has the required products enabled (Share on LinkedIn)
- Verify your access token has the
w_member_socialscope - Check that your access token hasn't expired (tokens last 60 days)
"500 Internal Server Error"
- This might indicate an issue with LinkedIn's servers
- Try generating a fresh access token
- Ensure you're using the correct API version
"Cannot find module" Error
- Make sure you've run
npm install - Rebuild the project with
npm run build - Check that the build directory exists
Server Won't Start in Claude/Windsurf
- Verify the path to Node.js is correct in your configuration
- Ensure all environment variables are properly set
- Check logs in:
- Claude:
~/Library/Logs/Claude/mcp-server-linkedin-mcp.log - Windsurf:
~/.codeium/windsurf/logs/
- Claude:
Security Best Practices
- Never commit credentials: Always use environment variables
- Keep tokens secure: Treat access tokens like passwords
- Rotate tokens regularly: Generate new tokens before they expire
- Use HTTPS: Always use HTTPS URLs in production
- Validate input: The server validates all inputs before sending to LinkedIn
API Limitations
- Token expiration: Access tokens expire after 60 days
- Rate limits: LinkedIn has rate limits on API calls
- Post length: Maximum 3000 characters for post text
- Image posts: Currently supports single image posts only
- Profile access: Full profile access requires additional permissions
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with the Model Context Protocol SDK
- LinkedIn API documentation and developer resources
- Claude Desktop and Windsurf IDE for MCP support
Related Skills
Agent-Reach
109.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.8kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
99.1k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
