Skip to main content
Glama
Secure-tree

kaushik-linkedin-mcp

by Secure-tree
README.md
# ๐Ÿ”— kaushik-linkedin-mcp

> **A personal LinkedIn MCP server โ€” built from scratch.**
> Not a fork. Not a clone. Written by Kaushik Muthukumaran.

[![Python](https://img.shields.io/badge/Python-3.12+-blue)](https://python.org)
[![FastMCP](https://img.shields.io/badge/FastMCP-2.0+-green)](https://gofastmcp.com)
[![Playwright](https://img.shields.io/badge/Playwright-1.44+-orange)](https://playwright.dev)
[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
[![Security](https://img.shields.io/badge/Security-Audited-brightgreen)](#security)

This MCP server connects **Claude AI** directly to **LinkedIn** using browser automation.
It gives Claude 8 tools to read profiles, search people and jobs, get company data,
publish posts, edit your profile, and manage sessions โ€” all from a conversation with Claude.

---

## ๐Ÿ“– Table of Contents

1. [What You Can Do With This](#what-you-can-do-with-this)
2. [How to Clone and Run It](#how-to-clone-and-run-it)
3. [Project Structure](#project-structure)
4. [How It Works](#how-it-works)
5. [Tools Reference](#tools-reference)
6. [For People Cloning This Repo](#for-people-cloning-this-repo)
7. [Security](#security)
8. [Troubleshooting](#troubleshooting)
9. [Author](#author)

---

## ๐Ÿš€ What You Can Do With This

Once connected to Claude, you can have natural conversations that do real LinkedIn actions.

---

### โœ๏ธ Edit Your LinkedIn Profile By Just Telling Claude

**Method 1 โ€” Tell Claude your details in chat:**

> *"Change my headline to: Security Engineer | Zero Trust | CrowdStrike | 14K+ Endpoints"*
> *"Add a new job: Security Engineer at MasTec, promoted after 1 year"*
> *"Update my Sankara Nethralaya role to focus on vulnerability assessments and OSINT"*

Claude opens Chrome, finds the right field, types your content, and saves it.

**Method 2 โ€” Upload your resume and ask Claude to sync it:**

> *"Here's my updated resume โ€” update my LinkedIn to match it"*

Claude reads every section, compares it to your LinkedIn, and edits each section one by one.
Supports: `.pdf`, `.docx`, `.txt`

**Method 3 โ€” Targeted corrections mid-conversation:**

> *"Split my MasTec role into two entries at August 2025"*
> *"Add OSINT and CyberArk to my skills"*
> *"Move Sankara Nethralaya from Part-time to Full-time"*

---

### ๐Ÿ‘ค Profile Intelligence

> *"Pull Kaushik's full LinkedIn profile including experience and skills"*
> *"Show me their recent posts and engagement"*

Reads: name, headline, location, connections, about, full experience, education, skills, posts, contact info.

---

### ๐Ÿ” People Search

> *"Find Security Engineers at CrowdStrike in Pennsylvania"*
> *"Search for CISOs in the healthcare industry"*

Returns: name, headline, location, username, profile URL. Max 100 results per call.

---

### ๐Ÿ’ผ Job Search & Research

> *"Find Senior Security Engineer jobs in Pennsylvania posted this week"*
> *"Show me remote Zero Trust architect roles โ€” mid-senior level only"*
> *"What's the salary range for this CrowdStrike job?"*

Full LinkedIn job search: date posted, experience level, job type, work arrangement, Easy Apply.

---

### ๐Ÿข Company Research

> *"What does CrowdStrike's LinkedIn page say about them?"*
> *"Show me MasTec's recent posts and engagement numbers"*
> *"What roles is Microsoft hiring for right now?"*

Returns: about, industry, size, headquarters, recent posts with reactions, open roles.

---

### ๐Ÿ“ข Post Publishing

> *"Publish my vulnerability management post to LinkedIn"*
> *"Post this Zero Trust insight with these hashtags"*

Navigates to feed, opens composer, injects text securely, clicks Post, confirms success.

---

### ๐Ÿค– Combined Power Workflows

> *"Search for Senior Security Engineer jobs at CrowdStrike, get the top 3 JDs, and tell me exactly how my resume matches each one"*

> *"Find Security Engineers at my target companies and draft a personalised connection message for each one based on their background"*

> *"Write and publish a post about today's Rapid7 CVE findings โ€” under 200 words with 5 hashtags"*

---

## ๐Ÿ–ฅ๏ธ How to Clone and Run It

### Step 1 โ€” Install Homebrew
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv zsh)"
```

### Step 2 โ€” Install Node.js and Git
```bash
brew install node git
```

### Step 3 โ€” Install uv
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
```

> โš ๏ธ Save the path from `which uv` โ€” you'll need it for Claude Desktop config.

### Step 4 โ€” Clone and Install
```bash
git clone https://github.com/Secure-tree/kaushik-linkedin-mcp
cd kaushik-linkedin-mcp
uv sync
uv run playwright install chromium
```

### Step 5 โ€” Authenticate with LinkedIn
```bash
uv run kaushik-linkedin-mcp --login
```
A Chrome window opens. Log in to your LinkedIn. Session saves automatically.

### Step 6 โ€” Verify Session
```bash
uv run kaushik-linkedin-mcp --status
# Status: Valid  โœ…
```

### Step 7 โ€” Connect to Claude Desktop

Open: `~/Library/Application Support/Claude/claude_desktop_config.json`

Merge this in:
```json
{
  "mcpServers": {
    "linkedin": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/YOUR_USERNAME/kaushik-linkedin-mcp",
        "run",
        "kaushik-linkedin-mcp"
      ]
    }
  }
}
```

> โš ๏ธ Use the full path to `uv` from `which uv` โ€” Claude Desktop does not inherit your terminal PATH.

Restart Claude:
```bash
pkill -f Claude && sleep 2 && open /Applications/Claude.app
```

---

## ๐Ÿ—๏ธ Project Structure

```
kaushik-linkedin-mcp/
โ”œโ”€โ”€ pyproject.toml                      # Project config, CLI entry point, dependencies
โ”œโ”€โ”€ .python-version                     # Pins Python 3.12
โ”œโ”€โ”€ .env.example                        # Config template โ€” copy to .env
โ”œโ”€โ”€ .gitignore                          # Protects session data and .env
โ”œโ”€โ”€ LICENSE                             # MIT
โ””โ”€โ”€ src/
    โ””โ”€โ”€ kaushik_linkedin_mcp/
        โ”œโ”€โ”€ __init__.py
        โ”œโ”€โ”€ server.py                   # FastMCP server โ€” all 8 tools
        โ”œโ”€โ”€ browser.py                  # Playwright session manager
        โ””โ”€โ”€ tools/
            โ”œโ”€โ”€ profile.py              # get_person_profile
            โ”œโ”€โ”€ jobs.py                 # search_jobs + get_job_details
            โ”œโ”€โ”€ posts.py                # publish_linkedin_post
            โ””โ”€โ”€ search.py              # search_people + get_company_profile
```

---

## โš™๏ธ How It Works

```
You (in Claude chat)
        โ”‚
        โ”‚  "Search for Security Engineer jobs in Pennsylvania"
        โ–ผ
Claude Desktop
        โ”‚  stdio (local process)
        โ–ผ
kaushik-linkedin-mcp (Python / FastMCP)
        โ”‚  Playwright browser automation
        โ–ผ
Chromium (headless, on your Mac)
        โ”‚  HTTPS โ€” your authenticated session
        โ–ผ
LinkedIn.com โ†’ returns structured JSON back to Claude
```

> **Note for cloners:** Session saves to `~/.kaushik-linkedin-mcp/session/storage.json` on YOUR machine. The author has zero access to your account.

---

## ๐Ÿงฐ Tools Reference

| Tool | Parameters |
|------|-----------|
| `get_person_profile` | `linkedin_username`, `sections` (main/experience/education/skills/posts/contact) |
| `search_linkedin_people` | `keywords`, `location`, `max_results` (1โ€“100) |
| `search_linkedin_jobs` | `keywords`, `location`, `date_posted`, `experience_level`, `job_type`, `work_type`, `easy_apply`, `max_pages` |
| `get_linkedin_job_details` | `job_id` |
| `get_linkedin_company` | `company_name`, `sections` (about/posts/jobs) |
| `publish_linkedin_post` | `text` |
| `check_session_status` | โ€” |
| `close_browser` | โ€” |

---

## ๐Ÿ‘ฅ For People Cloning This Repo

When you clone and run this, you log into **your own LinkedIn** โ€” not the author's.

| Thing | Change Required |
|-------|----------------|
| `--login` step | Log in with YOUR LinkedIn credentials |
| Claude Desktop config | Update path to YOUR clone location and `uv` path |
| `.env` | Optional โ€” defaults work for most setups |
| `pyproject.toml` author | Leave as-is โ€” this is the author's name |

**Quick start:**
```bash
git clone https://github.com/Secure-tree/kaushik-linkedin-mcp
cd kaushik-linkedin-mcp
uv sync
uv run playwright install chromium
uv run kaushik-linkedin-mcp --login
uv run kaushik-linkedin-mcp --status
```

---

## ๐Ÿ” Security

| Check | Status |
|-------|--------|
| No hardcoded credentials | โœ… |
| No JS template literal injection | โœ… User values passed via CDP args |
| Input validation | โœ… max_results clamped 1โ€“100 |
| Session stored outside repo | โœ… `~/.kaushik-linkedin-mcp/` |
| `.env` never committed | โœ… In .gitignore |
| No shell/subprocess calls | โœ… |
| No 3rd party API calls | โœ… Only linkedin.com |
| Local stdio communication | โœ… No network exposure |

---

## ๐Ÿ”ง Troubleshooting

**No LinkedIn tools in Claude**
โ†’ Use full `uv` path in config: `which uv` โ†’ `/Users/YOU/.local/bin/uv`

**Status: Expired/Invalid**
โ†’ `uv run kaushik-linkedin-mcp --logout && uv run kaushik-linkedin-mcp --login`

**`npm install` fails**
โ†’ This is Python. Use `uv sync` not npm install.

**Config has two `{}` blocks**
โ†’ Merge into one root object: `{ "preferences": {...}, "mcpServers": {...} }`

---

## โšก Quick Reference

```bash
# Setup
git clone https://github.com/Secure-tree/kaushik-linkedin-mcp
cd kaushik-linkedin-mcp && uv sync
uv run playwright install chromium
uv run kaushik-linkedin-mcp --login
uv run kaushik-linkedin-mcp --status

# Restart Claude after config changes
pkill -f Claude && sleep 2 && open /Applications/Claude.app

# Re-authenticate
uv run kaushik-linkedin-mcp --logout && uv run kaushik-linkedin-mcp --login
```

---

## ๐Ÿ‘ค Author

**Kaushik Muthukumaran**
Security Engineer | AI + Cybersecurity Researcher 

- ๐Ÿ”— [LinkedIn](https://www.linkedin.com/in/kaushik-muthukumaran-a901612a2)
- ๐Ÿ“ง kaushikrmk01@gmail.com
- ๐Ÿ…  Ms in Cybersecurity
- ๐Ÿ… CompTIA Network+ Certified
- ๐Ÿ”ฌ Research: AI-Driven Threat Detection ยท Zero Trust ยท ML Risk Scoring and Remediation

---

## ๐Ÿ“„ License

MIT License โ€” see [LICENSE](LICENSE) for details.

---

*Built with Claude AI (Anthropic) ยท FastMCP ยท Playwright ยท Python 3.12*

Maintenance

ActivityInactive
ResponsivenessNo issues