Get the FREE Ultimate OpenClaw Setup Guide →

linkedin

Model Context Protocol (MCP) server for LinkedIn API integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dishant27-linkedin-mcp-server node /absolute/path/to/linkedin-mcp-server/dist/index.js \
  --env LINKEDIN_CLIENT_ID="your_client_id" \
  --env LINKEDIN_CLIENT_SECRET="your_client_secret"

How to use

LinkedInMCP is a dedicated MCP server that enables LLMs to interact with LinkedIn data through a structured, context-aware interface. The core capabilities exposed by this server include advanced people search (search-people) to find profiles based on keywords, location, industry, and current company, and get-profile to retrieve detailed information about a specific LinkedIn profile using identifiers such as publicId or urnId. These tools are designed to be invoked by the LLM within an MCP workflow, allowing seamless, authenticated requests to LinkedIn data with typed inputs and validated outputs. In practice, you would initialize the MCP server, configure authentication with your LinkedIn credentials, and then expose tools in your LLM configuration so the model can request targeted profile data or search results as part of a larger automation or analysis task.

How to install

Prerequisites:

  • Node.js 16+ installed on your machine
  • npm (comes with Node.js)
  • A LinkedIn Developer account with an app and obtained Client ID and Client Secret

Installation steps:

  1. Clone the repository git clone https://github.com/Dishant27/linkedin-mcp-server.git cd linkedin-mcp-server

  2. Install dependencies npm install

  3. Create environment configuration

    • Create a .env file in the project root (optional if using explicit env in config): LINKEDIN_CLIENT_ID=your_client_id LINKEDIN_CLIENT_SECRET=your_client_secret
  4. Build and run the server

    • Build (if a build script is provided): npm run build
    • Start the MCP server: npm start
  5. Prepare the MCP configuration for your environment Example (Claude Desktop / Claude MCP integration):

    • Save the following as claude_desktop_config.json or adapt to your environment: { "mcpServers": { "linkedin": { "command": "node", "args": ["/absolute/path/to/linkedin-mcp-server/dist/index.js"], "env": { "LINKEDIN_CLIENT_ID": "your_client_id", "LINKEDIN_CLIENT_SECRET": "your_client_secret" } } } }

Prerequisites recap: ensure Node.js 16+ is installed, you have a LinkedIn developer app with Client ID and Secret, and you configure the MCP server to point to the built dist/index.js with proper environment variables.

Additional notes

Tips and common considerations:

  • Security: Never commit your LinkedIn credentials to version control. Use environment variables to manage secrets.
  • Token handling: The server relies on OAuth 2.0; ensure your token refresh workflow is in place if tokens expire during long sessions.
  • Environment parity: When deploying, mirror production environment variables and ensure the dist/index.js path is correctly resolved in your MCP config.
  • Tool availability: The core tools exposed are search-people and get-profile. You can extend tooling via the MCP layer to incorporate additional LinkedIn data endpoints (e.g., job insights, messaging) if supported by the API and your app configuration.
  • Rate limits: Be mindful of LinkedIn API rate limits; implement appropriate backoff strategies in the LLM-driven workflows.
  • Debugging: If the server fails to start, check that the dist/index.js exists, Node.js version compatibility, and that environment variables are correctly loaded.
  • CLI alternatives: If you prefer local testing, you can temporarily run node dist/index.js directly after building to verify startup and basic responses.

Related MCP Servers

Sponsor this space

Reach thousands of developers