Social Listening MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

ソーシャルリスニングMCPサーバー

Syften APIを介してソーシャルリスニング機能を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、AIを活用したソーシャルメンション分析を可能にし、Webhookによるリアルタイム通知をサポートします。

特徴

  • リアルタイムソーシャルメンションモニタリング
  • AIを活用したコンテンツ分類
  • 重要なメンションに関するWebhook通知
  • 履歴データのバックフィル
  • トレンド分析とレポート
  • 自然言語クエリのサポート

前提条件

  1. Node.js (v16以降)
  2. APIアクセス可能なSyftenアカウント
  3. Claude デスクトップ アプリまたは Claude 拡張機能を備えた VSCode

インストール

  1. リポジトリをクローンします。
git clone https://github.com/fred-em/social-listening.git cd social-listening
  1. 依存関係をインストールします:
npm install
  1. サーバーを構築します。
npm run build

構成

1. Syften APIのセットアップ

  1. Syftenアカウントにログイン
  2. 設定 > APIアクセスに移動します
  3. APIキーをまだ生成していない場合は生成してください
  4. 次のステップのためにAPIキーをコピーしてください

2. クロードデスクトップ構成

~/Library/Application Support/Claude/claude_desktop_config.jsonにサーバー構成を追加します。

{ "mcpServers": { "social-listening": { "command": "node", "args": ["/absolute/path/to/social-listening/build/index.js"], "env": { "SYFTEN_API_KEY": "your-api-key-here" } } } }

3. VSCode の設定(オプション)

Claude 拡張機能を備えた VSCode を使用している場合は、 /Users/YOUR_USERNAME/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonに構成を追加します。

{ "mcpServers": { "social-listening": { "command": "node", "args": ["/absolute/path/to/social-listening/build/index.js"], "env": { "SYFTEN_API_KEY": "your-api-key-here" } } } }

利用可能なツール

1. configure_ai_filter

メンション分析用の AI フィルタリング設定を構成します。

{ "enabled": true, "min_confidence": 0.7, "categories": ["spam", "support", "feedback", "bug_report", "feature_request"], "webhook_url": "https://your-webhook.com/endpoint", "webhook_secret": "your-secret-token" }

2. セットアップウェブフック

リアルタイム通知用の Webhook エンドポイントを構成します。

{ "endpoint_url": "https://your-webhook.com/endpoint", "secret_token": "your-secret-token", "enabled": true }

3. バックフィル月

特定の月のメンションをバックフィルします。

{ "year": 2024, "month": 2 }

4. sync_latest

前回の更新以降の新しいメンションを同期します。

{}

5. トレンド分析

時間の経過に伴う言及傾向を分析します。

{ "start_date": "2024-01-01", "end_date": "2024-02-01", "group_by": "day", "tags": ["feature", "bug"] }

6. get_top_sources

最も多く言及されているソース/著者を取得します。

{ "start_date": "2024-01-01", "end_date": "2024-02-01", "limit": 10 }

7. nlp_prompt

自然言語クエリを処理します。

{ "prompt": "show me feedback mentions from last week" }

8. get_ai_filtered_mentions

AI フィルタリングによって処理されたメンションを取得します。

{ "start_date": "2024-01-01", "end_date": "2024-02-01", "min_confidence": 0.8, "categories": ["feedback", "bug_report"], "limit": 50 }

クロードでの使用例

Claude に使用できるプロンプトの例を次に示します。

  1. AIフィルタリングを設定します。
Configure the social listening AI filter to detect bug reports and feature requests with 80% confidence.
  1. Webhook 通知を設定します。
Set up a webhook for the social listening server to send notifications to https://my-server.com/webhook with the secret token "my-secret".
  1. 傾向を分析する:
Show me the trend of bug reports and feature requests from last month.
  1. フィルタリングされたメンションを取得する:
Show me all high-confidence bug reports from the past week.
  1. 自然言語クエリ:
What kind of feedback have we received about the new feature launch?

Webhook統合

Webhook を構成すると、サーバーは次の形式で通知を送信します。

{ "mention_url": "https://example.com/post", "ai_score": 0.95, "ai_categories": ["bug_report", "feature_request"], "timestamp": "2024-02-12T15:30:00Z" }

Webhook リクエストに含まれるヘッダー:

  • Content-Type: application/json
  • X-Webhook-Secret: your-secret-token

発達

ソースからのビルド

# Install dependencies npm install # Build the server npm run build # Run tests npm test

新機能の追加

  1. src/に新しい機能を実装する
  2. テストをtests/に追加する
  3. ローカルでビルドしてテストする
  4. プルリクエストを送信する

トラブルシューティング

  1. Webhook エラー: Webhook エンドポイントがアクセス可能であり、HTTPS をサポートしていることを確認してください
  2. APIキーの問題: Syften APIキーが構成で正しく設定されていることを確認してください
  3. データベースエラー: dataディレクトリが存在し、書き込み可能であるか確認してください

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更をコミットする
  4. ブランチにプッシュする
  5. プルリクエストを作成する

ライセンス

MITライセンス - 詳細はLICENSEファイルを参照

ID: axry6nqwll