Token导航 LogoToken导航TokenDH.com
Preference Analytics MCP logo
数据服务stdio官方级别未说明来源级核验

Preference Analytics MCP

MCP Server

基于BigQuery的跨平台偏好分析模型上下文协议服务器,提供平台协同、用户行为分析和细分市场洞察等功能。

工具数

5

提示词数

0

GitHub Stars

0

资源数

0
数据分析PythonCursorCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

GaganBanza

提供方

GaganBanza

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv venv

详细介绍

Preference Analytics MCP Server

Model Context Protocol server for cross-platform preference analytics via BigQuery.

Quick Start

1. Install

cd preference-analytics-mcp
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt

2. Configure

cp env.example .env
# Edit .env - set GCP_PROJECT_ID

3. Test

python test_connection.py

4. Start Server

# Easy way
./start_server.sh

# Or manual
python server.py --transport sse --port 8000

Server runs on http://localhost:8000/messages

5. Configure Cursor

In Cursor Settings → Features → Model Context Protocol:

{
  "mcpServers": {
    "preference-analytics": {
      "url": "http://localhost:8000/messages"
    }
  }
}

Restart Cursor and start querying!

Available Tools

  1. get_platform_synergy - Platform reach, overlap, media mix recommendations
  2. get_category_correlation - Cross-platform category correlations
  3. get_user_coherence - Individual user cross-platform behavior
  4. get_segment_analysis - Audience segment insights
  5. get_category_preferences - Top categories per platform

Example Queries (in Cursor)

  • "Show me platform synergy analysis"
  • "Find category correlations between Spotify and Amazon"
  • "Analyze the gaming segment"
  • "What are top Spotify categories?"

Predefined Segments

  • all_users - All users
  • multi_platform - Users on 2+ platforms
  • high_engagement - Highly engaged users
  • indian_entertainment - Indian content fans
  • gaming - Gaming enthusiasts
  • fitness - Fitness & wellness users

Command Options

# Default port
python server.py --transport sse

# Custom port
python server.py --transport sse --port 8080

# Localhost only
python server.py --transport sse --host 127.0.0.1 --port 8000

Troubleshooting

Port in use:

python server.py --transport sse --port 8001

Can't connect to BigQuery:

python test_connection.py

Cursor can't connect:

  • Verify server is running
  • Check URL in Cursor config
  • Restart Cursor

Extending

Add New Segment

Edit analytics/segment_analysis.py:

elif segment_name == "new_segment":
    query = f"""
    SELECT DISTINCT user_id
    FROM `{self.config.get_table_id('table_name')}`
    WHERE condition = 'value'
    """

Add New Analytics Tool

  1. Create module in analytics/
  2. Register in server.py list_tools()
  3. Add handler method

See existing modules for examples.

Requirements

  • Python 3.10+
  • BigQuery dataset with tables:

- preference_summary - category_preferences - user_platform_presence - unified_interest_matrix - category_mapping

License

Part of the Preference Analytics project.

目录标签

目录标签

数据分析PythonCursor本地部署用户行为跨平台分析BigQuery细分市场

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP