A Model Context Protocol (MCP) server implementation for interacting with LinkedIn data using Claude AI. This server provides tools to fetch LinkedIn profiles, search jobs, and generate PDF CVs using the LinkedIn API.
- Fetch detailed LinkedIn profile data
- Search for jobs with advanced filters
- Generate PDF CVs from LinkedIn profiles
- Integration with Claude AI Desktop
- Python 3.8+
- Claude AI Desktop
- RapidAPI Key for LinkedIn APIs
- MCP SDK
-
First, install
uv
package manager by following the instructions at uv installation guide. Here are the quick install commands:For macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
For Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Clone the repository:
git clone https://github.com/yourusername/LinkedInMCP.git cd LinkedInMCP
-
Install dependencies using uv:
uv sync
This will automatically install all required dependencies from the project configuration.
-
Create a
.env
file in the project root:RAPIDAPI_KEY=your_rapidapi_key_here
-
Run the Project:
uv run linkedIn.py
You can also run this project using Docker. This is the recommended way to ensure consistent behavior across different environments.
- Docker installed on your machine
- Your
.env
file configured with the necessary API keys
-
Build the Docker image:
docker build -t projectmcp .
-
Run the container:
docker run -it --env-file .env projectmcp
Options explained:
-it
: Makes the container interactive--env-file .env
: Passes your environment variables from .env fileprojectmcp
: The name of the Docker image we built
To run in detached (background) mode:
docker run -d --env-file .env projectmcp
To integrate with Claude AI Desktop, create or modify the configuration file at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"ProjectMCP": {
"command": "/Users/username/.local/bin/uv", // Path to your uv installation
"args": [
"--directory",
"/path/to/ProjectMCP",
"run",
"linkedIn.py"
]
}
}
}
Note: Replace /Users/username/.local/bin/uv
with your actual uv installation path. You can find this by running:
which uv # On macOS/Linux
where uv # On Windows
-
get_profile
: Fetch LinkedIn profile data- Input: LinkedIn profile URL
- Output: JSON formatted profile data
-
get_jobs
: Search for jobs on LinkedIn- Inputs:
- keywords (required)
- geo_code (optional)
- date_posted (optional)
- company_id (optional)
- Inputs:
-
get_pdf_cv
: Generate PDF CV from LinkedIn profile- Input: LinkedIn profile URL
- Output: PDF file or success message
Currently, the server runs using STDIO transport:
python linkedIn.py
This project currently uses STDIO transport, which is ideal for development and testing. Future implementations will include SSE (Server-Sent Events) transport.
-
STDIO Transport:
- Simple command-line based communication
- Ideal for development and testing
- Direct integration with Claude AI Desktop
- Limited to local machine communication
-
SSE Transport (Future Implementation):
- Web-based communication protocol
- Enables remote server deployment
- Better for production environments
- Supports multiple concurrent clients
- Can be integrated with web frameworks like FastAPI or Starlette
Required Documentation:
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.