mcp-te-server-v2
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-te-server-v2 list the events tracked in this project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@zhoujinandrew/mcp-te-server-v2
MCP (Model Context Protocol) server for ThinkingEngine (TE) analytics platform. Enables AI assistants like Claude to query events, run SQL, manage dashboards, user segments, and operations directly through TE's API.
Quick Setup
Add to your MCP client configuration (e.g. Claude Code ~/.claude.json, Cursor, etc.):
{
"mcpServers": {
"mcp-te-v2": {
"command": "npx",
"args": ["-y", "@zhoujinandrew/mcp-te-server-v2@latest"],
"env": {
"TE_HOST": "ta.thinkingdata.cn"
}
}
}
}Related MCP server: Sensors MCP Server
Prerequisites
Node.js >= 18 (for native
fetchsupport)A TE platform account with access to the target project
macOS Auto-Auth (Optional, Recommended)
For zero-interaction token capture from Chrome:
Open Chrome → View → Developer → Allow JavaScript from Apple Events (one-time toggle)
macOS will prompt for Automation permission on first run — click Allow
Authentication Flow
The server uses a 4-step auth cascade. No manual configuration needed in most cases:
Step | What happens | User action |
1. Cache | Reads | None |
2. osascript (macOS) | Extracts | None |
3. Open & Poll (macOS) | Opens TE login page, polls Chrome until token appears | Login to TE |
4. Manual Fallback | Opens a local page with a text input for pasting token | Paste token from DevTools |
Token is cached at ~/.te-mcp/token.json and reused until it expires (401/403 triggers re-auth automatically).
Manual Token Reset
rm ~/.te-mcp/token.jsonEnvironment Variables
Variable | Required | Default | Description |
| Yes |
| TE platform hostname |
Available Tools
Metadata
Tool | Description |
| Get event catalog for a project |
| Load filterable properties for events |
| Load measurable/aggregatable properties |
| List analysis entities (user, account, device, etc.) |
| List predefined metrics |
| List SQL-queryable tables |
| Get column definitions for a SQL table |
Analysis
Tool | Description |
| List all reports |
| Get report definition details |
| Create or update a report |
| List all dashboards |
| Get dashboard details |
| Create a new dashboard |
| Update dashboard layout |
| List reports in a dashboard |
| Query report data via WebSocket |
| Execute SQL queries |
Audience & Segments
Tool | Description |
| List user tags |
| Get tag details and rules |
| List user clusters/segments |
| Predict entity count for cluster conditions |
| List events for audience targeting |
| Load audience targeting properties |
Operations
Tool | Description |
| Create and submit an operation task |
| List operation tasks |
| Get task statistics |
| Create or update a flow canvas |
| List flow canvases |
| Get flow definition |
| List push channels |
| Get channel details |
Helpers
Tool | Description |
| Get navigation space tree |
| Get project timezone offset |
| List date annotations/milestones |
Development
git clone https://github.com/zjandrew/mcp-te-server-v2.git
cd mcp-te-server-v2
npm install
TE_HOST=ta.thinkingdata.cn node src/index.jsLicense
MIT
Available Tools
34 toolste_create_dashboardC
Create a new dashboard
Inputs: projectId (required), dashboardName (required), host.
te_create_taskC
Create and submit an operation task
Inputs: projectId (required), host, taskConfig.
te_get_channelC
Get channel details and meta info
Inputs: channelId (required), projectId (required), host.
te_get_dashboardC
Get dashboard details including its reports
Inputs: projectId (required), dashboardId (required), host.
te_get_flowC
Get flow canvas definition by UUID
Inputs: flowUuid (required), projectId (required), host.
te_get_reportB
Get report definition details (events, eventView, graphConf)
Inputs: reportId (required), projectId (required), host.
te_get_space_treeC
Get navigation space tree (folders, dashboards, reports hierarchy)
Inputs: projectId (required), host.
te_get_table_columnsC
Get column definitions for a specific SQL table
Inputs: table (required), projectId (required), host, schema, +1 more.
te_get_tagC
Get tag details including its rule definition
Inputs: tagId (required), projectId (required), host.
te_get_task_statsC
Get operation task status statistics and performance data
Inputs: projectId (required), host, taskId.
te_get_timezoneC
Get project timezone offset
Inputs: projectId (required), host.
te_list_audience_eventsC
List events available for audience targeting in operations module
Inputs: projectId (required), host.
te_list_channelsC
List push channels for a project
Inputs: projectId (required), host.
te_list_clustersC
List user clusters/segments for a project (from operations module)
Inputs: projectId (required), host.
te_list_dashboard_reportsB
List reports within a dashboard with their definitions
Inputs: projectId (required), dashboardId (required), host.
te_list_dashboardsB
List all dashboards for a project
Inputs: projectId (required), host.
te_list_entitiesC
List analysis entities (user, account, device, etc.) for a project
Inputs: projectId (required), host.
te_list_eventsC
Get event catalog for a project
Inputs: projectId (required), host.
te_list_flowsC
List flow canvases for a project
Inputs: projectId (required), host.
te_list_mark_timesC
List date annotations/milestones for a project
Inputs: projectId (required), host.
te_list_metricsC
List predefined metrics for a project
Inputs: projectId (required), host.
te_list_reportsC
List all reports for a project
Inputs: projectId (required), host.
te_list_tablesB
List SQL-queryable tables for a project (event views, user views, tag tables, etc.)
Inputs: projectId (required), host.
te_list_tagsC
List user tags for a project
Inputs: projectId (required), host.
te_list_tasksC
List operation tasks for a project
Inputs: projectId (required), host, page, pageSize.
te_load_audience_propsC
Load filterable and measurable properties for audience targeting
Inputs: projectId (required), host, events.
te_load_event_propsB
Load filterable properties for events (includes event props and user props)
Inputs: projectId (required), host, events.
te_load_measure_propsC
Load measurable/aggregatable properties for events
Inputs: events (required), projectId (required), host.
te_predict_cluster_countC
Predict the entity count for a given cluster condition
Inputs: projectId (required), host, conditions.
te_query_report_dataB
Query report data via WebSocket (supports event analysis, retention, funnel, etc.)
Inputs: reportId (required), projectId (required), host, endTime, +2 more.
te_query_sqlC
Execute a SQL query via WebSocket and return results
Inputs: sql (required), projectId (required), host.
te_save_flowC
Create or update a flow canvas
Inputs: projectId (required), host, flowConfig.
te_save_reportC
Create or update a report
Inputs: projectId (required), reportName (required), reportModel (required), host, +2 more.
te_update_dashboardC
Update a dashboard (add reports, change layout)
Inputs: reports (required), projectId (required), dashboardId (required), host.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Most tools target a clearly distinct resource+action pair (reports vs dashboards vs flows vs channels vs tasks vs clusters), and descriptions clarify the boundaries. The main confusions are between the property-loading trio (te_load_event_props / te_load_measure_props / te_load_audience_props) and between te_list_events and te_list_audience_events, which are distinguishable only by the 'operations module' context mentioned in descriptions.
All 34 tools use a uniform te_ prefix plus snake_case verb_noun form (list_/get_/create_/update_/save_/load_/query_/predict_). Minor semantic inconsistency between upsert-style verbs (te_save_report, te_save_flow) and split create/update verbs (te_create_dashboard, te_update_dashboard), but the naming form itself is highly predictable.
At 34 tools this is a heavy flat namespace; an agent must scan many near-siblings (5 list_* catalog loaders, 12 report/dashboard tools) with no grouping or namespacing beyond the shared te_ prefix. The breadth of the analytics platform justifies many of them, but the count exceeds what is comfortably navigable in a single flat tool list.
Read/query coverage is strong (events, props, metrics, tables, reports, dashboards, flows, channels, tasks, tags) and core analysis paths are closed. However, write lifecycle is uneven: there are no delete operations anywhere (reports, dashboards, flows, tasks), tags and channels are read-only, and tasks cannot be updated or cancelled — notable gaps that will cause agent dead ends.
Maintenance
Related MCP Connectors
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Connects AI assistants to TrackingTime for querying time entries, projects, tasks, customers, and team data using natural language.
Enables AI assistants to retrieve event data and execute event management operations in Nunify.
Related MCP Servers
- AlicenseDqualityFmaintenanceEnables AI assistants to query and segment event data from Amplitude Analytics via the MCP protocol.29MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query and analyze user behavior data from the Sensors Analytics platform using natural language.7ISC
- AlicenseBqualityDmaintenanceEnables AI agents to query PostHog analytics data directly via tool calls, including insights, events, feature flags, trends, and persons.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI to interact with ThinkingData analytics through a read-only MCP service, supporting event/property queries, event analysis, retention analysis, and safe SQL execution.Apache 2.0