Social Listening MCP Server 使用说明
项目简介
Social Listening MCP Server 是一个基于 Model Context Protocol (MCP) 构建的应用后端,它利用 Syften API 提供的社交媒体数据,为大型语言模型 (LLM) 客户端提供实时的社交媒体监听能力。通过此服务器,LLM 可以访问最新的社交媒体提及信息,进行趋势分析、情感分析,并根据自然语言指令配置和管理监听任务。
主要功能点
- 实时社交媒体提及监控: 持续监控社交媒体平台,获取最新的用户提及信息。
- AI驱动的内容分类: 利用 AI 技术对社交媒体内容进行分类,例如区分反馈、bug 报告、功能请求等。
- Webhook 实时通知: 当检测到重要的社交媒体提及事件时,通过 Webhook 推送实时通知。
- 历史数据回溯: 支持回溯指定月份的社交媒体数据。
- 趋势分析与报告: 分析社交媒体提及的趋势,生成报告。
- 自然语言查询: 支持使用自然语言指令查询和操作社交媒体数据及监听功能。
安装步骤
- 克隆仓库:
git clone https://github.com/fred-em/social-listening.git cd social-listening - 安装依赖:
npm install - 构建服务器:
npm run build
服务器配置
为了让 MCP 客户端(如 Claude 桌面应用或 VSCode Claude 扩展)连接到 Social Listening MCP Server,您需要配置客户端的 MCP 服务器设置。以下是配置示例,您需要根据实际情况修改路径和 API 密钥。
配置文件 (JSON 格式):
{ "mcpServers": { "social-listening": { "command": "node", "args": ["/absolute/path/to/social-listening/build/index.js"], "env": { "SYFTEN_API_KEY": "your-syften-api-key" } } } }
参数说明:
- '"social-listening"': 服务器名称,您可以自定义,用于在 MCP 客户端中识别该服务器。
- '"command": "node"': 启动服务器的命令,这里使用 Node.js 运行时。
- '"args": ["/absolute/path/to/social-listening/build/index.js"]': 启动命令的参数,指向构建后的服务器入口文件 'index.js' 的绝对路径。 请务必替换 '/absolute/path/to/social-listening' 为您本地仓库的实际绝对路径。
- '"env"': 环境变量配置。
- '"SYFTEN_API_KEY": "your-syften-api-key"': 必须配置 Syften API 密钥,用于访问 Syften 社交媒体数据。 请替换 '"your-syften-api-key"' 为您在 Syften 账户中生成的 API 密钥。
客户端配置位置:
- Claude 桌面应用: '~/Library/Application Support/Claude/claude_desktop_config.json'
- VSCode Claude 扩展: '/Users/YOUR_USERNAME/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json' 请替换 'YOUR_USERNAME' 为您的用户名。
基本使用方法
配置完成后,在 MCP 客户端中选择 "social-listening" 服务器,即可通过自然语言指令与服务器交互。以下是一些示例指令:
- 配置 AI 过滤器: 'Configure the social listening AI filter to detect bug reports and feature requests with 80% confidence.'
- 设置 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".'
- 分析趋势: 'Show me the trend of bug reports and feature requests from last month.'
- 获取过滤后的提及: 'Show me all high-confidence bug reports from the past week.'
- 自然语言查询: 'What kind of feedback have we received about the new feature launch?'
更详细的工具和使用方法请参考仓库 README 文件中的 "Available Tools" 和 "Example Usage in Claude" 部分。
信息
分类
AI与计算