
agency42/linkedin-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
agency42/linkedin-mcp は [https://github.com/agency42/linkedin-mcp. からインポートされた MCP サーバーの候補です
概要
agency42/linkedin-mcp は [https://github.com/agency42/linkedin-mcp. からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
LinkedIn 統合用の TypeScript SDK を使用したモデルコンテキストプロトコル(MCP)サーバー。 LinkedInで認証し、投稿やリンクを共有するためにAIエージェント(Claudeなど)を許可します。
前提条件
- Node.js(>=14)とnpm
- LinkedIn開発者アプリ:
- [https://www.linkedin.com/developers/appsでアプリを作成する
- “製品” で、** LinkedIn** (OpenID Connect) でサインインし、LinkedIn で共有します
-** Authorized Redirect URI** は [
.env] と一致しなければなりません: [http://localhost:8000/auth/linkedin/callback] - あなたのクライアントIDとクライアントシークレットを[[
.envにコピーする
セットアップ
プロジェクトルートで.envを作成します。
ランニング
1。 OAuthコールバックサーバー (実行中の最小限の滞在):
2.MCPサーバー:
-
Claudeデスクトップ経由:
-
または手動で:
-
これは、stdioトランスポート+ HTTP + SSEサーバーを開始します。
3.インスペクターUI:
- ブラウザのインスペクタを開く → ツール
- [
linkedin-share-postまたは[linkedin-share-link]ツールを使用します。
テスト
1。 ブラウザで[http://localhost:8000/auth/linkedinにアクセス→LinkedInログインを完了します。
2.「認証成功」を確認します。
3。 検査官は、サンプル投稿/リンクツールを実行します。
4. LinkedIn プロファイルにコンテンツを検証します。
#Claudeデスクトップの統合
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
LinkedIn MCP Server
A Model Context Protocol (MCP) server using the TypeScript SDK for LinkedIn integration. Allows an AI agent (e.g. Claude) to authenticate with LinkedIn and share posts or links.
Prerequisites
- Node.js (>=14) and npm
- LinkedIn Developer App:
- Create an app at https://www.linkedin.com/developers/apps
- Under “Products”, add Sign In with LinkedIn (OpenID Connect) and Share on LinkedIn
- Authorized Redirect URI must match
.env:http://localhost:8000/auth/linkedin/callback - Copy your Client ID and Client Secret into
.env
Setup
git clone
cd linkedin-mcp
npm install
Create a .env in project root with:
SESSION_SECRET=your-session-secret
AUTH_PORT=8000 # OAuth callback server port
HTTP_PORT=8001 # HTTP/SSE server port
LINKEDIN_CLIENT_ID=your-client-id
LINKEDIN_CLIENT_SECRET=your-client-secret
LINKEDIN_REDIRECT_URI=http://localhost:8000/auth/linkedin/callback
Running
-
OAuth Callback Server (must stay running):
npm run dev:auth -
MCP Server:
- Via Claude Desktop:
claude-desktop - Or manually:
npm run dev - This starts stdio transport + HTTP+SSE server.
- Via Claude Desktop:
-
Inspector UI:
npm run build npx @modelcontextprotocol/inspector node build/server.js- Open the Inspector in browser → Tools
- Use
linkedin-share-postorlinkedin-share-linktools.
Testing
- Visit
http://localhost:8000/auth/linkedinin browser → complete LinkedIn login. - Confirm “Authentication successful!”.
- In Inspector, run sample post/link tools.
- Verify content on your LinkedIn profile.
Claude Desktop Integration
- Run
npm run dev:auth - Visit
http://localhost:8000/auth/linkedinin browser → complete LinkedIn login. - Confirm “Authentication successful!”. A token file should be generated. Do not close this terminal.
- Open Claude Desktop and verify the tools are listed
Configure your claude_desktop_config.json file:
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/Users/ken/Desktop/lab/linkedin-mcp/build/server.js"],
"transport": "http",
"url": "http://localhost:8001",
"sseEndpoint": "/stream",
"httpEndpoint": "/message",
"env": {
"SESSION_SECRET": "your-session-secret",
"AUTH_PORT": "8000",
"HTTP_PORT": "8001",
"LINKEDIN_CLIENT_ID": "your-client-id",
"LINKEDIN_CLIENT_SECRET": "your-client-secret",
"LINKEDIN_REDIRECT_URI": "http://localhost:8000/auth/linkedin/callback"
}
}
},
"globalShortcut": "Ctrl+Space"
}
(You can find this file from Claude Desktop by going to settings > developer > edit config)
Save and restart Claude Desktop to apply changes.
インストール
npx @modelcontextprotocol/inspector node build/server.js設定
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/Users/ken/Desktop/lab/linkedin-mcp/build/server.js"],
"transport": "http",
"url": "http://localhost:8001",
"sseEndpoint": "/stream",
"httpEndpoint": "/message",
"env": {
"SESSION_SECRET": "your-session-secret",
"AUTH_PORT": "8000",
"HTTP_PORT": "8001",
"LINKEDIN_CLIENT_ID": "your-client-id",
"LINKEDIN_CLIENT_SECRET": "your-client-secret",
"LINKEDIN_REDIRECT_URI": "http://localhost:8000/auth/linkedin/callback"
}
}
},
"globalShortcut": "Ctrl+Space"
}