A Model Context Protocol (MCP) server that enables Claude Desktop to interact with your LinkedIn profile and company pages. Connect your LinkedIn account to Claude AI and manage your professional presence directly through conversations.
🎯 Features
✅ Fully Supported (Standard API Access)
LinkedIn MCP Server for Claude Desktop - OAuth integration with Clean Architecture
LINKEDIN_CLIENT_ID=your_client_id_here
LINKEDIN_CLIENT_SECRET=your_client_secret_here
LINKEDIN_REDIRECT_URI=http://localhost:3000/auth/callback
LINKEDIN_COMPANY_ID=your_company_id_here # Optional, for company page features
4. Build the project
npm run build
5. Authenticate with LinkedIn (one-time setup)
npm start
This step is only needed once to obtain your LinkedIn OAuth token:
Starts a temporary HTTP server on port 3000
Opens your browser to LinkedIn authentication
Saves your access tokens to ~/.linkedin-mcp-tokens.json (in your home directory)
The server will automatically close after authentication
Note: After this initial authentication, you don't need to run npm start again. Claude Desktop will use the saved token automatically.
🔧 Claude Desktop Configuration
After building and authenticating, configure Claude Desktop to use your MCP server:
Add this configuration to your Claude Desktop config file:
Important: Replace /ABSOLUTE/PATH/TO/linkedin-mcp-server with the actual path to your project directory.
To get the absolute path:
# On macOS/Linux
pwd
# On Windows (PowerShell)
Get-Location
Then restart Claude Desktop completely (quit and reopen).
How it works: Claude Desktop will automatically launch the MCP server (via dist/index.js) when needed. You don't need to run npm start - that was only for the initial OAuth authentication.
🎯 Usage
Once configured, you can ask Claude Desktop:
Personal Profile
"Get my LinkedIn profile information"
"Show me my LinkedIn profile"
Publishing Posts
"Post on LinkedIn: Just learned about MCP servers, amazing technology!"
"Show me my last 5 LinkedIn posts"
"Delete my last LinkedIn post"
Company Page (if configured)
"Post on my company page: We're hiring a Senior Developer!"
"Show posts from my company page"
"Get information about my company page"
Note: Job search and messaging features are not available with standard LinkedIn API access. See the Features section for details.
🏢 Getting Your Company ID (Optional)
To publish on your company page, you need to find your Company ID:
Method 1: Use the provided script
npm run get-company-id
This will authenticate and show all company pages you administrate.
Method 2: From LinkedIn URL
Go to your company page on LinkedIn
Look at the URL: linkedin.com/company/your-company-name/
Use browser developer tools to find the numeric ID in the page source
Add the Company ID to your .env file:
LINKEDIN_COMPANY_ID=123456789
Note: You must be an administrator of the company page to post on its behalf.
⚠️ OAuth tokens are stored locally in ~/.linkedin-mcp-tokens.json (in your home directory)
⚠️ Keep .env in .gitignore
⚠️ Tokens are automatically refreshed when needed
⚠️ You can customize the token storage path with the TOKEN_STORAGE_PATH environment variable
🛠️ Development
# Build TypeScript (required before using with Claude Desktop)
npm run build
# Development mode with auto-reload (for testing changes)
npm run dev
# Authenticate with LinkedIn (one-time setup only)
npm start
# Get your company ID (for posting on company pages)
npm run get-company-id
Important:
npm run build is required before using the MCP server with Claude Desktop
npm start is only needed once for OAuth authentication
After authentication, Claude Desktop launches the server automatically via the config file