这是一个用于获取LinkedIn个人资料的模型上下文协议(MCP)服务器。返回的数据以YAML格式呈现。
使用dotnet全局安装工具:
dotnet tool install --global Linkedin.Mcp
该工具需要设置APIFY_TOKEN环境变量。
Windows (PowerShell):
$env:APIFY_TOKEN = "your-apify-token-here"
# 要使设置在会话之间持久化:
[System.Environment]::SetEnvironmentVariable('APIFY_TOKEN', 'your-apify-token-here', 'User')
Linux/macOS:
export APIFY_TOKEN=your-apify-token-here
# 要使设置持久化,请添加到~/.bashrc或~/.zshrc中:
echo 'export APIFY_TOKEN=your-apify-token-here' >> ~/.bashrc
将MCP服务器添加到您的Claude Code配置文件中。
位置:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.json配置:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp",
"env": {
"APIFY_TOKEN": "your-apify-token-here"
}
}
}
}
或者,如果您已经全局设置了环境变量,可以省略env部分:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp"
}
}
}
配置完成后,请重启Claude Code。LinkedIn MCP服务器将通过以下工具可用:
fetch-profile获取LinkedIn个人资料,并以YAML格式返回。
参数:
profile_url(必需):LinkedIn个人资料URLinclude(可选):要包含在输出中的可选部分数组。如果未指定,则包含所有部分。可用的可选部分:
experiences - 工作经历历史updates - 最近的活动和帖子profilePicAllDimensions - 所有个人资料图片尺寸skills - 技能和推荐educations - 教育背景licenseAndCertificates - 专业认证honorsAndAwards - 荣誉和奖项languages - 语言熟练度volunteerAndAwards - 志愿工作verifications - 个人资料验证promos - 推广内容highlights - 个人资料亮点projects - 项目publications - 出版物patents - 专利courses - 课程testScores - 测试分数organizations - 组织volunteerCauses - 志愿事业interests - 兴趣recommendations - 推荐注意: 基本个人资料字段(如姓名、职位、地点、简介等)始终会被包括,无论include参数如何。
示例提示:
支持的URL格式:
https://www.linkedin.com/in/usernamehttps://linkedin.com/in/usernamehttp://www.linkedin.com/in/usernamelinkedin.com/in/username