LI

Linked API MCP Server for LinkedIn Automation

Connect your LinkedIn to AI assistants via MCP server to find leads, send messages, and analyze profiles automatically and securely.

Quick Install
npx -y @Linked-API/linkedapi-mcp

Overview

Linked API MCP Server connects your LinkedIn account to AI assistants (Claude, Cursor, VS Code extensions, etc.) using the Model Context Protocol (MCP). It runs a controlled browser session that performs LinkedIn actions — searching for people or companies, reading profiles and conversations, sending messages, and exporting data — so an assistant can request these operations programmatically. The server acts as a bridge between an LLM agent and the web interface, automating repetitive workflows while keeping authentication and browser control in one place.

This approach is useful for sales, recruiting, research, and social selling workflows where you want an AI to fetch, summarize, or act on LinkedIn data without exposing your credentials or manually driving the browser. The MCP server centralizes session management, exposes a small set of tools the assistant can call, and is designed to be run in your infrastructure (local, cloud VM, or container) so you keep control of data and access.

Features

  • Exposes MCP-compatible operations to AI agents for LinkedIn automation
  • Headless or cloud browser-based LinkedIn session management
  • Common LinkedIn workflows: people search, profile inspection, messaging, conversation reading, and lead export
  • Session persistence (cookies / local storage) to avoid repeated logins
  • Simple authentication for the MCP API (API key / token)
  • Designed for self-hosting (Docker / node) so data and credentials stay under your control
  • Example usage patterns and policy-aware automation (rate limits, manual review)

Installation / Configuration

Minimum requirements: Node.js 16+ (or use Docker). Clone the repo, configure environment variables, then run.

Quick start (local Node):

git clone https://github.com/Linked-API/linkedapi-mcp.git
cd linkedapi-mcp
npm install
cp .env.example .env
# Edit .env to set credentials and API key
npm start

Example .env (replace values):

PORT=3000
MCP_API_KEY=changeme
[email protected]
LINKEDIN_PASSWORD=yourpassword
SESSION_DIR=./sessions
HEADLESS=true

Quick start (Docker):

docker build -t linkedapi-mcp .
docker run -d -p 3000:3000 \
  -e MCP_API_KEY=changeme \
  -e [email protected] \
  -e LINKEDIN_PASSWORD=yourpassword \
  -v /host/sessions:/app/sessions \
  --name linkedapi-mcp linkedapi-mcp

Example: call the server with curl (typical MCP request format):

curl -X POST "https://mcp.example.com/mcp/call" \
  -H "Authorization: Bearer ${MCP_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "searchPeople",
    "params": {
      "keywords": "software engineer",
      "location": "San Francisco Bay Area",
      "company_size": "50-200",
      "limit": 20
    }
  }'

Note: Check the repository README for exact endpoint names and request/response schema. The server may expose different paths or additional query options.

Available Tools / Resources

Common tools exposed by the MCP server (names and parameters vary by release):

Tool namePurposeTypical params
searchPeopleRun a LinkedIn people search and return result listkeywords, location, company_size, title, limit, page
getProfileFetch a public/private profile summaryprofileUrl or profileId
getCompanyFetch company details and employees listcompanyUrl or companyId, limit
sendMessageSend an InMail/connection messageprofileId, messageBody, connectionType
listConversationsRead existing LinkedIn conversationslimit, unread_only
exportLeadsExport lead list as CSV/JSONqueryId, fields
downloadProfilePDFSave a profile as PDFprofileId

Resources:

  • GitHub repository: https://github.com/Linked-API/linkedapi-mcp
  • Documentation pages (installation, tools, examples) linked in the repo

Use Cases (concrete examples)

  • Sales prospecting: Ask your assistant to “find software engineering managers at mid-size fintechs in London” — the assistant issues searchPeople, inspects top profiles with getProfile, and returns a prioritized list with suggested connection messages.
  • Recruitment screening: Run searchPeople with required skills, then call getProfile for each candidate and produce a short summary (experience, top skills, education). Optionally use sendMessage to send initial outreach templates.
  • Conversation assistance: Use listConversations to pull recent thread context. The assistant can draft contextual replies and call sendMessage or schedule a follow-up.
  • Market research: Call getCompany for a list of competitors, aggregate employee counts and recent posts, and export findings with exportLeads for downstream analysis.

Security & Best Practices

  • Run the server in your trusted environment and control access via API key or network rules.
  • Use HTTPS and a reverse proxy in production, and rotate the MCP API key regularly.
  • Store LinkedIn credentials and session files on disk encrypted or in a secure secret store.
  • Respect LinkedIn terms of service and rate limits. Add manual review steps for outreach to avoid spammy behavior.
  • Log minimally; avoid persisting full message bodies or PII in logs unless necessary and encrypted.

The project is MIT-licensed. For source, examples, and the authoritative API schema, see the GitHub repository: https://github.com/Linked-API/linkedapi-mcp.