- Home
- MCP servers
- python
52
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"alinaqi-mcp-linkedin-server": {
"command": "python",
"args": [
"linkedin_browser_mcp.py"
],
"env": {
"LINKEDIN_PASSWORD": "your_password",
"LINKEDIN_USERNAME": "your_email@example.com",
"COOKIE_ENCRYPTION_KEY": "your_encryption_key"
}
}
}
}This MCP server enables browser-driven LinkedIn automation and data extraction using a FastMCP-based interface. It provides secure login, session persistence, rate-limiting protection, and a set of profile and post interaction tools to help you programmatically access LinkedIn data while respecting usage limits.
How to use
You will run the MCP server locally and connect your MCP client to it to perform LinkedIn actions. You can log in securely, browse your feed, search for profiles, view profile data, and interact with posts (like, comment, read metrics). Use the client to invoke specific tools such as login_linkedin_secure, browse_linkedin_feed, search_linkedin_profiles, view_linkedin_profile, and interact_with_linkedin_post.
How to install
Prerequisites: Python 3.8 or newer, Playwright, and the FastMCP library; you also need a LinkedIn account.
git clone [repository-url]
cd mcp-linkedin-server
Create and activate a virtual environment, then install dependencies and set up Playwright for Chromium.
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
pip install -r requirements.txt
playwright install chromium
Configure your environment to authenticate with LinkedIn by creating a .env file in the root directory with your credentials and an optional cookie encryption key.
LINKEDIN_USERNAME=your_email@example.com
LINKEDIN_PASSWORD=your_password
COOKIE_ENCRYPTION_KEY=your_encryption_key # Optional: will be auto-generated if not provided
Start the MCP server by running the main script.
python linkedin_browser_mcp.py
Additional sections
Configuration and security follow practical defaults designed to protect credentials and manage session state. Your environment variables enable secure, persistent logins and encrypted cookie storage. The server enforces rate limiting and supports automatic session recovery to minimize login churn.
Security notes include encrypted cookie storage, secure credential handling, and session persistence. Adhere to LinkedIn’s terms of service and use rate limiting to avoid triggering security challenges.
Troubleshooting tips cover common network issues, authentication failures, and handling LinkedIn security challenges. Validate that environment variables are set, dependencies are installed, and Playwright can launch Chromium without sandbox restrictions if needed.
Notes: The server exposes tools for login, feed browsing, profile search and viewing, and post interactions. Use the client to call these tools and process the returned data.
Available tools
login_linkedin_secure
Securely log in using environment credentials with encrypted session storage and automatic session recovery.
browse_linkedin_feed
Browse and extract posts from your LinkedIn feed, including content and engagement metrics.
search_linkedin_profiles
Search for profiles matching a given query and return profile data.
view_linkedin_profile
View and extract data from a specific LinkedIn profile URL.
interact_with_linkedin_post
Like a post, leave a comment, or read post content and engagement metrics.