MCP テンプレート サーバー
OpenAI、Anthropic、EnrichB2B を統合した Model Context Protocol (MCP) を実装するテンプレート サーバー。
設定
仮想環境を作成します。
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate依存関係をインストールします:
pip install -r requirements.txt環境変数を設定します。
cp .env.example .env
# Edit .env with your API keys and configurationRelated MCP server: LinkedIn MCP Server
サーバーの実行
開発モード:
python server.pyまたは、MCP CLI を使用します。
mcp dev server.py特徴
OpenAI GPT-4統合
人類学的クロード積分
EnrichB2B LinkedInデータ統合
FastAPIとUvicornサーバー
環境設定
リソースとツールの例
構造化されたプロジェクトレイアウト
プロジェクト構造
.
├── .env.example # Template for environment variables
├── .gitignore # Git ignore rules
├── README.md # This file
├── requirements.txt # Python dependencies
├── enrichb2b.py # EnrichB2B API client
└── server.py # MCP server implementation使用法
サーバーを起動する
任意のMCPクライアントを使用して接続する
提供されているツールとリソースを使用します。
config://app- サーバー構成を取得するget_profile_details- LinkedIn プロフィール情報を取得するget_contact_activities- LinkedIn ユーザーの最近のアクティビティと投稿を取得しますgpt4_completion- GPT-4を使用してテキストを生成するclaude_completion- Claudeを使用してテキストを生成するanalysis_prompt- テキスト分析用のテンプレート
EnrichB2Bツール
プロフィールの詳細を取得する
LinkedIn プロフィールの詳細情報を取得します。
result = await get_profile_details(
linkedin_url="https://www.linkedin.com/in/username",
include_company_details=True,
include_followers_count=True
)連絡先アクティビティの取得
LinkedIn プロフィールから最近のアクティビティと投稿を取得します。
result = await get_contact_activities(
linkedin_url="https://www.linkedin.com/in/username",
pages=1, # Number of pages (1-50)
comments_per_post=1, # Comments per post (0-50)
likes_per_post=None # Likes per post (0-50)
)発達
新しい機能を追加するには:
@mcp.tool()デコレータを使用して新しいツールを追加する@mcp.resource()デコレータを使用して新しいリソースを追加する@mcp.prompt()デコレータを使用して新しいプロンプトを追加する
ライセンス
マサチューセッツ工科大学
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.