Skip to main content
Glama

LinkedIn Analyzer

License Release Python

Analyze your own LinkedIn profile through LM Studio using an MCP server and Playwright — without the official LinkedIn API.

The tool reuses your existing browser session (including 2FA) to fetch your profile data as structured JSON, which a local LLM can then analyze for optimization opportunities.

  • This tool uses browser automation, not LinkedIn's official API.

  • Using it may violate LinkedIn's Terms of Service. Account restrictions are theoretically possible.

  • Use it only for your own profile, for personal, non-commercial purposes. Do not scrape third-party profiles, do not hammer the site.

  • You are solely responsible for how you use this software.

Related MCP server: LinkedIn MCP Pro Max

Architecture

┌─────────────┐      ┌──────────────┐      ┌─────────────────────┐      ┌──────────┐
│ LM Studio   │ ───→ │ MCP Server   │ ───→ │ Background Server   │ ───→ │ Browser  │
│ (LLM)       │ MCP  │ (stdio)      │ HTTP │ (127.0.0.1:8766)    │      │ Playwright│
└─────────────┘      └──────────────┘      └─────────────────────┘      └──────────┘

Component

Purpose

mcp-server/linkedin_mcp.py

MCP server (stdio JSON-RPC) exposed to LM Studio

background_server.py

Long-running daemon that keeps the browser open (port 8766)

session_manager.py

Encrypts and persists the browser session locally

config.py

Environment-driven configuration

Prerequisites

  • Python 3.10+

  • LM Studio (local)

  • A LinkedIn account (you will log in manually once)

  • Playwright browser: the project drives the browser via Playwright. Run playwright install chromium (step 4 below) once — it downloads a managed Chrome for Testing build automatically. No separate Chrome or Chrome for Testing installation is required.

Installation

# 1. Clone and enter the repo
git clone <your-repo-url>
cd linkedin-analyzer

# 2. Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate      # macOS/Linux
# or: venv\Scripts\activate    # Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Install the Playwright browser
playwright install chromium

# 5. Configure
cp .env.example .env
# edit .env as needed (see below)

Configuration (.env)

Variable

Default

Description

HOST

127.0.0.1

Bind address of the background server

PORT

8766

Port of the background server

SESSION_DIR

./browser_sessions

Where the encrypted session file is stored

SESSION_ENCRYPTION_KEY

(empty)

Optional explicit Fernet key

SESSION_ENCRYPTION_KEY_FILE

~/.linkedin-analyzer/session.key

Key file, created automatically if missing

BROWSER_HEADLESS

False

True for automated/headless runs

Running

Option A — Start the daemon manually

./start-daemon.sh          # starts background_server.py on PORT (default 8766)
./stop-daemon.sh           # stops it again

The background server must keep running while you use the MCP tools — it holds the browser open.

Verify it is up:

curl http://127.0.0.1:8766/health

Use scripts/linkedin-analyzer-mcp-wrapper.sh as the MCP command in LM Studio. It ensures a session key exists, starts the background server if needed, waits until it is healthy, then runs the MCP server:

{
  "mcpServers": {
    "linkedin-analyzer": {
      "command": "/path/to/linkedin-analyzer/scripts/linkedin-analyzer-mcp-wrapper.sh",
      "args": ["--stdio"]
    }
  }
}

Note: point the command at the full absolute path of the wrapper inside your clone (the wrapper derives all other paths from its own location). If LM Studio reports it cannot start the server, the path is almost always wrong — e.g. a command not found from a stale filename.

Setup in LM Studio

  1. Add the MCP server (see above) and restart LM Studio.

  2. Start a chat with the system prompt — pick docs/system-prompt.en.md (or the German docs/system-prompt.de.md) and paste it in.

  3. Ask the assistant to check your session or analyze your profile.

First login (one-time)

  1. Call the linkedin_login tool — the browser opens at LinkedIn's login page.

  2. Log in manually in the browser (2FA is supported).

  3. The session auto-saves as soon as the login is detected. You can also force it with linkedin_save_session.

  4. Verify with linkedin_check_session.

MCP tools

Tool

Description

linkedin_check_session

Check whether a session exists and you are logged in

linkedin_login

Open the browser at LinkedIn's login page (does not wait for login)

linkedin_save_session

Persist the current session after a manual login

linkedin_get_profile

Fetch the raw profile data (JSON)

linkedin_analyze_profile

Fetch the profile data for analysis

linkedin_clear_session

Delete the saved session

HTTP API (background server)

Endpoint

Method

Description

/health

GET

Health check

/check

GET

Session/login status

/login

POST

Open the browser at the login page

/save

POST

Persist the current session

/session

DELETE

Clear the saved session

/profile

GET

Full profile data (name, headline, about, experience, education, skills)

/debug, /debug/dom, /debug/selectors

GET

Debugging aids

Security

Aspect

Implementation

Passwords

Never stored in code

Session

Stored locally and encrypted with Fernet (browser_sessions/)

2FA

Fully supported during the initial login

Data

Stays on your machine; the LLM only sees what you send it

Important: The browser_sessions/ files contain login tokens. They are encrypted, but treat them like passwords. The key lives in SESSION_ENCRYPTION_KEY_FILE (default ~/.linkedin-analyzer/session.key). Both are git-ignored — never commit them.

Troubleshooting

"Not logged in" / authwall redirects

curl -X DELETE http://127.0.0.1:8766/session   # clear session
curl -X POST http://127.0.0.1:8766/login       # log in again in the opened browser

Browser does not open

  • Make sure BROWSER_HEADLESS=False in .env (or unset).

  • Reinstall the browser: playwright install chromium

  • On Linux only, you may also need system libraries: playwright install-deps

Server not reachable

  • Is it running? curl http://127.0.0.1:8766/health

  • Port taken? Set another PORT in .env (the wrapper respects PORT too).

LinkedIn shows a captcha / rate limit

  • Wait a few hours.

  • Clear the session and log in again.

  • Do not send requests too frequently.

Project layout

linkedin-analyzer/
├── background_server.py        # Long-running daemon (keeps browser open, HTTP API)
├── session_manager.py          # Encrypted session persistence
├── config.py                   # Environment configuration
├── mcp-server/
│   └── linkedin_mcp.py         # MCP server for LM Studio (stdio)
├── scripts/
│   └── linkedin-analyzer-mcp-wrapper.sh # Optional auto-start wrapper for LM Studio
├── docs/
│   ├── system-prompt.en.md     # English system prompt for LM Studio
│   └── system-prompt.de.md     # German system prompt for LM Studio
├── start-daemon.sh / stop-daemon.sh
├── requirements.txt
├── .env.example
└── browser_sessions/           # Encrypted sessions (git-ignored)

Development

Test the MCP server directly:

venv/bin/python mcp-server/linkedin_mcp.py --stdio

Then send JSON-RPC lines over stdin (initialize, tools/list, tools/call).

License

MIT — see LICENSE.

Credits

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for LinkedIn automation that enables users to search for jobs, retrieve profile details, manage connections, and read or send messages. It leverages Playwright and Browserbase to interact with LinkedIn through an existing authenticated browser session.
    6
    8
    1
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    High-performance autonomous MCP server that turns LinkedIn into an API for AI workflows, enabling profile management, job search, content posting, and document generation.
    1
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Local-first MCP server for research on AI-assisted browsing of a user-owned professional-network account (e.g., LinkedIn), providing read-focused tools such as profile, company, search, and feed reads.
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    MCP server for programmable LinkedIn automation via Playwright, offering 20 tools for profile management, messaging, feed interaction, and job searching through real browser automation.
    24
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FinleyVeeDub/linkedin-analyzer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server