Skip to main content
Glama
calvinchengx

data-agent-service

by calvinchengx

数据代理服务

CI Docs release License: Apache 2.0

python coverage go coverage witnesses

用英语向你的数据仓库提问。得到一个你可以捍卫的答案。

针对你已有的仓库、数据库和 API 提出自然语言问题——包括 Fabric 和 Azure SQL、PostgreSQL、Databricks,以及任何 REST 服务(包括检索服务)——并以 OpenMetadata 中保存的词汇表、指标和模式为基础。每个查询都会被授权两次:先由服务中的角色规则授权,再以调用者自己的身份由数据源本身授权。任何 MCP 客户端,无需修改即可对接真实 Azure。

📖 文档站点 —— 完整参考,也可在 docs/ 中以 Markdown 形式浏览。

为什么存在这个项目

“哪个支持团队解决工单最快?”只有在每个人都同意 解决 的含义时,这个问题才有正确答案。让一个通用的 SQL 代理直接面对仓库,它会从列名中推断出这个含义,而且即使推断错误也不会发出任何警告。

在本仓库自己的种子数据上,这种推断会指出错误的团队。按实际耗时计算,Frontline 最快,Billing 最差。而业务的实际定义——Resolution Time(不包括等待客户所花费的时间)——则反转了结果:Billing 最快。 错误的赢家不是舍入误差,而且答案中没有任何信息会告诉你发生了这种情况。

这个服务的构建目标就是让这类错误在结构上难以发生,而不仅仅是概率上不太可能。

你得到什么

如何实现

证明

含义来自你的目录,而不是模型

在查询时从 OpenMetadata 读取词汇表术语、指标公式和列描述。业务语义永远不会被烘焙到提示词中

make eval —— 一项消融实验,在隐藏目录的情况下对相同问题打分

每个答案都以提问者的身份运行

用户的令牌以代表(on-behalf-of)方式一路交换到引擎,因此行和列权限由引擎决定,而不是代理决定

make test —— 两个角色,相同问题,不同行

它不能写入、游走或绕过拒绝

一个只读的 SELECT,经过解析而非模式匹配;模式允许列表;为你应用行数上限;拒绝会被报告,而不是被绕过

make conformance —— 执行器必须满足的 28 项断言契约

它回答时附带其推理过程

数字、所应用的定义、数据来源的表,以及目录提出的任何注意事项

make ask Q="..."

任何 MCP 客户端,无需自定义代码

Claude、Cursor、VS Code 和 SDK 通过标准 MCP 和 OAuth 发现连接

docs/09-mcp-clients.md

在你的笔记本上运行,无需修改即可部署到真实 Azure

整个技术栈在模拟器家族上运行;切换到 Fabric、APIM 和 Entra 只是配置,而不是代码路径

docs/10-production.md

这里没有任何东西是没有检查就声称的

每项能力都附带一个证明它的命令;如果某样东西是设计但未构建的,文档会说明这一点

88 个端到端见证,每次推送都在 CI 中运行

状态:阶段 0-16 已完成 —— 参见 docs/00-plan.md

Related MCP server: MCP-DB-Server

快速开始

make doctor   # toolchain, docker, ~14 GB memory
make up       # entra, keyvault, arm, fabric (+ SQL Server), OpenMetadata 1.13.2, apim
make status   # "stack OK" is the verdict

然后运行 make seedmake testmake evalmake loadmake ask Q="…" —— 或者运行 make stack 从零开始完成整个启动,这也是 CI 所运行的。

这里有什么

路径

用途

docker-compose.yml

仅使用固定版本、已发布的镜像——依赖项按原样使用

.env.example

所有 DAS_* 设置;复制到 .env(本地)或 .env.prod(真实 Azure)

docs/00-plan.md

架构、决策、阶段、评估、负载、授权、扩展

docs/

快速入门、架构、授权、评估、负载、MCP 客户端、添加数据源、生产环境、CI

services/

仓库查询执行器(Python 和 Go),以及两者都遵循的契约

agent/evals/e2e/

代理、准确性套件和见证

seed/

数据集、仓库配置、OpenMetadata 语义、身份设置

infra/terraform/

用于真实 Azure 的 Terraform;docs/10-production.md 是运行手册

.github/workflows/ci.yml

四个作业;docs/11-ci.md 说明每个作业证明了什么

website/

文档站点——Astro + Starlight,从 docs/ 生成,而 docs/ 保持为事实来源

scripts/

doctor.shstatus.shcheck-discipline.shpreflight.py

纪律

  1. 模拟器和 OpenMetadata 绝不修改;疑似 bug 记录到 docs/upstream-issues.md

  2. 没有仅限模拟器的代码路径。 仅使用标准协议(OIDC/OAuth2 包括 OBO、托管身份 App Service 协议、TDS FedAuth、ARM、Graph、OM REST/MCP)。ENV=prod 只交换 .env,不改变其他任何东西。

模拟器家族

基于 entra-emulatorazure-keyvault-emulatorarm-emulatorfabric-emulatorazure-apim-emulator 构建;按照 azure-emulators 组合。层级:leaf。

许可证

Apache-2.0。

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables natural language querying of Microsoft Fabric Data Warehouses with intelligent SQL generation, metadata exploration, and business-friendly result summarization. Features two-layer architecture with MCP-compliant server and agentic AI reasoning for production-ready enterprise data access.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables natural language querying of SQL databases with robust safety guarantees including read-only enforcement, AST validation, and row caps.
  • A
    license
    A
    quality
    B
    maintenance
    Enables natural language querying of OLAP/SSAS cubes with verified MDX generation, self-consistency checks, and honest abstention when queries are ambiguous.
    4
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables natural-language querying of PostgreSQL databases with schema grounding and self-correcting error recovery. Provides a live audit trace and verifies results through exploratory decomposition and empty-result sanity checks.

View all related MCP servers

Related MCP Connectors

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/calvinchengx/data-agent-service'

If you have feedback or need assistance with the MCP directory API, please join our Discord server