RL

rugvedp/linkedin-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

35 stars 6 forks 质量 63 趋势 12MIT

一个强大的 LinkedIn 个人资料分析器 MCP(模型上下文协议)服务器,可与 LinkedIn API 交互,获取、分析和管理 LinkedIn 帖子数据。

概览

一个强大的 LinkedIn 个人资料分析器 MCP(模型上下文协议)服务器,可与 LinkedIn 的 API 交互,获取、分析和管理 LinkedIn 帖子数据。该 MCP 专为配合 Claude AI 设计。 - 获取并存储任何公开资料的 LinkedIn 帖子 - 通过关键词筛选搜索帖子 - 根据互动指标获取表现最佳帖子 - 按日期范围筛选帖子 - 按分页访问存储帖子 - 轻松集成 - Python 3.7+ - LinkedIn Data API 的 RapidAPI 密钥 - Claude AI 访问 1. 访问 LinkedIn 数据 API 上的 RapidAPI 2.注册或登录 RapidAPI 3.订阅 LinkedIn Data API 4.从仪表盘复制您的 RapidAPI 密钥 3. 设置环境变量:- 创建一个 .env 文件 - 添加你的 RapidAPI 密钥: mcp.json文件配置LinkedIn MCP服务器: 确保在 args 中更新路径,使其与你的本地文件位置匹配。 获取特定用户名的 LinkedIn 帖子并保存在本地。

概述(AI 翻译)

一个强大的 LinkedIn 个人资料分析器 MCP(模型上下文协议)服务器,可与 LinkedIn 的 API 交互,获取、分析和管理 LinkedIn 帖子数据。该 MCP 专为配合 Claude AI 设计。

特色

  • 获取并存储任何公开资料的LinkedIn帖子
  • 通过关键词筛选搜索帖子
  • 根据互动指标获得表现最佳的帖子
  • 按日期范围筛选帖子
  • 分页访问存储帖子
  • 与 Claude AI 的便捷集成

先修条件

  • Python 3.7+
  • LinkedIn 数据 API 的 RapidAPI 密钥
  • Claude AI 访问

开始

1.Get RapidAPI Key

  1. 访问 RapidAPI 上的 LinkedIn 数据 API
  2. 注册或登录 RapidAPI
  3. 订阅 LinkedIn 数据 API
  4. 从仪表盘复制你的 RapidAPI 密钥

2.安装

  1. 克隆仓库:

  2. 安装依赖:

  3. 设置环境变量:

  • 创建 .env 文件
  • 添加您的RapidAPI密钥:

项目结构

MCP 配置

mcp.json 文件配置了 LinkedIn MCP 服务器:

确保更新args中的路径,使其与本地文件位置一致。

可用工具

1.获取LinkedIn帖子

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

LinkedIn Profile Analyzer MCP

A powerful LinkedIn profile analyzer MCP (Model Context Protocol) server that interacts with LinkedIn’s API to fetch, analyze, and manage LinkedIn posts data. This MCP is specifically designed to work with Claude AI.

Features

  • Fetch and store LinkedIn posts for any public profile
  • Search through posts with keyword filtering
  • Get top performing posts based on engagement metrics
  • Filter posts by date range
  • Paginated access to stored posts
  • Easy integration with Claude AI

Prerequisites

  • Python 3.7+
  • RapidAPI key for LinkedIn Data API
  • Claude AI access

Getting Started

1. Get RapidAPI Key

  1. Visit LinkedIn Data API on RapidAPI
  2. Sign up or log in to RapidAPI
  3. Subscribe to the LinkedIn Data API
  4. Copy your RapidAPI key from the dashboard

2. Installation

  1. Clone the repository:
git clone https://github.com/rugvedp/linkedin-mcp.git
cd linkedin-mcp
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
    • Create a .env file
    • Add your RapidAPI key:
RAPIDAPI_KEY=your_rapidapi_key_here

Project Structure

linkedin-mcp/
├── main.py              # Main MCP server implementation
├── mcp.json            # MCP configuration file
├── requirements.txt    # Python dependencies
├── .env               # Environment variables
└── README.md          # Documentation

MCP Configuration

The mcp.json file configures the LinkedIn MCP server:

{
  "mcpServers": {
    "LinkedIn Updated": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "path/to/your/script.py"
      ]
    }
  }
}

Make sure to update the path in args to match your local file location.

Available Tools

1. fetch_and_save_linkedin_posts

Fetches LinkedIn posts for a given username and saves them locally.

fetch_and_save_linkedin_posts(username: str) -> str

2. get_saved_posts

Retrieves saved posts with pagination support.

get_saved_posts(start: int = 0, limit: int = 10) -> dict

3. search_posts

Searches posts for specific keywords.

search_posts(keyword: str) -> dict

4. get_top_posts

Returns top performing posts based on engagement metrics.

get_top_posts(metric: str = "Like Count", top_n: int = 5) -> dict

5. get_posts_by_date

Filters posts within a specified date range.

get_posts_by_date(start_date: str, end_date: str) -> dict

Using with Claude

  1. Initialize the MCP server in your conversation with Claude
  2. Use the available tools through natural language commands
  3. Claude will help you interact with LinkedIn data using these tools
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "LinkedIn Updated": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "path/to/your/script.py" ] } } }