LinkedIn MCP Server for local automation
A FastMCP-based server for LinkedIn automation and data extraction using browser automation. This server provides a set of tools for interacting with LinkedIn programmatically while respecting LinkedIn's terms of service and rate limits.
Secure Authentication
Profile Operations
Post Interactions
git clone [repository-url]
cd mcp-linkedin-server
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
pip install -r requirements.txt
playwright install chromium
.env
file in the root directory with:[email protected]
LINKEDIN_PASSWORD=your_password
COOKIE_ENCRYPTION_KEY=your_encryption_key # Optional: will be auto-generated if not provided
python linkedin_browser_mcp.py
login_linkedin_secure
: Securely log in using environment credentialsbrowse_linkedin_feed
: Browse and extract posts from feedsearch_linkedin_profiles
: Search for profiles matching criteriaview_linkedin_profile
: View and extract data from specific profilesinteract_with_linkedin_post
: Like, comment, or read postsfrom fastmcp import FastMCP
# Initialize client
client = FastMCP.connect("http://localhost:8000")
# Login
result = await client.login_linkedin_secure()
print(result)
# Search profiles
profiles = await client.search_linkedin_profiles(
query="software engineer",
count=5
)
print(profiles)
# View profile
profile_data = await client.view_linkedin_profile(
profile_url="https://www.linkedin.com/in/username"
)
print(profile_data)
Rate Limiting: The server implements rate limiting to prevent excessive requests:
Error Handling: Comprehensive error handling for:
Session Management:
MIT
This tool is for educational purposes only. Ensure compliance with LinkedIn's terms of service and rate limiting guidelines when using this software.
{ "mcpServers": { "mcp-linkedin-server": { "command": "python", "args": [ "linkedin_browser_mcp.py" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories