MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

MCP server for reading information from LinkedIn page as admin or LinkedIn profile as user

创建于 1/22/2026
更新于 about 1 month ago
Repository documentation and setup instructions

linkedin-mcp

MCP server for LinkedIn Pages Data Portability API. This server provides tools to interact with LinkedIn organizational pages, including profiles, feed content, follows, notifications, and analytics.

Overview

This MCP (Model Context Protocol) server implements the LinkedIn Pages Data Portability API, which requires admin-level access for a LinkedIn page. It provides comprehensive tools for managing and analyzing organizational page content.

For detailed project specifications and implementation details, see PROJECT.md.

Important: LinkedIn API Access Requirements

LinkedIn has strict policies regarding automated access to their platform. You must create an official LinkedIn app through their developer portal and submit an application for the specific feature you need to access. The application approval process may take several days, and LinkedIn reviews each request carefully.

This server is specifically designed to work with company/organizational page accounts rather than personal profiles, as this is the least problematic use case that LinkedIn typically approves. The Pages Data Portability API requires admin-level access to a LinkedIn organizational page, making it suitable for businesses and organizations to monitor and analyze their own page content, followers, and analytics.

Features

Pages Profiles

  • Organizational Page Profiles: Retrieve organizational page profile information

Feed

  • Activities: Get feed activities for organizational pages
  • Posts: Retrieve and manage posts
  • Instant Repost: Create instant reposts of existing content
  • Comments: Get comments for posts
  • Reactions: Retrieve reactions on posts
  • Social Metadata: Get social metadata for content
  • Feed Content Finder: Search and find feed content

Pages Follows

  • Organizational Page Follow: Get followers for organizational pages

Notifications

  • Organizational Page Notifications: Retrieve notifications for organizational pages

Analytics

  • Creator Analytics: Get creator analytics data
  • Organization Search Appearance: Retrieve search appearance analytics
  • Organizational Page Edge Analytics: Get edge analytics for pages
  • Organizational Page Content Analytics: Retrieve content analytics

Setup

Prerequisites

  • Python 3.11 or higher
  • A LinkedIn Developer account
  • An approved LinkedIn application with access to Pages Data Portability API
  • LinkedIn API credentials (Client ID, Client Secret, and OAuth Access Token)
  • Admin access to a LinkedIn organizational page

Getting LinkedIn API Access

  1. Create a LinkedIn Developer Account: Visit LinkedIn Developers and create an account if you don't have one.

  2. Create a LinkedIn App: Create a new app in the LinkedIn Developer portal. You'll receive a Client ID and Client Secret.

  3. Submit Feature Application: Submit an application for the Pages Data Portability API feature. This is required to access organizational page data. The approval process may take several days.

  4. Obtain OAuth Access Token: Once your application is approved, you'll need to complete the OAuth flow to obtain an access token. Note that OAuth access tokens expire after 2 months and will need to be refreshed.

For more information, see the LinkedIn Pages Data Portability API documentation.

Installation

  1. Clone the repository:
git clone <repository-url>
cd linkedin-mcp
  1. Install dependencies using uv:
uv sync
  1. Create a .env file in the project root with your LinkedIn API credentials:
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
LINKEDIN_ACCESS_TOKEN=your_access_token

Important Notes:

  • OAuth access tokens expire after 2 months and will need to be refreshed
  • The .env file is already in .gitignore and will not be committed to version control
  • If you don't have an access token yet, leave LINKEDIN_ACCESS_TOKEN blank in the .env file

Running the Server

Start the MCP server:

python -m src.main

The server will start on port 8080 by default.

Available Tools

This server provides 15 tools organized into the following categories:

Pages Profiles

  • get_organizational_page_profile - Retrieve organizational page profile information

Feed Management

  • get_feed_activities - Get feed activities for organizational pages
  • get_posts - Retrieve posts for an organizational page
  • get_post - Get a specific post by ID
  • create_instant_repost - Create an instant repost of existing content
  • get_comments - Get comments for a post
  • get_reactions - Retrieve reactions on posts
  • get_social_metadata - Get social metadata for content
  • find_feed_content - Search and find feed content using criteria

Pages Follows

  • get_page_followers - Get followers for an organizational page

Notifications

  • get_page_notifications - Retrieve notifications for an organizational page

Analytics

  • get_creator_analytics - Get creator analytics data
  • get_organization_search_appearance - Retrieve search appearance analytics
  • get_page_edge_analytics - Get edge analytics for pages
  • get_page_content_analytics - Retrieve content analytics

API Reference

This server uses the LinkedIn API Python Client library and implements the LinkedIn Pages Data Portability API.

For detailed API documentation and subpages for each feature, refer to the Microsoft Learn documentation.

Project Structure

project-root/
├── src/
│   ├── main.py             # Entry point and server setup
│   └── tools.py            # Tool definitions for LinkedIn API
├── .env                    # Environment variables (not in git)
├── .gitignore              # Git ignore rules
├── pyproject.toml          # Project configuration and dependencies
├── uv.lock                 # Dependency lock file
├── PROJECT.md              # Detailed project specifications (not in git)
└── README.md               # This file

Development

The tools in this server are currently scaffolded with placeholder implementations. Once you have an approved LinkedIn API access token, you'll need to implement the actual API calls in src/tools.py using the LinkedIn API client library.

Each tool function includes # TODO comments indicating where the actual API implementation should be added.

License

See LICENSE for details.

快速设置
此服务器的安装指南

安装命令 (包未发布)

git clone https://github.com/NickyHeC/linkedin-mcp
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。

Cursor 配置 (mcp.json)

{ "mcpServers": { "nickyhec-linkedin-mcp": { "command": "git", "args": [ "clone", "https://github.com/NickyHeC/linkedin-mcp" ] } } }