linkledn-mcp-server-local

Lnxtanx/linkledn-mcp-server-local

3.2

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.

Tools
4
Resources
0
Prompts
0

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.js with your actual full path
  • Use double backslashes (\\\\) on Windows
  • Make sure the path points to your server.js file

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:

  1. Claude Desktop starts the server automatically when needed
  2. The server runs in the background while you use Claude
  3. Claude stops the server when you close Claude Desktop
  4. 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 NameDescriptionParameters
post_to_linkedinPost content to LinkedIncontent (required), visibility (optional)
get_linkedin_profileGet your profile informationNone
search_linkedin_connectionsSearch your connectionsquery (required), limit (optional)
get_linkedin_feedGet recent feed postslimit (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 .env file 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

  1. Check the file path in Claude Desktop config
  2. Ensure the server is running (npm start)
  3. Restart Claude Desktop after config changes

"Access Denied" errors

  1. Check if your LinkedIn access token is valid
  2. Run npm test to verify connection
  3. Ensure your LinkedIn app has correct permissions

Token Expired

  1. Your LinkedIn token expires every 2 months
  2. You'll need to regenerate it using the LinkedIn Developer Console
  3. Update the token in your .env file

📊 LinkedIn API Limits

  • Posts: 100 per day per user
  • Profile Access: 500 requests per day
  • Connections: Limited by LinkedIn API policies

🚀 Next Steps

  1. Local Setup Complete - Your server is ready!
  2. 🔄 Optional: Deploy to cloud for 24/7 availability
  3. 🎯 Start Using: Ask Claude to post to LinkedIn!
  4. 🔧 Customize: Add more LinkedIn features as needed

📞 Support

If you need help:

  1. Run npm test to check your connection
  2. Check Claude Desktop logs
  3. Verify your LinkedIn app permissions
  4. Ensure your .env file has the correct tokens

Your LinkedIn MCP Server is ready to use! 🎉