LinkedIn MCP Server for Claude Desktop - Post management, media sharing, comment system, feed browsing
claude mcp add --transport stdio rgthelen-linkedin-mcp-server node dist/server.js \ --env ENVIRONMENT="production" \ --env LINKEDIN_CLIENT_ID="your_linkedIn_app_client_id" \ --env LINKEDIN_ACCESS_TOKEN="your_linkedIn_access_token_with_scopes" \ --env LINKEDIN_CLIENT_SECRET="your_linkedIn_app_client_secret"
How to use
This MCP server provides LinkedIn integration capabilities for Claude via a set of tools that allow you to manage your LinkedIn presence directly from the Claude Desktop App. The available tools cover core LinkedIn actions such as creating posts (with optional media), fetching your profile and feed, commenting on posts, liking and sharing content, and uploading media attachments for posts. With these capabilities, Claude can help draft posts, attach media, and perform routine engagement tasks on your behalf, all through the MCP interface.
To use the tools, ensure your environment variables are configured with a valid LinkedIn access token and app credentials. Once running, you can invoke tools like create_post, get_profile, get_feed, comment_post, like_post, share_post, and test_linkedin_connection via Claude prompts. For example, you might say: "Create a LinkedIn post about my latest project with this image" or "Show me my recent LinkedIn feed". The server handles media uploads following LinkedIn's v2 API, so you can attach images or videos by providing a file path when creating a post.
How to install
Prerequisites:
- Node.js 18+ installed on your system
- A LinkedIn Developer account with an app and a user access token possessing r_liteprofile, r_emailaddress, and w_member_social scopes
- Claude Desktop App
Installation steps:
- Clone the repository and navigate into it
git clone https://github.com/rgthelen/linkedin-mcp-server.git
cd linkedin-mcp-server
- Install dependencies
npm install
- Set up LinkedIn API credentials
- Go to LinkedIn Developer Portal and create or use an existing app
- Generate an access token with required scopes: r_liteprofile, r_emailaddress, w_member_social
- Configure environment variables
cp .env.example .env
Edit the .env file to include your LinkedIn credentials, for example:
- LINKEDIN_ACCESS_TOKEN=your_linkedIn_access_token
- LINKEDIN_CLIENT_ID=your_client_id
- LINKEDIN_CLIENT_SECRET=your_client_secret
- Build the project
npm run build
- Run the MCP server (as defined by the mcp_config, typically via your MCP runner)
# Example if your MCP runner directly invokes the node server
node dist/server.js
Optional: consult CLAUDE.md or CLAUDE setup instructions in the repository for any Claude-specific configuration requirements.
Additional notes
Tips and notes:
- Ensure your LinkedIn access token remains valid; tokens may expire and require refreshing via your app's OAuth flow.
- If you change environment variables, restart the MCP server to apply changes.
- Media uploads follow LinkedIn's v2 API; provide valid file paths when using create_post with media.
- The Available Tools list in the README shows the supported operations; use test_linkedin_connection to verify connectivity before performing actions.
- If you encounter permission errors, double-check that the app has the w_member_social scope and that the token belongs to the same LinkedIn account you want to manage.
- For production deployments, consider securing tokens and secrets using a secret management system and rotating credentials regularly.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud