linkedin_mcp_server

Idk507/linkedin_mcp_server

3.2

If you are the rightful owner of linkedin_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Python-based server that provides LinkedIn functionality through the MCP (Message Control Protocol) using the `linkedin-api` and `fastmcp` libraries.

Tools
  1. authenticate_linkedin

    Authenticate with LinkedIn using email and password.

  2. get_profile_info

    Get profile information for a specific or authenticated user.

  3. get_profile_posts

    Retrieve posts from a LinkedIn profile.

  4. search_linkedin_jobs

    Search for job postings with optional location filter.

  5. get_job_details

    Retrieve detailed information about specific jobs.

  6. search_linkedin_people

    Search for people on LinkedIn using keywords.

  7. get_linkedin_connections

    Retrieve connections for a LinkedIn profile.

  8. get_authentication_status

    Check the current authentication status.

LinkedIn MCP Server

A Python-based server that provides LinkedIn functionality through the MCP (Message Control Protocol) using the linkedin-api and fastmcp libraries.

This project allows users to:

  • Authenticate with LinkedIn
  • Retrieve profile information
  • Fetch posts
  • Search for jobs and get job details
  • Search for people
  • Retrieve connections

šŸ“ Project Structure


linkedin\_mcp/
ā”œā”€ā”€ config/
│   └── linkedin\_config.py
ā”œā”€ā”€ services/
│   ā”œā”€ā”€ **init**.py
│   ā”œā”€ā”€ linkedin\_client.py
│   ā”œā”€ā”€ profile\_service.py
│   ā”œā”€ā”€ posts\_service.py
│   ā”œā”€ā”€ jobs\_service.py
│   ā”œā”€ā”€ people\_service.py
│   └── connections\_service.py
ā”œā”€ā”€ tools/
│   ā”œā”€ā”€ **init**.py
│   ā”œā”€ā”€ auth\_tools.py
│   ā”œā”€ā”€ profile\_tools.py
│   ā”œā”€ā”€ posts\_tools.py
│   ā”œā”€ā”€ jobs\_tools.py
│   ā”œā”€ā”€ people\_tools.py
│   ā”œā”€ā”€ connections\_tools.py
│   └── status\_tools.py
ā”œā”€ā”€ main.py
ā”œā”€ā”€ requirements.txt
└── README.md

Folder Descriptions

  • config/: Contains configuration and logging setup.
  • services/: Core LinkedIn functionality split into logical service classes.
  • tools/: MCP tool definitions that interface with services.
  • main.py: Entry point for running the server or test mode.
  • requirements.txt: Lists required Python packages.

šŸš€ Features

  • Authentication: Authenticate with LinkedIn using email and password.
  • Profile Retrieval: Fetch profile info for a specific or authenticated user.
  • Post Retrieval: Get posts from a LinkedIn profile.
  • Job Search: Search for job postings (optional location filter).
  • Job Details: Retrieve detailed info about specific jobs.
  • People Search: Search for people on LinkedIn using keywords.
  • Connections: Retrieve connections for a profile.
  • Status Check: Check the current authentication status.

šŸ“¦ Installation

  1. Clone the repository or extract the project files.
  2. Ensure Python 3.6+ is installed.
  3. Install dependencies:
    pip install -r requirements.txt
    

### (Optional) Set up a virtual environment

```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

---

## āš™ļø Usage

### Running the Server

```bash
python main.py
```

This starts the MCP server to listen for client connections.

### Test Mode

```bash
python main.py test
```

This will display available tools and sample usage like:

```python
authenticate_linkedin('your_email@example.com', 'your_password')
search_linkedin_jobs('python developer', 'San Francisco')
get_profile_info()
```

---

## šŸ› ļø Available Tools

```python
authenticate_linkedin(email, password)               # Authenticate with LinkedIn
get_profile_info(profile_id=None)                    # Get profile information
get_profile_posts(profile_id=None, limit=10)         # Retrieve posts from a profile
search_linkedin_jobs(keywords, location=None, limit=25)  # Search for jobs
get_job_details(job_id)                              # Get job details
search_linkedin_people(keywords, limit=10)           # Search for people
get_linkedin_connections(urn_id=None, limit=50)      # Retrieve connections
get_authentication_status()                          # Check auth status
```

---

## šŸ“‹ Requirements

* Python 3.6+
* Packages listed in `requirements.txt`:

  * `fastmcp`
  * `linkedin-api`

---

## šŸ” Notes

* Ensure you have valid LinkedIn credentials for authentication.
* The `linkedin-api` library may enforce rate limits or permissions.
* All operations require prior authentication via `authenticate_linkedin`.
* Project is modular: services handle core logic, tools expose MCP interfaces.

---

## šŸ“„ License

This project is licensed under the [MIT License](LICENSE).


```