Lnxtanx/linkledn-mcp-server-local
If you are the rightful owner of linkledn-mcp-server-local and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for integrating LinkedIn functionality with Claude Desktop and other AI assistants.
LinkedIn MCP Server 🚀
A Model Context Protocol (MCP) server for integrating LinkedIn functionality with Claude Desktop and other AI assistants.
✨ Features
- 📝 Post to LinkedIn: Create posts on your LinkedIn profile
- 👤 Get Profile Information: Retrieve your LinkedIn profile details
- 🔍 Search Connections: Search through your LinkedIn connections
- 📰 Get Feed: Access your LinkedIn feed (limited by API permissions)
🎯 How MCP Servers Work
Important: MCP servers are designed to run locally on your machine. Claude Desktop connects to them via the local filesystem, not over the internet.
- ✅ Local Setup: This is the standard and recommended approach
- ❌ Cloud Deployment: Not supported for MCP servers (Claude Desktop needs local access)
- 💡 Why Local: MCP uses stdio communication between Claude Desktop and your server
🚀 Setup Instructions
1. Install Dependencies
npm install
2. Test Your Connection
npm test
You should see:
✅ Successfully connected to LinkedIn API!
3. Configure Claude Desktop
Windows: Edit %APPDATA%\\Claude\\claude_desktop_config.json
macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["C:\\\\local-mcp\\\\server.js"],
"env": {
"LINKEDIN_ACCESS_TOKEN": "your_token_here",
"LINKEDIN_MEMBER_URN": "urn:li:person:xaLgYxf0Ke"
}
}
}
}
⚠️ Important:
- Replace
C:\\\\local-mcp\\\\server.jswith your actual full path - Use double backslashes (
\\\\) on Windows - Make sure the path points to your
server.jsfile
4. Restart Claude Desktop
Close and reopen Claude Desktop completely.
5. Test with Claude
Ask Claude: "Post this to LinkedIn: 'Hello from my MCP server! 🚀'"
❓ Do I Need to Keep the Server Running?
No! You do NOT need to manually run the server. Here's how it works:
- ✅ Claude Desktop starts the server automatically when needed
- ✅ The server runs in the background while you use Claude
- ✅ Claude stops the server when you close Claude Desktop
- ❌ You don't run
npm start- Claude handles this
Just configure Claude Desktop and restart it. That's all!
🎮 Usage Examples
Once configured, you can use these commands in Claude:
Post to LinkedIn
"Post this to LinkedIn: 'Just built an amazing MCP server! 🚀 #AI #LinkedIn #MCP'"
Get Profile Info
"What's my LinkedIn profile information?"
Search Connections
"Search my LinkedIn connections for 'software engineer'"
🛠️ Available Tools
| Tool Name | Description | Parameters |
|---|---|---|
post_to_linkedin | Post content to LinkedIn | content (required), visibility (optional) |
get_linkedin_profile | Get your profile information | None |
search_linkedin_connections | Search your connections | query (required), limit (optional) |
get_linkedin_feed | Get recent feed posts | limit (optional) |
🔧 Development
Run in Development Mode
npm run dev
Test the Server
npm test
Project Structure
local-mcp/
├── server.js # Main MCP server
├── test.js # Connection test script
├── package.json # Dependencies and scripts
├── .env # Your credentials (DO NOT COMMIT)
├── .env.example # Example environment file
├── .gitignore # Git ignore rules
└── README.md # This file
🔐 Security Notes
- ✅ Your
.envfile is already in.gitignore - ✅ Never commit access tokens to version control
- ✅ LinkedIn access tokens expire (usually 2 months)
- ✅ Rotate tokens regularly for security
🐛 Troubleshooting
"Server not found" in Claude
- Check the file path in Claude Desktop config
- Ensure the server is running (
npm start) - Restart Claude Desktop after config changes
"Access Denied" errors
- Check if your LinkedIn access token is valid
- Run
npm testto verify connection - Ensure your LinkedIn app has correct permissions
Token Expired
- Your LinkedIn token expires every 2 months
- You'll need to regenerate it using the LinkedIn Developer Console
- Update the token in your
.envfile
📊 LinkedIn API Limits
- Posts: 100 per day per user
- Profile Access: 500 requests per day
- Connections: Limited by LinkedIn API policies
🚀 Next Steps
- ✅ Local Setup Complete - Your server is ready!
- 🔄 Optional: Deploy to cloud for 24/7 availability
- 🎯 Start Using: Ask Claude to post to LinkedIn!
- 🔧 Customize: Add more LinkedIn features as needed
📞 Support
If you need help:
- Run
npm testto check your connection - Check Claude Desktop logs
- Verify your LinkedIn app permissions
- Ensure your
.envfile has the correct tokens
Your LinkedIn MCP Server is ready to use! 🎉