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-server
2. 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.
π οΈ Available Tools (28 Total)
π€ Profile Tools (2)
get_my_profile
- Get your LinkedIn profile
get_linkedin_profile
- Get any user's profile by ID
π Search Tools (1)
search_linkedin_users
- Advanced user search with filters
π’ Company Tools (2)
get_linkedin_company
- Get company information
get_company_profile
- Get detailed company profile
πΌ Job Tools (8)
search_jobs
- Search jobs with advanced filters
get_job_details
- Get detailed job information
get_recommended_jobs
- Get personalized job recommendations
apply_to_job
- Apply to jobs directly
save_job
- Save jobs for later
get_saved_jobs
- Get your saved jobs
get_job_applications
- Track your applications
get_company_jobs
- Get all jobs from a company
π Content Tools (6)
create_linkedin_post
- Create and publish posts
get_my_posts
- Get your posts and engagement
like_post
- Like posts
comment_on_post
- Comment on posts
share_post
- Share posts with commentary
get_feed
- Get your LinkedIn feed
π¬ Messaging Tools (2)
get_linkedin_conversations
- Get message history
send_linkedin_message
- Send messages to connections
π€ Network Tools (4)
get_linkedin_connections
- Get your connections
send_connection_request
- Send connection requests
get_connection_requests
- Get pending requests
accept_connection_request
- Accept requests
π’ Company Following Tools (2)
follow_company
- Follow companies
get_followed_companies
- Get followed companies
πͺ Authentication Tools (1)
logout
- Clear authentication tokens
π― Usage Examples
Basic Profile Access
"Get my LinkedIn profile"
Advanced Job Search
"Find software engineer jobs in San Francisco at tech companies"
Content Creation
"Post an update about my latest project on LinkedIn"
π 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):
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --auth
linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup --user-id work
linkedin-mcp-server --default-user-id "work" --setup --user-id personal
Command 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 message
Priority Order
- Command line arguments (highest priority)
- Environment variables (medium priority)
- Default values (lowest priority)
Authentication Commands
linkedin-mcp-server --setup
linkedin-mcp-server --auth
linkedin-mcp-server --logout
linkedin-mcp-server
Multi-User Commands
linkedin-mcp-server --setup --user-id work
linkedin-mcp-server --list-users
linkedin-mcp-server --remove-user work
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
npx linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --setup
npx linkedin-mcp-server --client-id "your_id" --client-secret "your_secret" --auth
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": [
"linkedin-mcp-server@1.0.1",
"--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 authentication
profile
- Basic profile access
email
- 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
export LINKEDIN_CLIENT_ID="your_client_id"
export LINKEDIN_CLIENT_SECRET="your_client_secret"
npm run auth:setup
npm run dev
Testing
npm run test:auth
npm run test:tools
π Environment Variables
All Supported Variables
LINKEDIN_CLIENT_ID="your_linkedin_app_client_id"
LINKEDIN_CLIENT_SECRET="your_linkedin_app_client_secret"
LINKEDIN_USER_ID="default_user_identifier"
LINKEDIN_REDIRECT_URI="http://localhost:44002/auth/linkedin/callback"
LINKEDIN_ACCESS_TOKEN="your_access_token"
Priority Order
Configuration values are resolved in this order:
-
Command Line Arguments (highest priority)
--client-id
overrides LINKEDIN_CLIENT_ID
--client-secret
overrides LINKEDIN_CLIENT_SECRET
--default-user-id
overrides LINKEDIN_USER_ID
--access-token
overrides LINKEDIN_ACCESS_TOKEN
-
Environment Variables (medium priority)
LINKEDIN_CLIENT_ID
LINKEDIN_CLIENT_SECRET
LINKEDIN_USER_ID
LINKEDIN_ACCESS_TOKEN
-
Default Values (lowest priority)
- Default redirect URI:
http://localhost:44002/auth/linkedin/callback
- Default user ID:
default
Flexible Configuration Examples
Pure Environment Variables:
export LINKEDIN_CLIENT_ID="86yi0odon2lx3g"
export LINKEDIN_CLIENT_SECRET="WPL_AP1.your_secret"
linkedin-mcp-server --setup
Pure Command Line Arguments:
linkedin-mcp-server --client-id "86yi0odon2lx3g" --client-secret "WPL_AP1.your_secret" --setup
Mixed Configuration (arguments override environment):
export LINKEDIN_CLIENT_ID="old_id"
export LINKEDIN_CLIENT_SECRET="old_secret"
linkedin-mcp-server --client-id "new_id" --setup
π Troubleshooting
Common Issues
Authentication Failed
linkedin-mcp-server --logout
linkedin-mcp-server --setup
Missing Credentials
- Ensure
LINKEDIN_CLIENT_ID
and LINKEDIN_CLIENT_SECRET
are set
- Check SIYA Desktop configuration file
Tool Errors
- Most tools require LinkedIn Partner approval (expected behavior)
- Use
get_my_profile
to test basic functionality
Debug Mode
linkedin-mcp-server --debug
π€ 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.