LinkedIn MCP Server
Enables reading your own LinkedIn posts and articles inside Claude Desktop via LinkedIn's official OAuth 2.0 API.
README
LinkedIn MCP Server
Read your own LinkedIn posts and articles inside Claude Desktop (or any MCP host) via the official LinkedIn OAuth 2.0 API.
Compliance — This server uses only LinkedIn's official REST API with user-granted OAuth tokens. It accesses only the authenticated user's own data, performs no scraping, and stores no data beyond the local access token. Use is subject to the LinkedIn API Terms of Use.
Tools
| Tool | Description |
|---|---|
authenticate() |
Start the OAuth flow — returns an auth URL to open in your browser |
check_auth_status() |
Verify the stored token is still valid |
get_profile() |
Return your LinkedIn profile (name, email, picture) |
get_my_posts(count) |
Fetch your most recent posts |
get_my_articles(count) |
Fetch your long-form articles (filtered from posts) |
get_post_detail(post_id) |
Full content of a single post by URN |
revoke_auth() |
Delete the stored token |
Setup
1. LinkedIn Developer App
- Go to linkedin.com/developers/apps and create an app (or use an existing one).
- Under Auth, add
http://localhost:8080/callbackas an Authorized Redirect URL. - Under Products, add:
- Sign In with LinkedIn using OpenID Connect — provides
openid,profile,email - Community Management API — provides
r_member_social(required for reading posts)
- Sign In with LinkedIn using OpenID Connect — provides
- Copy your Client ID and Client Secret.
2. Install dependencies
pip install -e .
Or without installing as a package:
pip install fastmcp httpx python-dotenv
3. Configure credentials
cp .env.example .env
Edit .env:
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
LINKEDIN_REDIRECT_URI=http://localhost:8080/callback
4. Configure Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"linkedin-posts": {
"command": "python",
"args": ["/absolute/path/to/server.py"],
"cwd": "/absolute/path/to/linkedin-mcp"
}
}
}
Restart Claude Desktop after saving.
5. Authenticate
In Claude Desktop, ask:
"Call authenticate"
Open the returned URL in your browser, sign in, and grant access. The token is saved to ~/.linkedin_mcp_token.json automatically. Then try:
"Call get_my_posts"
Development / testing
Run the server with the MCP Inspector (browser UI for testing tools without Claude Desktop):
fastmcp dev inspector server.py --with-requirements requirements.txt
If fastmcp is not on your PATH, use the full path:
# Windows
C:\Users\<YOU>\AppData\Roaming\Python\Python3XX\Scripts\fastmcp.exe dev inspector server.py
Token lifecycle
- LinkedIn access tokens are valid for 60 days.
- There is no refresh token for standard apps — run
revoke_auth()thenauthenticate()when the token expires. - The token is stored at
~/.linkedin_mcp_token.json(outside this repo).
Troubleshooting
| Symptom | Fix |
|---|---|
| Tools not visible in Claude Desktop | Fully quit and reopen Claude Desktop; check Settings → Developer for MCP logs |
get_my_posts returns 403 |
Add Community Management API to your LinkedIn app products, then re-authenticate |
ModuleNotFoundError |
Run pip install fastmcp httpx python-dotenv |
| Port 8080 already in use | Change LINKEDIN_REDIRECT_URI in .env to another port and update your LinkedIn app's redirect URL list |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。