Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,20 @@

The repository contains tools for Apache SeaTunnel.

## Tool 1 - SeaTunnel MCP Server

What is MCP?
- MCP (Model Context Protocol) is an open protocol for connecting LLMs to tools, data, and systems. With SeaTunnel MCP, you can operate SeaTunnel directly from an LLM-powered interface while keeping the server-side logic secure and auditable.
- Learn more: https://github.com/modelcontextprotocol

SeaTunnel MCP Server
- Source folder: [seatunnel-mcp/](seatunnel-mcp/)
- English README: [seatunnel-mcp/README.md](seatunnel-mcp/README.md)
- Chinese: [seatunnel-mcp/README_CN.md](seatunnel-mcp/README_CN.md)
- Quick Start: [seatunnel-mcp/docs/QUICK_START.md](seatunnel-mcp/docs/QUICK_START.md)
- User Guide: [seatunnel-mcp/docs/USER_GUIDE.md](seatunnel-mcp/docs/USER_GUIDE.md)
- Developer Guide: [seatunnel-mcp/docs/DEVELOPER_GUIDE.md](seatunnel-mcp/docs/DEVELOPER_GUIDE.md)

For screenshots, demo video, features, installation and usage instructions, please refer to the README in the seatunnel-mcp directory.

Get the main project from [Apache SeaTunnel](https://github.com/apache/seatunnel)
26 changes: 26 additions & 0 deletions seatunnel-mcp/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

# SeaTunnel MCP Server Configuration

# MCP server configuration
MCP_HOST=127.0.0.1
MCP_PORT=8080

# SeaTunnel API configuration
SEATUNNEL_API_URL=http://localhost:8090
SEATUNNEL_API_KEY=your_api_key_here
43 changes: 43 additions & 0 deletions seatunnel-mcp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
venv/
env/
ENV/
.venv/
.env/

# Testing
.coverage
htmlcov/
.pytest_cache/
.tox/

# IDE
.idea/
.vscode/
*.swp
*.swo

# Project specific
.env
53 changes: 53 additions & 0 deletions seatunnel-mcp/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-json
- id: debug-statements
- id: check-merge-conflict

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--line-length", "100"]

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: ["--line-length", "100"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ["--max-line-length", "100", "--extend-ignore", "E203,E501"]
exclude: ^tests/

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools, types-PyYAML]
exclude: ^tests/
49 changes: 49 additions & 0 deletions seatunnel-mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

记录 SeaTunnel MCP 项目的所有重要变更。

格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/spec/v2.0.0.html)。

## [1.1.0] - 2025-04-10

### 新增

- 添加 `submit-jobs` 和`submit-job/upload` 工具用于批量提交作业
- 允许通过单个 API 调用同时提交多个作业
- 用户输入直接作为请求体传递给 API,无需额外封装
- 支持标准 JSON 格式的作业配置

### 改进

- 更新文档,增加批量提交作业的示例和说明
- 添加全面的测试覆盖新功能

## [1.0.0] - 2025-04-01

### 新增

- 首个稳定正式版本
- 完善文档和测试
- 加强错误处理
- 改进用户体验

## [0.1.0] - 2023-07-15

### 新增

- 初始版本发布
- 实现基本的 SeaTunnel REST API 客户端
- 实现基于 MCP 的 SeaTunnel 工具集
- 连接管理工具
- 作业管理工具
- 系统监控工具
- 创建项目文档
- 用户指南
- 开发者指南
- 添加启动脚本和示例配置
- 添加基本单元测试

### 已修复

- 无(初始版本)
37 changes: 37 additions & 0 deletions seatunnel-mcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

FROM python:3.12-slim

WORKDIR /app

# 复制项目文件
COPY . .

# 安装依赖
RUN pip install --no-cache-dir -e .

# 暴露端口
EXPOSE 8080

# 设置环境变量
ENV MCP_HOST=0.0.0.0
ENV MCP_PORT=8080
ENV SEATUNNEL_API_URL=http://seatunnel:8090

# 启动服务
CMD ["python", "-m", "src.seatunnel_mcp"]
Loading
Loading