Back to MCP directory
publicPublicdnsLocal runtime

Apache Superset

基于Apache Superset REST API构建的MCP服务器应用,实现通过大模型进行数据库查询功能

article

README

🚀 WIP: MCP 服务器超集

这是一个基于 Apache Superset REST API 构建的 Model Context Protocol (MCP) 服务端应用,借助大模型让其具备基本查询能力,可实现数据库、表和字段的查询以及 SQL 执行等操作。

🚀 快速开始

直接使用

npx -y https://github.com/LiusCraft/superset-mcp-server

SUPERSET_URL
SUPERSET_USERNAME
SUPERSET_PASSWORD

鉴权方式:LDAP

安装依赖

# 安装 Node.js 依赖
npm install

启动服务

# API client 测试
npm run src/examples/superset-example.ts

# 调试环境
npm run inspector

# 生产环境
npm run build
npm start

✨ 主要特性

  • 查询数据库
  • 查询表
  • 查询字段
  • 执行 SQL

📦 安装指南

本项目的环境要求为 Node.js >= 14.0.0 ,安装步骤如下:

安装依赖

# 安装 Node.js 依赖
npm install

📚 详细文档

配置说明

项目配置文件位于 config 目录下,涵盖以下配置内容:

  • 数据库配置
  • API 配置
  • 安全配置

API 文档

参考 Superset 官方 Swagger 文档。

开发指南

目录结构

.
├── src/          # 源代码目录
├── src/examples          # 封装的 API 客户端测试代码
├── src/services          # 封装的 API 函数
├── src/utils             # 封装的 Superset baseHttpClient
├── src/index.ts          # 定义 MCP 接口

开发规范

  • 遵循 ESLint 规范
  • 使用 TypeScript 进行开发
  • 遵循 Git Flow 工作流

部署

MCP 部署

  1. 构建项目。
  2. 设置 MCP 配置:
node currentFolder/build/index.js
  1. 使用 MCP。

贡献指南

  1. Fork 本仓库。
  2. 创建特性分支。
  3. 提交变更。
  4. 发起 Pull Request。

📄 许可证

本项目采用 Apache License 2.0 许可证。

💻 联系方式

如有问题,请提交 Issue 或联系项目维护者。

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