LinkedIn Profile Scraper MCP Server

Integrations

  • Loads environment variables from a .env file to access configuration settings like API keys.

  • Provides repository access for installation of the MCP server from the Awesome-MCP-Server GitHub repository.

  • Connects to the Fresh LinkedIn Profile Data API on RapidAPI to fetch LinkedIn profile information including skills and other profile details.

LinkedIn 个人资料抓取器 MCP 服务器

此 MCP 服务器使用 Fresh LinkedIn Profile Data API 来获取 LinkedIn 个人资料信息。它以模型上下文协议 (MCP) 服务器的形式实现,并公开了一个工具get_profile ,该工具接受 LinkedIn 个人资料 URL 并以 JSON 格式返回个人资料数据。

特征

  • **获取个人资料数据:**检索 LinkedIn 个人资料信息,包括技能和其他设置(大多数附加详细信息已禁用)。
  • **异步 HTTP 请求:**使用httpx进行非阻塞 API 调用。
  • **基于环境的配置:**使用dotenv从环境变量中读取RAPIDAPI_KEY

先决条件

  • Python 3.7+ – 确保您使用的是 Python 3.7 或更高版本。
  • **MCP 框架:**确保已安装 MCP 框架。
  • **所需库:**安装httpxpython-dotenv和其他依赖项。
  • **RAPIDAPI_KEY:**RapidAPI获取 API 密钥并将其添加到项目目录中的.env文件中(或在您的环境中进行设置)。

安装

  1. 克隆存储库:
    git clone https://github.com/AIAnytime/Awesome-MCP-Server cd linkedin_profile_scraper
  2. 安装依赖项:
    uv add mcp[cli] httpx requests
  3. 设置环境变量:在项目目录中创建一个.env文件,其内容如下:
    RAPIDAPI_KEY=your_rapidapi_key_here

运行服务器

要运行 MCP 服务器,请执行:

uv run linkedin.py

服务器将启动并通过标准 I/O 监听传入的请求。

MCP 客户端配置

要将您的 MCP 客户端连接到此服务器,请将以下配置添加到您的config.json中。请根据您的环境调整路径:

{ "mcpServers": { "linkedin_profile_scraper": { "command": "C:/Users/aiany/.local/bin/uv", "args": [ "--directory", "C:/Users/aiany/OneDrive/Desktop/YT Video/linkedin-mcp/project", "run", "linkedin.py" ] } } }

代码概述

  • **环境设置:**服务器使用dotenv加载使用 Fresh LinkedIn Profile Data API 进行身份验证所需的RAPIDAPI_KEY
  • **API 调用:**异步函数get_linkedin_data使用指定的查询参数向 API 发出 GET 请求。
  • MCP 工具: get_profile工具包装 API 调用并返回格式化的 JSON 数据,如果调用失败则返回错误消息。
  • 服务器执行: MCP 服务器通过stdio传输运行。

故障排除

  • **缺少 RAPIDAPI_KEY:**如果未设置该密钥,服务器将引发ValueError 。请确保已将该密钥添加到您的.env文件或在您的环境中进行设置。
  • **API 错误:**如果 API 请求失败,该工具将返回一条消息,表明无法获取配置文件数据。

执照

本项目遵循 MIT 许可证。更多详情请参阅许可证文件。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

MCP 服务器使用 Fresh LinkedIn 个人资料数据 API 获取 LinkedIn 个人资料信息,允许用户通过提供 LinkedIn 个人资料 URL 来检索 JSON 格式的个人资料数据。

  1. Features
    1. Prerequisites
      1. Installation
        1. Running the Server
          1. MCP Client Configuration
            1. Code Overview
              1. Troubleshooting
                1. License
                  ID: vlktyv152j