telco-mcp
Enables governed, deterministic retention analytics over a checksum-pinned Telco customer churn snapshot, letting users ask business questions in natural language while the server handles metric definitions, bounded queries, and aggregate execution with provenance and caveats.
README
Telco MCP
A local, read-only MCP server for governed retention analytics over a checksum-pinned Telco Customer Churn snapshot. Claude Code or Codex interprets business language; the server owns metric definitions, bounded queries, aggregate execution, caveats, and provenance. There is no server-side LLM and no model API key.
Why this exists
This project is inspired by Anthropic's self-service analytics workflow: business users should be able to ask for a number without asking a model to invent SQL or metric logic. The host model interprets intent, while the MCP exposes only reviewed semantic definitions and deterministic aggregate operations. This sharply reduces hallucination risk, but it does not claim that host-model routing or final wording can never be wrong.
Fastest start: hand installation to your agent
Open this repository in Claude Code or Codex and send:
Read
INSTALL.md, install and verify this project end to end, and report the final checklist. Follow its stop conditions; do not modify application code or unrelated client configuration.
INSTALL.md is the complete installation runbook. It prepares the pinned data,
registers the MCP with the selected clients, verifies the eight-tool protocol, and explains safe
recovery and uninstall.
Direct setup
Prerequisites: Git, uv, and Claude Code and/or Codex.
Python 3.12 and locked dependencies are managed by uv.
This is a repository-scoped application: clone the source and run it with uv. Standalone wheel
or PyPI installation is intentionally unsupported because the semantic catalog and source manifest
are repository-level governance assets.
uv run --frozen telco-mcp setup --clients claude,codex
uv run --frozen telco-mcp doctor --clients claude,codex
Use only installed clients, for example --clients codex. Client authentication is separate from
the MCP; the server itself needs no model credentials.
Then ask the client:
Using the telco MCP, what is churn? State the denominator and the snapshot limitation.
A governed answer leads with the reviewed default and labels the alternative:
- 26.5370% = 1,869 / 7,043: certified churned share of all snapshot records and the broad-question default.
- 28.3655% = 1,869 / 6,589: an alternative assumed-starting-base logo churn-rate proxy using Stayed + Churned.
It must say that the data is one Q3 snapshot, not a trend.
What the project provides
- Eight typed MCP tools for business overviews, context, catalog discovery, metrics, segment diagnosis, fairness auditing, recorded churn reasons, and structured capability/refusal guidance.
- Semantic version 4 with five business concepts, 34 governed metrics, and 29 dimensions.
- One- and two-dimensional descriptive breakdowns with bounded filters and populations.
- Aggregate charge, cumulative-revenue, refund, usage, satisfaction, service, and reason analysis.
- Checksum-pinned preparation, read-only DuckDB, source-bound result provenance, and fail-closed verified startup. A synthetic protocol fixture exists only behind explicit opt-in.
- Optional mirrored Claude/Codex Skills that improve routing without replacing the MCP contract.
It intentionally does not provide trends, cohorts, NRR/GRR, revenue churn, forecasts, prediction, causal claims, scenario/annualized impact, ROI, uplift, arbitrary SQL, or customer-level exports.
Architecture
Business question
→ Claude Code / Codex (+ optional Skill)
→ eight typed MCP tools
→ governed semantic layer
→ bounded parameterized compiler
→ read-only DuckDB
→ aggregate evidence + caveats + provenance
→ business-language answer
The full technical and business explanation—including tools, data, metrics, question coverage,
limitations, security, verified examples, and source references—is in
docs/PROJECT_GUIDE.md.
Common commands
# Prepare or refresh the verified local artifact
uv run --frozen telco-mcp prepare
# Show the installed application version
uv run --frozen telco-mcp --version
# Register and verify selected clients
uv run --frozen telco-mcp setup --clients claude,codex
uv run --frozen telco-mcp doctor --clients claude,codex
# Run deterministic engineering checks
uv run --frozen pytest
uv run --frozen ruff check .
uv run --frozen mypy src scripts evals
uv audit --frozen
# Remove only this project's registrations; keep prepared data
uv run --frozen telco-mcp uninstall --clients claude,codex
Manual repair examples are available in .mcp.json.example and
.codex/config.toml.example. Prefer setup because it resolves exact
paths and refuses conflicting registrations unless --replace is explicitly approved.
Data and privacy
The source is a fictional/simulated Q3 California snapshot with 7,043 unique customer records. The
three source files, revision, and SHA-256 values are pinned in
data/source_manifest.json. Raw CSVs and prepared DuckDB artifacts are
not committed because redistribution rights have not been confirmed. Read
DATA_NOTICE.md before downloading or using the upstream data.
The service exposes aggregate results only. Local environments, runtime data, MCP configuration,
credentials, private keys, native traces, and full evaluation response records are excluded by
.gitignore.
Optional developer evaluation
Native Codex evaluation is not part of installation, setup, doctor, tests, or CI. It can consume model usage and is intentionally opt-in. The complete evaluation is exactly 15 golden questions. Each case uses one fresh answer session and a separate judge session; deterministic evidence checks are an additional hard gate. A full run therefore launches 30 Codex sessions:
uv run --frozen python evals/run_native_matrix.py \
--output-root evals/results/golden-15-new-run
The runner prints the planned answer/judge count before starting and writes local JSON and Markdown
verdicts. Publish only artifacts that have been reviewed and sanitized. The
last completed report
scored 14/15 and exposed a fairness-default inconsistency that is fixed in the current code. A
post-fix rerun was stopped to control Codex token usage, so that report is explicitly pre-fix
evidence rather than current certification. See evals/README.md.
License
Repository code is MIT licensed; source-dataset rights are separate. See LICENSE,
DATA_NOTICE.md, CONTRIBUTING.md, and
SECURITY.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。