
MCP server for LinkedIn API interaction enabling profile search and data retrieval
MCP server for LinkedIn API interaction enabling profile search and data retrieval
Important: For detailed instructions on obtaining access tokens and authentication for LinkedIn API, refer to the official documentation: Getting Access to LinkedIn API
git clone https://github.com/Dishant27/linkedin-mcp-server.git cd linkedin-mcp-server npm install
.env
FileCreate a .env
file in the project root:
LINKEDIN_CLIENT_ID=your_client_id_here
LINKEDIN_CLIENT_SECRET=your_client_secret_here
claude_desktop_config.json
(for Claude Desktop){ "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" } } } }
{ "tools": [ { "name": "search-people", "description": "Search for LinkedIn profiles", "parameters": { "type": "object", "properties": { "keywords": { "type": "string", "description": "Keywords to search for in profiles" }, "currentCompany": { "type": "array", "items": {"type": "string"}, "description": "Filter by current company" }, "industries": { "type": "array", "items": {"type": "string"}, "description": "Filter by industries" }, "location": { "type": "string", "description": "Filter by location" } } } }, { "name": "get-profile", "description": "Retrieve detailed LinkedIn profile information", "parameters": { "type": "object", "properties": { "publicId": { "type": "string", "description": "Public ID of the LinkedIn profile" }, "urnId": { "type": "string", "description": "URN ID of the LinkedIn profile" } } } } ] }
npm run build npm start
> Find software engineers in San Francisco working at tech companies
# The LLM will use the search-people tool to:
# 1. Search LinkedIn profiles
# 2. Filter by location (San Francisco)
# 3. Filter by industry (Technology)
# 4. Return relevant profile details
Check out the detailed article explaining the concept and implementation:
LinkedInMCP is an innovative Model Context Protocol (MCP) server designed to transform how developers interact with LinkedIn's API. Born from the need for more flexible and powerful LinkedIn data integration, this project provides a robust, extensible framework for advanced LinkedIn data retrieval and interaction.
Recognizing the limitations of traditional LinkedIn API approaches, this solution creates a more intelligent, context-aware method of working with professional network data.
LinkedInMCP enables powerful applications for business settings:
The comprehensive security model of LinkedInMCP implements multiple layers of protection:
linkedin-mcp-server/
│
├── src/
│ ├── index.ts # Main server entry point
│ ├── auth.ts # LinkedIn authentication handler
│ └── client.ts # LinkedIn API interaction client
│
├── dist/ # Compiled JavaScript files
│ ├── index.js
│ ├── auth.js
│ └── client.js
│
├── .env # Secret environment variables
├── .env.example # Template for environment variables
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
Inspired by the project? Contributions are welcome!
Distributed under the MIT License.
Disclaimer: This project is an independent innovation and is not officially affiliated with LinkedIn or Microsoft.