Back to MCP directory
publicPublicdnsLocal runtime

mcp-tests

Artsy分析工具MCP服务器,为Claude Desktop提供艺术合作伙伴数据分析服务,包含核心分析、内容表现和受众洞察等功能。

article

README

🚀 Artsy Analytics MCP Server POC

Artsy Analytics MCP Server POC是一个基于Model Context Protocol的服务器,为Claude Desktop提供Artsy合作伙伴分析工具。该项目使用 modelcontextprotocol/typescript-sdk 构建,能够帮助用户深入了解合作伙伴的各项数据指标。

🚀 快速开始

你可以按照以下步骤完成项目的安装与配置:

  1. 安装Bun:
curl -fsSL https://bun.sh/install | bash
  1. 安装依赖:
git clone https://github.com/damassi/mcp-tests.git
cd mcp-tests
bun install
  1. 同步GraphQL模式:
bun sync-schema
  1. 配置Claude Desktop MCP设置:
code ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "artsy-analytics": {
      "command": "/Users/<user-name>/.bun/bin/bun",
      "args": ["/path/to/mcp/src/mcp-server.ts"],
      "env": {
        "CLAUDE_DESKTOP": "true",
        "METAPHYSICS_ENDPOINT": "your_endpoint",
        "USER_ID": "your_user_id",
        "X_ACCESS_TOKEN": "your_token"
      }
    }
  }
}
  1. 重启Claude Desktop。

✨ 主要特性

核心分析功能

  • get_partner_activity_stats:提供合作伙伴的活动概览,包括页面浏览量和咨询量。
  • get_partner_sales_stats:展示销售绩效指标和趋势。
  • get_partner_artworks_published_stats:分析艺术品发布情况。
  • get_partner_audience_stats:提供受众指标和访客数量统计。
  • get_partner_inquiries_stats:统计咨询量和响应情况。
  • get_complete_partner_analytics:提供全面的分析仪表盘。
  • get_partner_modern_pageviews:增强的页面浏览量分析,包含时间序列数据。
  • get_partner_time_series_analytics:提供页面浏览量或艺术品的时间序列数据。
  • get_partner_sales_time_series:销售分析,包含收入跟踪。
  • get_partner_inquiry_time_series:咨询趋势分析,包含响应时间。

内容绩效分析

  • get_partner_top_artworks:按浏览量排名,展示表现最佳的艺术品。
  • get_partner_top_content:展示表现最佳的内容(艺术品、展览、艺术家、观展室等)。

受众洞察功能

  • get_partner_visitor_demographics:按国家、设备、推荐来源等维度分析访客构成。
  • custom_graphql_query:支持执行自定义GraphQL查询。

📦 安装指南

安装Bun

curl -fsSL https://bun.sh/install | bash

安装依赖

git clone https://github.com/damassi/mcp-tests.git
cd mcp-tests
bun install

同步GraphQL模式

bun sync-schema

配置Claude Desktop MCP设置

code ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "artsy-analytics": {
      "command": "/Users/<user-name>/.bun/bin/bun",
      "args": ["/path/to/mcp/src/mcp-server.ts"],
      "env": {
        "CLAUDE_DESKTOP": "true",
        "METAPHYSICS_ENDPOINT": "your_endpoint",
        "USER_ID": "your_user_id",
        "X_ACCESS_TOKEN": "your_token"
      }
    }
  }
}

💻 使用示例

你可以向Claude提出以下问题来使用分析工具:

  • "Show visitor demographics for pace-gallery"
  • "Get sales trends for hauser-wirth over 16 weeks"
  • "What are the top artworks for gagosian-gallery?"

🔧 技术细节

开发环境运行

在开发过程中,你可以运行以下命令:

bun dev

# 从模式生成GraphQL类型
bun gql

启动检查器

然后启动 modelcontextprotocol 检查器

bunx @modelcontextprotocol/inspector

请确保设置如下所示,并(至关重要!)根据 .env.example 添加正确的 环境变量

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client