Skip to main content
Glama
LinkedIn Automation MCP Server

LinkedIn Automation MCP Server

by dzigi00

LinkedIn Claude Automation

Full LinkedIn growth automation using Claude Code and a custom LinkedIn MCP server. Runs daily via Windows Task Scheduler with zero manual interaction required.

What it does

Every day at 2pm automatically:

  • Checks your LinkedIn inbox and replies to messages in In English (Serbian also supported) with high-quality, human-feeling responses

  • Relevant, high-quality and human-feeling posts

  • Sends 7 to 8 personalized connection requests

  • Tracks your connection count growth daily

  • Prints a full session report

On Monday, Wednesday, and Friday it also:

  • Asks you for a post idea (60 second window)

  • Auto-generates and publishes a post in your voice if you don't respond

Related MCP server: @maheidem/linkedin-mcp

How it works

This project extends the linkedin-scraper-mcp package by adding two missing tools:

  • create_post - publishes a post to your LinkedIn profile

  • comment_on_post - leaves a comment on any LinkedIn post

These tools use browser automation (Patchright/Chromium) to interact with LinkedIn's UI directly.

Claude Code reads a prompt file (linkedin_daily.md) that contains detailed instructions for the daily automation. Windows Task Scheduler fires the bat file at 2pm every day.

Requirements

  • Windows PC (always on during automation time)

  • Claude Code installed

  • UV installed

  • Claude Pro or API access

Setup

1. Install UV

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Clone and install the custom MCP

git clone https://github.com/dzigi00/linkedin-claude-automation C:\Users\<you>\linkedin-mcp-custom
cd C:\Users\<you>\linkedin-mcp-custom
uv sync

3. Login to LinkedIn

uv run -m linkedin_mcp_server --login

A browser opens. Log in to your LinkedIn account. Session is saved automatically.

4. Register the MCP with Claude Code

claude mcp add linkedin -s user -- "C:\Users\<you>\.local\bin\uv.exe" "--directory" "C:\Users\<you>\linkedin-mcp-custom" "run" "-m" "linkedin_mcp_server" "--transport" "stdio"

5. Copy the automation files

Copy linkedin_daily.md and run_linkedin.bat to C:\Users\<you>\

Edit linkedin_daily.md to match your profile, niche, and content topics.

Edit run_linkedin.bat to replace the path with your actual username.

6. Schedule with Windows Task Scheduler

  • Open Task Scheduler

  • Create Basic Task

  • Name: LinkedIn Daily

  • Trigger: Daily at 2:00 PM

  • Action: Start a program

  • Program: C:\Users\<you>\run_linkedin.bat

  • Start in: C:\Users\<you>

7. Customize for your profile

Before running the automation, open linkedin_daily.md and update these sections to match your own profile:

  • Your story - replace the mechanic to funnel builder background with your own journey

  • Content pillars - replace the listed topics with your own niche and expertise

  • Target audience - update the countries, job titles, and industries you want to connect with

  • Brands and clients - replace AICom, EcomDegree, Publishing.com with your own work history

  • Location exclusions - update or remove the North Macedonia exclusion based on your situation

  • Voice and tone - the casual, direct style works for most people but adjust if needed

The linkedin_daily.md file is the brain of the automation. Everything Claude does daily is driven by the instructions in that file. Spend 10 minutes personalizing it before your first run.

8. Fix: Auto-trust the working directory

By default Claude Code asks "Do you trust this folder?" every first run. To skip this permanently, run this once in PowerShell:

$json = Get-Content "C:\Users\<you>\.claude.json" -Raw | ConvertFrom-Json
$json.projects."C:\Users\<you>".hasTrustDialogAccepted = $true
$json | ConvertTo-Json -Depth 100 | Set-Content "C:\Users\<you>\.claude.json" -Encoding utf8

Replace <you> with your actual Windows username.

Files

  • linkedin_mcp_server/tools/posting.py - custom create_post and comment_on_post tools

  • linkedin_daily.md - daily automation prompt instructions

  • run_linkedin.bat - Windows Task Scheduler script

Credit

Built on top of stickerdaniel/linkedin-mcp-server. This project adds write capabilities (posting and commenting) that the original package does not include.

License

MIT

Available Tools

17 tools
close_sessionClose SessionA
Destructive

Close the current browser session and clean up resources.

Inputs: no named parameters. Returns: object

connect_with_personConnect With PersonA
Destructive

Send a LinkedIn connection request or accept an incoming one.

The tool is annotated with destructiveHint so MCP clients will prompt for user confirmation before execution.

Inputs: linkedin_username (required), note. Returns: object

get_company_employeesGet Company EmployeesA
Read-only

List employees at a company from the LinkedIn /people/ page, including the demographics aggregate that this view exposes: where employees live, where they studied, and a function breakdown (Engineering, Sales, Operations, etc.). The demographics are unique to this tool.

