Provides containerization support for the LinkedIn MCP server, allowing easy deployment with isolated dependencies and configurations.
Powers the API server that implements the MCP standard, serving as the foundation for handling HTTP requests and responses.
Serves as the underlying programming language for the LinkedIn MCP server implementation, requiring version 3.12 or higher.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LinkedIn MCP Serverpost an update about my new AI project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LinkedIn MCP Server
📖 Overview
LinkedIn MCP Server is a Model Context Protocol (MCP) implementation that bridges language models and other applications with LinkedIn's API. It provides a standardized interface for executing LinkedIn operations through various tools defined by the MCP standard.
Related MCP server: EnrichB2B MCP Server
🚀 Features
This server provides the following capabilities through MCP tools:
Tool | Description |
| Retrieve LinkedIn profile information (current user or specified person) |
| Create a text post on LinkedIn with customizable visibility |
| Create an article post with title and content |
| Retrieve recent posts from a user's profile |
| Get network updates from LinkedIn feed |
| Search for people on LinkedIn |
| Retrieve information about a LinkedIn company |
🔧 Prerequisites
You'll need one of the following:
Docker: Docker installed and running (recommended)
Python: Python 3.12+ with pip
⚙️ Setup & Configuration
LinkedIn App Setup
Create a LinkedIn App:
Visit the LinkedIn Developer Portal
Create a new application and add it to your developer account
Under the "Auth" section, configure the following scopes:
r_liteprofile(for basic profile access)w_member_social(for posting content)
Copy your Client ID and Client Secret
Generate Access Token:
Use LinkedIn's OAuth2 authorization code flow
Navigate to OAuth2 > URL Generator in the LinkedIn Developer Portal
Generate an access token with the required scopes
For testing, you can use the temporary access token provided in the developer console
Environment Configuration
Create your environment file:
cp .env.example .envEdit the
.envfile with your LinkedIn credentials:LINKEDIN_ACCESS_TOKEN=YOUR_ACTUAL_LINKEDIN_ACCESS_TOKEN LINKEDIN_MCP_SERVER_PORT=5000🏃♂️ Running the Server
Option 1: Docker (Recommended)
The Docker build must be run from the project root directory (klavis/):
# Navigate to the root directory of the project
cd /path/to/klavis
# Build the Docker image
docker build -t linkedin-mcp-server -f mcp_servers/linkedin/Dockerfile .
# Run the container
docker run -d -p 5000:5000 --name linkedin-mcp linkedin-mcp-serverTo use your local .env file instead of building it into the image:
docker run -d -p 5000:5000 --env-file mcp_servers/linkedin/.env --name linkedin-mcp linkedin-mcp-serverOption 2: Python Virtual Environment
# Navigate to the LinkedIn server directory
cd mcp_servers/linkedin
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the server
python server.pyOnce running, the server will be accessible at http://localhost:5000.
🔌 API Usage
The server implements the Model Context Protocol (MCP) standard. Here's an example of how to call a tool:
import httpx
async def call_linkedin_tool():
url = "http://localhost:5000/mcp"
payload = {
"tool_name": "linkedin_create_text_post",
"tool_args": {
"text": "Hello from LinkedIn MCP Server!",
"visibility": "PUBLIC"
}
}
async with httpx.AsyncClient() as client:
response = await client.post(url, json=payload)
result = response.json()
return result📋 Common Operations
Getting Profile Information
payload = {
"tool_name": "linkedin_get_profile_info",
"tool_args": {} # Empty for current user, or provide person_id
}Creating a Text Post
payload = {
"tool_name": "linkedin_create_text_post",
"tool_args": {
"text": "Excited to share my latest project!",
"visibility": "PUBLIC"
}
}Creating an Article Post
payload = {
"tool_name": "linkedin_create_article_post",
"tool_args": {
"title": "The Future of AI",
"text": "In this article, I explore the latest trends in artificial intelligence...",
"visibility": "PUBLIC"
}
}Searching for People
payload = {
"tool_name": "linkedin_search_people",
"tool_args": {
"keywords": "software engineer",
"count": 10
}
}🛠️ Troubleshooting
Docker Build Issues
File Not Found Errors: If you see errors like
failed to compute cache key: failed to calculate checksum of ref: not found, this means Docker can't find the files referenced in the Dockerfile. Make sure you're building from the root project directory (klavis/), not from the server directory.
Common Runtime Issues
Authentication Failures: Verify your access token is correct and hasn't expired. LinkedIn access tokens typically have a short lifespan.
API Errors: Check LinkedIn API documentation for error meanings and status codes.
Missing Permissions: Ensure your LinkedIn app has the necessary scopes enabled (
r_liteprofile,w_member_social).Rate Limiting: LinkedIn has strict rate limits. Implement appropriate delays between requests if needed.
Scope Issues: Some endpoints require additional permissions or LinkedIn partnership status.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.