LinkedIn MCP Server
A powerful Model Context Protocol (MCP) server that enables AI agents like Claude to interact seamlessly with LinkedIn's professional network. Built with FastMCP for high performance and reliability.
Potencia tu agente
Instalación del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
Aún no hay una versión empaquetada en el registro. Sigue el README del repositorio.
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDel publicador
A powerful Model Context Protocol (MCP) server that enables AI agents like Claude to interact seamlessly with LinkedIn's professional network. Built with FastMCP for high performance and reliability.
A Custom MCP Server for LinkedIn integration built with FastMCP.
This MCP server bridges the gap between AI assistants and LinkedIn, allowing them to:
Perfect for professionals who want to leverage AI to manage their LinkedIn presence efficiently.
The fastest way to get started:
uvx linkedin-mcp-server
Install from PyPI:
pip install linkedin-mcp-server
For development or customization:
git clone https://github.com/SARAMALI15792/LinkedIn_mcp_custom_server.git
cd LinkedIn_mcp_custom_server
pip install -e .
http://localhost:8000Create a .env file in your working directory:
LINKEDIN_CLIENT_ID=your_client_id_here
LINKEDIN_CLIENT_SECRET=your_client_secret_here
LINKEDIN_REDIRECT_URI=http://localhost:8000
Security Note: Never commit the .env file to version control. It's already in .gitignore.
Edit your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Add the LinkedIn MCP server:
{
"mcpServers": {
"linkedin": {
"command": "uvx",
"args": ["linkedin-mcp-server"]
}
}
}
If installed via pip:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp-server"
}
}
}
For local development:
{
"mcpServers": {
"linkedin": {
"command": "python",
"args": ["-m", "linkedin_mcp_server"],
"env": {
"LINKEDIN_CLIENT_ID": "your_client_id",
"LINKEDIN_CLIENT_SECRET": "your_client_secret",
"LINKEDIN_REDIRECT_URI": "http://localhost:8000"
}
}
}
}
http://localhost:8000/?code=...code parameter value from the URLYour access token is automatically saved to .env and will be used for all future requests.
User: "Generate LinkedIn login URL"
Claude: [Provides OAuth URL with instructions]
User: "Exchange this code: AQTvqXXXXXXXXXXX"
Claude: "Success! Access Token saved. Expires in 5183999 seconds."
Text Post:
User: "Post to LinkedIn: Excited to announce the launch of our new AI-powered LinkedIn MCP server! Check it out on GitHub."
Claude: [Creates post and returns post URN]
Post with Image:
User: "Post this image to LinkedIn with caption 'Team celebration': C:/Users/photos/team.jpg"
Claude: [Uploads image and creates post with caption]
Update a Post:
User: "Update post urn:li:share:7289123456789 to say: Updated announcement..."
Claude: [Deletes old post and creates new one with updated text]
Delete a Post:
User: "Delete my post urn:li:share:7289123456789"
Claude: [Deletes the post permanently]
Comment on Posts:
User: "Comment on post urn:li:share:7289123456789: Great insights, thanks for sharing!"
Claude: [Posts comment and returns comment URN]
View Comments:
User: "Show comments on post urn:li:share:7289123456789"
Claude: [Retrieves and displays all comments]
User: "What's my LinkedIn email address?"
Claude: [Retrieves profile and shows email]
User: "Show me my LinkedIn profile"
Claude: [Displays profile information: name, email, picture URL, etc.]
User: "Search for companies: Microsoft"
Claude: [Returns list of matching companies]
User: "Get details for company urn:li:organization:1035"
Claude: [Shows company profile information]
User: "Find remote Python developer jobs"
Claude: [Searches and displays matching job postings]
User: "Search for Machine Learning Engineer positions in San Francisco"
Claude: [Returns relevant job listings]
User: "Get details for job urn:li:job:123456789"
Claude: [Shows detailed job information]
User: "Search for AI researchers at Stanford"
Claude: [Returns matching professionals]
LinkedIn uses URNs (Uniform Resource Names) to identify resources:
urn:li:person:AbC123XyZurn:li:share:7289123456789urn:li:comment:(ugcPost:7289123456789,7289987654321)urn:li:organization:1035urn:li:job:123456789When Claude returns a URN, you can use it to reference that resource in other commands.
This server requests these OAuth scopes:
openid - OpenID Connect authenticationprofile - Access to profile informationemail - Access to email addressw_member_social - Create posts and commentsSome LinkedIn API features require additional permissions that are restricted to approved partners:
Restricted Read Operations:
r_member_social - Read user's posts (rarely granted to third-party apps)What This Means:
Why? LinkedIn restricts these APIs to protect user privacy and control third-party access to their platform.
linkedin-mcp-server/
├── linkedin_mcp_server/ # Main package
│ ├── __init__.py # Package initialization
│ ├── __main__.py # CLI entry point
│ ├── server.py # MCP server with 18 tool definitions
│ ├── config.py # Configuration with pydantic-settings
│ ├── utils.py # Shared HTTP client utilities
│ └── tools/ # Tool implementations
│ ├── auth.py # OAuth 2.0 authentication flow
│ ├── profile.py # Profile retrieval operations
│ ├── post.py # Post and comment operations
│ ├── company.py # Company search and profiles
│ ├── job.py # Job search operations
│ └── search.py # People search functionality
├── pyproject.toml # Package metadata and dependencies
├── requirements.txt # Pinned dependencies
├── README.md # This file
├── claude.md # Claude integration guide
├── LICENSE # MIT License
└── get_profile.py # Example standalone script
# Clone repository
git clone https://github.com/SARAMALI15792/LinkedIn_mcp_custom_server.git
cd LinkedIn_mcp_custom_server
# Install with dev dependencies
pip install -e ".[dev]"
pytest tests/
# Format code
black linkedin_mcp_server/
# Lint
ruff check linkedin_mcp_server/
# Type checking
mypy linkedin_mcp_server/
# Using module syntax
python -m linkedin_mcp_server
# Using installed command
linkedin-mcp-server
Problem: "Error: LINKEDIN_CLIENT_ID not configured"
Solution: Create .env file with your LinkedIn app credentials
Problem: "Unauthorized (401)" errors Solution: Your access token expired. Re-authenticate using the OAuth flow
Problem: "Error exchanging code: invalid code" Solution: Authorization codes expire quickly. Generate a new OAuth URL and try again
Problem: "Forbidden (403)" errors Solution: Your LinkedIn app may lack required permissions. Check your app's products in the Developer Portal
Problem: "r_member_social permission required" Solution: This permission is restricted. LinkedIn rarely grants it to third-party apps. Focus on write operations instead
Problem: Can't search companies/jobs/people Solution: These APIs may require Marketing/Talent Solutions products which need LinkedIn approval
Problem: MCP server not connecting in Claude Desktop Solution:
claude_desktop_config.json syntax is valid JSONProblem: ".env file not found"
Solution: Create .env file in the same directory where Claude Desktop runs the server, or specify environment variables in the config
.env is in .gitignore for a reasonContributions are welcome! Here's how:
git checkout -b feature/amazing-featurepytest tests/black linkedin_mcp_server/git commit -m 'Add amazing feature'git push origin feature/amazing-featureFuture enhancements being considered:
Q: Why can't I read my own posts?
A: The r_member_social permission required to read posts is restricted by LinkedIn. Most third-party apps cannot access this feature.
Q: How long do to access tokens last? A: LinkedIn controls token expiration. Typically tokens last for 60 days, but this can vary. You'll need to re-authenticate when tokens expire.
Q: Can I use this for multiple LinkedIn accounts?
A: Currently, the server is designed for single-user authentication. Each .env file holds one access token.
Q: Is this officially supported by LinkedIn? A: No, this is a community project. It uses LinkedIn's public APIs but is not officially endorsed by LinkedIn.
Q: Can I use this commercially? A: Yes, the MIT license allows commercial use. However, check LinkedIn's terms of service and API usage policies.
Q: Why do some searches return empty results? A: Search APIs may require additional LinkedIn products (Marketing/Talent) that need approval. Also, API access varies by account type.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with:
SARAM ALI
Built with care for the AI and LinkedIn communities | Report Issues | Contribute | Star on GitHub
A Custom MCP Server for LinkedIn integration built with FastMCP.
Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
Este registro no indica ninguna variable de entorno obligatoria.
Linkedin MCP Custom Server se ejecuta localmente por stdio.
Última comprobación: 2026-10-27. A Custom MCP Server for LinkedIn integration built with FastMCP.