linkedin-mcp-server
v1.0.2
Published
LinkedIn MCP Server with seamless OAuth 2.0 authentication - supports both single-user (simple) and multi-user (advanced) modes for comprehensive LinkedIn API integration - retrieve profiles, search users, manage posts and messages through official Linked
Maintainers
Readme
LinkedIn MCP Server
A powerful Model Context Protocol (MCP) server for seamless LinkedIn integration with automatic OAuth 2.0 authentication. Get instant access to LinkedIn data through AI assistants like SIYA Desktop with zero manual setup required.
✨ Key Features
🚀 Zero-Setup Authentication
- Automatic OAuth flow - Browser opens automatically for LinkedIn login
- Seamless integration - Works immediately with SIYA Desktop
- Secure token management - 60-day tokens with automatic refresh
- Multi-user support - Manage multiple LinkedIn accounts effortlessly
🔧 Complete LinkedIn Toolkit
- Profile Management - Access your profile and others' profiles
- Advanced Search - Find users, companies, and jobs with filters
- Content Creation - Post, like, comment, and share on LinkedIn
- Job Management - Search jobs, apply, save, and track applications
- Networking - Manage connections and send messages
- Company Insights - Follow companies and access detailed information
🚀 Quick Start
1. Install
npm install -g linkedin-mcp-server2. Get LinkedIn API Credentials
- Go to LinkedIn Developer Portal
- Create a new application
- Add redirect URI:
http://localhost:44002/auth/linkedin/callback - Copy your Client ID and Client Secret
3. Configure SIYA Desktop
Option A: Using Environment Variables (Recommended)
Add to your SIYA Desktop configuration file:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server",
"env": {
"LINKEDIN_CLIENT_ID": "your_client_id_here",
"LINKEDIN_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}Option B: Using Command Line Arguments
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server",
"args": [
"--client-id", "your_client_id_here",
"--client-secret", "your_client_secret_here"
]
}
}
}Option C: Using npx (No Installation Required)
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "your_client_id_here",
"--client-secret", "your_client_secret_here"
]
}
}
}4. Start Using
That's it! Ask SIYA to use LinkedIn tools and authentication happens automatically.
🎉 LinkedIn Partnership Access Enabled
Full LinkedIn API access is now active! This server has been approved for all LinkedIn advanced partnerships, enabling complete access to LinkedIn's professional networking features.
✅ Partnership Status:
- Community Management API ✅ - Social features fully enabled
- Talent Solutions API ✅ - Job features fully enabled
- Sales Solutions API ✅ - Connection & messaging features fully enabled
- Marketing Solutions API ✅ - Analytics features fully enabled
All Features Now Available:
- ✅ Social Features: Post creation, likes, comments, shares, feed access
- ✅ Job Management: Job search, applications, saved jobs, recommendations
- ✅ People Search: Advanced user search with filters
- ✅ Connection Management: Send requests, manage connections
- ✅ Messaging: Direct messaging with LinkedIn users
- ✅ Company Data: Full company profiles and analytics
- ✅ Analytics: Profile views, post analytics, engagement metrics
No Restrictions:
All 28 LinkedIn tools are now fully functional with proper API access through approved partnerships.
🛠️ Available Tools (All Enabled - 28 Tools)
✅ Authentication & Profile (3)
authenticate_linkedin- Authenticate with LinkedIn OAuthrevoke_linkedin_auth- Revoke LinkedIn authenticationget_my_profile- Get your LinkedIn profile information
✅ Company Information (2)
get_company_info- Get basic company detailsget_company_profile- Get comprehensive company information
✅ Social Features (6) - Community Management API
create_post- Create LinkedIn posts with content and visibility settingsget_my_posts- Retrieve your published posts with engagement metricsget_feed- Access your LinkedIn feed with posts from your networklike_post- Like posts to show appreciationcomment_on_post- Add thoughtful comments to postsshare_post- Share posts with optional commentary
✅ Job Features (5) - Talent Solutions API
search_jobs- Search LinkedIn jobs with advanced filtersget_job- Get comprehensive details about specific job postingssave_job- Bookmark jobs for later review and applicationget_saved_jobs- Retrieve all your saved and bookmarked jobsget_job_applications- Track status and details of your applications
✅ Search & Discovery (2) - Sales/Talent Solutions API
search_people- Search LinkedIn professionals with advanced filtersget_profile- Access detailed profile information for any user
✅ Connection Features (4) - Sales Solutions API
get_connections- Retrieve your complete LinkedIn connections listsend_connection_request- Send personalized connection requestsget_connection_requests- View and manage pending incoming requestsaccept_connection_request- Accept requests to grow your network
✅ Messaging Features (3) - Sales Solutions API
get_conversations- Access your conversation threads and chat historyget_messages- Retrieve messages from specific conversation threadssend_message- Send direct messages to your LinkedIn connections
✅ Analytics Features (2) - Marketing Solutions API
get_profile_analytics- Access comprehensive profile performance metricsget_post_analytics- Get detailed analytics and engagement data for posts
✅ Partnership Management (1)
update_partnerships- Configure LinkedIn API partnership access levels
~~❌ Previously Deprecated Tools (Now Fully Restored)~~
Content & Social (6)
- ~~
create_linkedin_post- ⚠️ DEPRECATED: Requires Community Management API~~ - ~~
get_my_posts- ⚠️ DEPRECATED: Requires Community Management API~~ - ~~
like_post- ⚠️ DEPRECATED: Requires special partnerships~~ - ~~
comment_on_post- ⚠️ DEPRECATED: Requires special partnerships~~ - ~~
share_post- ⚠️ DEPRECATED: Requires Community Management API~~ - ~~
get_feed- ⚠️ DEPRECATED: Completely removed by LinkedIn~~
Job Features (6)
- ~~
search_linkedin_jobs- ⚠️ DEPRECATED: Requires Talent Solutions~~ - ~~
get_job_details- ⚠️ DEPRECATED: Requires Talent Solutions~~ - ~~
get_recommended_jobs- ⚠️ DEPRECATED: Requires Talent Solutions~~ - ~~
apply_to_job- ⚠️ DEPRECATED: Requires Talent Solutions~~ - ~~
save_job- ⚠️ DEPRECATED: Requires Talent Solutions~~ - ~~
get_saved_jobs- ⚠️ DEPRECATED: Requires Talent Solutions~~
Connection & Messaging (3)
- ~~
send_connection_request- ⚠️ DEPRECATED: Requires Sales Solutions~~ - ~~
get_linkedin_connections- ⚠️ DEPRECATED: Requires Sales Solutions~~ - ~~
send_linkedin_message- ⚠️ DEPRECATED: Requires Sales Solutions~~
Search & Discovery (2)
- ~~
search_linkedin_users- ⚠️ DEPRECATED: Requires Sales/Talent Solutions~~ - ~~
get_other_profile- ⚠️ DEPRECATED: Requires Sales Solutions~~
Analytics & Insights (6)
- ~~
get_post_analytics- ⚠️ DEPRECATED: Requires Community Management API~~ - ~~
get_profile_views- ⚠️ DEPRECATED: Requires special access~~ - ~~
get_connection_analytics- ⚠️ DEPRECATED: Requires Sales Solutions~~ - ~~
get_company_analytics- ⚠️ DEPRECATED: Requires Marketing Solutions~~ - ~~
get_industry_insights- ⚠️ DEPRECATED: Requires special access~~ - ~~
get_skill_endorsements- ⚠️ DEPRECATED: Requires special access~~
🎯 Working Examples (All Features Enabled)
✅ Profile & Company Access
# Get your own profile information
{
"tool": "get_my_profile"
}
# Get detailed company information
{
"tool": "get_company_info",
"companyId": "1441"
}✅ Social Features (Community Management API)
# Create a LinkedIn post
{
"tool": "create_post",
"content": "Excited to share my latest project! 🚀",
"visibility": "PUBLIC"
}
# Get your LinkedIn feed
{
"tool": "get_feed",
"count": 10
}
# Like a post
{
"tool": "like_post",
"postId": "urn:li:activity:1234567890"
}✅ Job Features (Talent Solutions API)
# Search for jobs
{
"tool": "search_jobs",
"keywords": "software engineer",
"location": "San Francisco",
"experienceLevel": "mid-level"
}
# Save a job
{
"tool": "save_job",
"jobId": "1234567890"
}✅ People Search & Connections (Sales Solutions API)
# Search for people
{
"tool": "search_people",
"title": "Software Engineer",
"companyName": "Google",
"location": "San Francisco"
}
# Send connection request
{
"tool": "send_connection_request",
"profileId": "john-doe-123",
"message": "Hi John, I'd love to connect and discuss our shared interests in AI!"
}
# Send a message
{
"tool": "send_message",
"recipientId": "john-doe-123",
"subject": "Great meeting you!",
"body": "Thanks for the insightful conversation about machine learning."
}✅ Analytics (Marketing Solutions API)
# Get profile analytics
{
"tool": "get_profile_analytics"
}
# Get post performance metrics
{
"tool": "get_post_analytics",
"postId": "urn:li:activity:1234567890"
}📚 Previously Deprecated Examples (Now Restored)
# ❌ DEPRECATED - No longer works with standard OAuth
{
"tool": "create_linkedin_post",
"content": "Excited to share my latest project!",
"visibility": "PUBLIC"
}# ❌ DEPRECATED - No longer works with standard OAuth
{
"tool": "search_linkedin_users",
"keywords": "software engineer",
"location": "San Francisco"
}# ❌ DEPRECATED - No longer works with standard OAuth
{
"tool": "search_linkedin_jobs",
"keywords": "python developer",
"location": "remote"
}# ❌ DEPRECATED - No longer works with standard OAuth
{
"tool": "like_post",
"postId": "activity:1234567890"
}
{
"tool": "send_connection_request",
"profileId": "john-doe-123",
"message": "Let's connect!"
}🔐 Authentication Modes
Single-User Mode (Default)
Perfect for personal use. Tokens stored in ~/.linkedin-mcp/tokens_default.json.
Environment Variables:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server",
"env": {
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret"
}
}
}
}Command Line Arguments:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server",
"args": ["--client-id", "your_client_id", "--client-secret", "your_client_secret"]
}
}
}Using npx:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["linkedin-mcp-server", "--client-id", "your_client_id", "--client-secret", "your_client_secret"]
}
}
}Multi-User Mode
For teams or multiple accounts. Each user gets separate token storage.
Environment Variables:
{
"mcpServers": {
"linkedin-personal": {
"command": "linkedin-mcp-server",
"env": {
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_USER_ID": "personal"
}
},
"linkedin-work": {
"command": "linkedin-mcp-server",
"env": {
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_USER_ID": "work"
}
}
}
}Command Line Arguments:
{
"mcpServers": {
"linkedin-personal": {
"command": "linkedin-mcp-server",
"args": [
"--client-id", "your_client_id",
"--client-secret", "your_client_secret",
"--default-user-id", "personal"
]
},
"linkedin-work": {
"command": "linkedin-mcp-server",
"args": [
"--client-id", "your_client_id",
"--client-secret", "your_client_secret",
"--default-user-id", "work"
]
}
}
}Using npx:
{
"mcpServers": {
"linkedin-personal": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "your_client_id",
"--client-secret", "your_client_secret",
"--default-user-id", "personal"
]
},
"linkedin-work": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "your_client_id",
"--client-secret", "your_client_secret",
"--default-user-id", "work"
]
}
}
}💻 Command Line Usage
New: Command Line Arguments ⭐
Pass credentials directly as arguments (highest priority):
# All-in-one setup with arguments
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup
# Check authentication with arguments
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --auth
# Multi-user setup with arguments
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup --user-id work
# Set default user for multi-user mode
linkedin-mcp-server --default-user-id "work" --setup --user-id personalCommand Line Arguments (All Options)
--client-id CLIENT_ID LinkedIn OAuth2 client ID (overrides LINKEDIN_CLIENT_ID env var)
--client-secret SECRET LinkedIn OAuth2 client secret (overrides LINKEDIN_CLIENT_SECRET env var)
--default-user-id USER_ID Default user identifier (overrides LINKEDIN_USER_ID env var)
--access-token TOKEN LinkedIn access token (legacy mode)
--user-id USER_ID Specific user identifier for multi-user support
--setup Run authentication setup wizard
--auth Check authentication status
--logout Clear saved authentication tokens
--list-users List all registered users
--remove-user USER_ID Remove a specific user and their tokens
--debug, -d Enable debug logging
--help, -h Show help messagePriority Order
- Command line arguments (highest priority)
- Environment variables (medium priority)
- Default values (lowest priority)
Authentication Commands
# Setup authentication (environment variables)
linkedin-mcp-server --setup
# Check authentication status
linkedin-mcp-server --auth
# Logout (clear tokens)
linkedin-mcp-server --logout
# Start MCP server
linkedin-mcp-serverMulti-User Commands
# Setup specific user
linkedin-mcp-server --setup --user-id work
# List all users
linkedin-mcp-server --list-users
# Remove user
linkedin-mcp-server --remove-user work
# Start with specific user
LINKEDIN_USER_ID=work linkedin-mcp-server🚀 npx Usage (No Installation Required)
Use LinkedIn MCP Server without installing it globally using npx:
Basic npx Setup
# Run setup with npx
npx linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup
# Check authentication
npx linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --auth
# Start server with npx
npx linkedin-mcp-server --client-id "your_id" --client-secret "your_secret"SIYA Desktop Configuration with npx
Single-User npx Configuration
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "86yi0odon2lx3g",
"--client-secret", "WPL_AP1.your_secret_here.actual_secret"
]
}
}
}Multi-User npx Configuration
{
"mcpServers": {
"linkedin-personal": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "86yi0odon2lx3g",
"--client-secret", "WPL_AP1.your_secret_here.actual_secret",
"--default-user-id", "personal"
]
},
"linkedin-work": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "86yi0odon2lx3g",
"--client-secret", "WPL_AP1.your_secret_here.actual_secret",
"--default-user-id", "work"
]
}
}
}Advanced npx Configuration (with Claude Desktop)
For Claude Desktop users who want to use npx:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": [
"linkedin-mcp-server",
"--client-id", "your_client_id",
"--client-secret", "your_client_secret"
]
}
}
}npx Benefits
- ✅ No global installation - Always uses latest version
- ✅ Auto-updates - Gets latest features automatically
- ✅ Clean system - No global packages cluttering your system
- ✅ Version flexibility - Can specify exact versions if needed
npx Version Pinning (Optional)
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": [
"[email protected]",
"--client-id", "your_client_id",
"--client-secret", "your_client_secret"
]
}
}
}🔧 LinkedIn API Setup
Required OAuth Scopes
Your LinkedIn app needs these scopes (configured automatically):
openid- OpenID Connect authenticationprofile- Basic profile accessemail- Email address access
Application Configuration
- Application Type: Choose appropriate type for your use case
- Redirect URIs:
http://localhost:44002/auth/linkedin/callback - Scopes: Select
openid,profile,email
🔒 Security & Privacy
- Local-only storage - Tokens stored securely on your machine
- OAuth 2.0 standard - Industry-standard authentication
- No data transmission - No data sent to third parties
- Automatic token refresh - Handles token expiration seamlessly
- Secure token storage - Encrypted local storage
⚠️ Important Notes
Tool Limitations
- 2/28 tools fully working (7.1%):
get_my_profile,logout - 14/28 require LinkedIn Partner approval (50%): Advanced features need special permissions
- 12/28 have API restrictions (42.9%): Limited by LinkedIn's standard API access
This is normal behavior for LinkedIn's API - most advanced features require special partnership approval.
Working Tools
✅ get_my_profile - Get your profile information
✅ logout - Clear authentication tokens
LinkedIn API Limitations
- Most LinkedIn APIs require LinkedIn Partner Program approval
- Standard developer accounts have very limited access
- This affects job tools, messaging tools, content tools, etc.
- Profile access works perfectly for standard accounts
🛠️ Development
Local Development
git clone <repository-url>
cd linkedin-mcp-server
npm install
npm run build
# Set environment variables
export LINKEDIN_CLIENT_ID="your_client_id"
export LINKEDIN_CLIENT_SECRET="your_client_secret"
# Setup authentication
npm run auth:setup
# Start development server
npm run devTesting
# Test authentication
npm run test:auth
# Test tools (shows which work vs need approval)
npm run test:tools📊 Environment Variables
All Supported Variables
# Required (can be provided as command line arguments instead)
LINKEDIN_CLIENT_ID="your_linkedin_app_client_id"
LINKEDIN_CLIENT_SECRET="your_linkedin_app_client_secret"
# Optional
LINKEDIN_USER_ID="default_user_identifier"
LINKEDIN_REDIRECT_URI="http://localhost:44002/auth/linkedin/callback"
LINKEDIN_ACCESS_TOKEN="your_access_token" # Legacy modePriority Order
Configuration values are resolved in this order:
Command Line Arguments (highest priority)
--client-idoverridesLINKEDIN_CLIENT_ID--client-secretoverridesLINKEDIN_CLIENT_SECRET--default-user-idoverridesLINKEDIN_USER_ID--access-tokenoverridesLINKEDIN_ACCESS_TOKEN
Environment Variables (medium priority)
LINKEDIN_CLIENT_IDLINKEDIN_CLIENT_SECRETLINKEDIN_USER_IDLINKEDIN_ACCESS_TOKEN
Default Values (lowest priority)
- Default redirect URI:
http://localhost:44002/auth/linkedin/callback - Default user ID:
default
- Default redirect URI:
Flexible Configuration Examples
Pure Environment Variables:
export LINKEDIN_CLIENT_ID="86yi0odon2lx3g"
export LINKEDIN_CLIENT_SECRET="WPL_AP1.your_secret"
linkedin-mcp-server --setupPure Command Line Arguments:
linkedin-mcp-server --client-id "86yi0odon2lx3g" --client-secret "WPL_AP1.your_secret" --setupMixed Configuration (arguments override environment):
export LINKEDIN_CLIENT_ID="old_id"
export LINKEDIN_CLIENT_SECRET="old_secret"
linkedin-mcp-server --client-id "new_id" --setup # Uses new_id and old_secret🆘 Troubleshooting
Common Issues
Authentication Failed
# Clear tokens and re-authenticate
linkedin-mcp-server --logout
linkedin-mcp-server --setupMissing Credentials
- Ensure
LINKEDIN_CLIENT_IDandLINKEDIN_CLIENT_SECRETare set - Check SIYA Desktop configuration file
Tool Errors
- Most tools require LinkedIn Partner approval (expected behavior)
- Use
get_my_profileto test basic functionality
Debug Mode
linkedin-mcp-server --debug
# Check logs at: /tmp/linkedin-mcp-server.log🤝 Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🔗 Resources
🎯 Perfect for: Personal LinkedIn automation, AI-powered networking, automated job searching, and seamless LinkedIn integration with AI assistants.