For filtered search by network degree (1st/2nd/3rd) or location, prefer search_people with current_company set to the company URN id. That path also returns more result pages than the /people/ tab.

The optional keywords filter narrows results by name, title, or skill.

company_name must be the exact LinkedIn URL slug (the path segment after /company/), not the display name. LinkedIn assigns unique slugs and the display name often does not match. For example, the AI lab Anthropic lives at /company/anthropicresearch/, not /company/anthropic/. If you are unsure of the slug, call search_companies first and pick the slug from the returned references.

Inputs: company_name (required), keywords. Returns: object

get_company_postsGet Company PostsA
Read-only

Get recent posts from a company's LinkedIn feed.

Inputs: company_name (required). Returns: object

get_company_profileGet Company ProfileA
Read-only

Get a specific company's LinkedIn profile.

Inputs: company_name (required), sections. Returns: object

get_conversationGet ConversationA
Read-only

Read a specific messaging conversation.

Provide either linkedin_username or thread_id to identify the conversation.

When looked up by linkedin_username, resolution searches the messaging inbox for the participant's display name and click-visits every matching row to capture its thread ID — LinkedIn's sidebar has no anchor hrefs or thread-id attributes, so this is the only available path. Each visit selects the row in the LinkedIn UI and may mark it as read. Pass thread_id directly to skip this enumeration.

Inputs: index, thread_id, linkedin_username. Returns: object

get_feedGet FeedA
Read-only

Get posts from the authenticated user's LinkedIn feed.

Inputs: num_posts. Returns: object

get_inboxGet InboxA
Read-only

List recent conversations from the LinkedIn messaging inbox.

Inputs: limit. Returns: object

get_job_detailsGet Job DetailsA
Read-only

Get job details for a specific job posting on LinkedIn.

Inputs: job_id (required). Returns: object

get_my_profileGet My ProfileA
Read-only

Get the authenticated user's own LinkedIn profile.

Navigates to /in/me/ and resolves the redirect to obtain the real username before scraping, so the url field in the result is the actual profile URL (e.g. linkedin.com/in/johndoe/) rather than /in/me/.

Inputs: sections, max_scrolls. Returns: object

get_person_profileGet Person ProfileA
Read-only

Get a specific person's LinkedIn profile.

Inputs: linkedin_username (required), sections, max_scrolls. Returns: object

get_sidebar_profilesGet Sidebar ProfilesA
Read-only

Get profile links from sidebar recommendation sections on a LinkedIn profile page.

Extracts profiles from "More profiles for you", "Explore premium profiles", and "People you may know" sidebar sections. Follows "Show all" links to return the full list from each section. Sections that redirect to linkedin.com/premium are skipped.

Inputs: linkedin_username (required). Returns: object

search_companiesSearch CompaniesB
Read-only

Search for companies on LinkedIn.

Inputs: keywords (required). Returns: object

search_conversationsSearch ConversationsB
Read-only

Search messages by keyword.

Inputs: keywords (required), limit. Returns: object

search_jobsSearch JobsA
Read-only

Search for jobs on LinkedIn.

Returns job_ids that can be passed to get_job_details for full info.

Inputs: keywords (required), sort_by, job_type, location, +5 more. Returns: object

search_peopleSearch PeopleA
Read-only

Search for people on LinkedIn.

Inputs: keywords (required), network, location, current_company. Returns: object

send_messageSend MessageA
Destructive

Send a message to a LinkedIn user.

The recipient must be directly messageable from the profile page. This is a write operation when confirm_send is True.

Inputs: message (required), confirm_send (required), linkedin_username (required), profile_urn. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: profiles, searches, messaging, feed, session, etc. Even the messaging-related tools (search_conversations, get_inbox, get_conversation, send_message) have clear, non-overlapping purposes. No two tools appear to do the same thing.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (get_person_profile, search_jobs, send_message, close_session). The naming is predictable and easy to infer the function of each tool. Minor variations like 'connect_with_person' still fit the overall pattern.

    Tool Count4/5

    With 17 tools, the server is slightly above the ideal typical range of 3-15 but not excessive. Each tool covers a distinct aspect of LinkedIn automation, so the count is justified for the scope. It feels on the heavier side but still manageable.

    Completeness4/5

    The tools cover the primary LinkedIn automation domains: profiles (get, search), companies (search, profile, posts, employees), jobs (search, details), messaging (search, inbox, read, send), connections (send/accept), feed, and session management. Minor gaps exist such as no explicit 'reject connection' or 'create post', but these are not core for most automation workflows. Overall, the surface is well-rounded.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Connects Claude Desktop to LinkedIn's data layer for AI-powered networking, enabling profile research, content creation and scheduling, engagement automation, analytics tracking, and messaging through natural language.
      85
      46
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Integrates with Claude to enable LinkedIn post creation, profile optimization, content generation, and analytics through natural language.
      13
      57 npm
      2
      MIT