linkedin-mcp-server is an MCP (Model Context Protocol) server designed to let Claude Desktop, Claude Code, and other MCP-compatible AI assistants interact with LinkedIn through natural language. It allows AI assistants to create, edit, and delete LinkedIn posts on behalf of users (supporting text, image, and article formats), upload images, retrieve profiles, find company pages and get follower counts, and more.
Purpose
The core purpose of this tool is to simplify the process of publishing and managing content on LinkedIn. Users do not need to manually log in to the website or use the API; they only need to ask Claude in natural language, for example, "Draft a LinkedIn post about my latest project and publish it" or "Delete my last LinkedIn post," and the server will perform the corresponding action. This is suitable for content creators, marketers, developers, or anyone who needs to automate the management of LinkedIn personal or company pages.
Main capabilities
- Create LinkedIn posts, supporting text, image, and article types.
- Edit and delete existing LinkedIn posts.
- Upload images for use as post attachments.
- Retrieve profile information (such as name, email, user URN).
- Find company pages and get follower counts.
- Interact with Claude through natural language to perform the above operations.
The server is developed based on TypeScript strict mode, uses @modelcontextprotocol/sdk, Zod runtime validation, Axios HTTP client, and calls LinkedIn REST API v202604 (configurable via the LINKEDIN_API_VERSION environment variable; v2 is only used for OIDC user info fallback). The codebase is divided into files such as profile, posts, media, and organizations by tool domain, making it easy to extend.
Usage
Before use, three things need to be prepared: Node.js (v18 or later), Claude Desktop, and a LinkedIn access token.
Step 1: Download and build the server
Run the commands in sequence in the terminal (for the specific commands, refer to the project README). After completion, a dist/ folder will be generated, record the full path of that folder.
Step 2: Obtain a LinkedIn access token
This is the most complex part. You need to:
- Create a LinkedIn company page (required even for personal use); visit linkedin.com/company/setup/new, fill in the information, and create it.
- Create a developer app: create an app in the LinkedIn developer portal, associate it with the company page you just created, upload a logo, and agree to the terms.
- Add the required products: in the app's Products tab, apply for "Sign In with LinkedIn using OpenID Connect" and "Share on LinkedIn"; both will be approved automatically.
- Add a redirect URL: in the Auth tab, add https://www.linkedin.com/developers/tools/oauth/redirect。
- Generate an access token: In the access token generator, select the app, check all four permissions (openid, profile, email, w_member_social), request an access token, and authorize it. Copy the token starting with AQX, which is valid for 60 days.
Step 3: Connect Claude Desktop
Open Claude Desktop, go to Settings → Developer → Edit Config, edit the claude_desktop_config.json file, add the server configuration (replacing the path and token), save, and restart Claude Desktop.
Step 4: Test
In Claude Desktop, ask "What is my LinkedIn profile?" If it returns the name, email, and an ID starting with urn:li:person:, the configuration is successful. Save that URN for later use.
Use Cases
- Automate posting to LinkedIn to save manual effort.
- Manage personal or company page content through natural language.
- Quickly retrieve follower data for a LinkedIn company page.
- Serve as an example of the MCP ecosystem for developers to reference or extend.
Limitations
- A LinkedIn access token is required; the token is valid for 60 days and must be regenerated after expiration.
- Some tools require special permissions approved by LinkedIn (such as reading others' posts). These permissions are not available to all developers; although included in the code, they have not been verified.
- A LinkedIn company page must be created in order to create a developer app; a personal profile URL is not accepted.
- Common configuration errors include: not adding product permissions, not setting the redirect URL, token expiration, not restarting Claude Desktop, etc. A troubleshooting guide is provided in the README.
- This integration is unofficial and is not affiliated with the LinkedIn company. Use of it must comply with the LinkedIn API Terms of Service.