返回 MCP 目录
public公开dns本地运行

三头鲸电商分析服务器

Model Context Protocol(MCP)的实现,允许用户通过Claude Desktop使用自然语言查询与TripleWhale的电子商务分析平台进行交互。

article

README

Triplewhale MCP Server

npm version npm downloads License: MIT smithery badge

Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an installer as well as an MCP Server for Triplewhale.

This lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things with Triplewhale, e.g.:

  • Was my net profit positive last month?.
  • Rank countries by order revenue and new users for the last quarter..
  • Give me ads ROAS over the last 7 days and break it out by attribution model?

Claude Setup

Installing via Smithery

To install Triplewhale MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install triplewhale --client claude

Requirements

  • Node.js >= v18.0.0
  • Claude Desktop
  • Triplewhale API key - you can generate one through the Triplewhale console. Learn more or click here for quick access.

How to use locally

  1. Run npx -y @triplewhale/mcp-server-triplewhale init $TRIPLEWHALE_API_KEY
  2. Restart Claude Desktop
  3. You should now be able to try a simple command such as what's my meta spend in the last 7 days?

Supported Tools

  • moby

Development with Claude Desktop

npm install
npm run build
npm run watch # You can keep this open.
node dist/index.js init $TRIPLEWHALE_API_KEY

Then, restart Claude each time you want to test changes.

Testing

To run the tests you need to setup the .env file according to the .env.example file.

npm run test
help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端