You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by fa...@apache.org on 2025/08/17 12:25:36 UTC

(gravitino) branch mcp_docker created (now 6068d152b5)

This is an automated email from the ASF dual-hosted git repository.

fanng pushed a change to branch mcp_docker
in repository https://gitbox.apache.org/repos/asf/gravitino.git


      at 6068d152b5 mcp server

This branch includes the following new commits:

     new 0b2cb79e81 iceberg doc
     new eee51afde1 mcp server
     new 6068d152b5 mcp server

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(gravitino) 02/03: mcp server

Posted by fa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch mcp_docker
in repository https://gitbox.apache.org/repos/asf/gravitino.git

commit eee51afde1ed916e06517f4727092af21e408b59
Author: fanng <xi...@datastrato.com>
AuthorDate: Sun Aug 17 20:05:04 2025 +0800

    mcp server
---
 dev/docker/mcp-server/Dockerfile               | 37 ++++++++++++++++++++++
 dev/docker/mcp-server/mcp-server-dependency.sh | 44 ++++++++++++++++++++++++++
 dev/docker/mcp-server/start-mcp-server.sh      | 23 ++++++++++++++
 3 files changed, 104 insertions(+)

diff --git a/dev/docker/mcp-server/Dockerfile b/dev/docker/mcp-server/Dockerfile
new file mode 100644
index 0000000000..5826f1c085
--- /dev/null
+++ b/dev/docker/mcp-server/Dockerfile
@@ -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.10
+
+LABEL maintainer="dev@gravitino.apache.org"
+
+WORKDIR /root/mcp-server
+
+COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
+
+COPY packages/mcp-server /root/mcp-server
+
+COPY start-mcp-server.sh /root/mcp-server
+
+RUN uv venv
+
+RUN uv sync
+
+RUN uv pip install -e .
+
+ENTRYPOINT ["/bin/bash", "start-mcp-server.sh"]
diff --git a/dev/docker/mcp-server/mcp-server-dependency.sh b/dev/docker/mcp-server/mcp-server-dependency.sh
new file mode 100755
index 0000000000..dc88d5d44f
--- /dev/null
+++ b/dev/docker/mcp-server/mcp-server-dependency.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# 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.
+#
+set -ex
+mcp_server_dir="$(dirname "${BASH_SOURCE-$0}")"
+mcp_server_dir="$(cd "${mcp_server_dir}">/dev/null; pwd)"
+gravitino_home="$(cd "${mcp_server_dir}/../../..">/dev/null; pwd)"
+
+# Prepare the Iceberg REST server packages
+cd ${gravitino_home}
+./gradlew :mcp-server:clean
+
+# Removed old packages 
+rm -rf "${mcp_server_dir}/packages"
+mkdir -p "${mcp_server_dir}/packages"
+
+cp -r ${gravitino_home}/mcp-server ${mcp_server_dir}/packages/mcp-server
+
+#cd ${gravitino_home}
+
+#cp start-mcp-server.sh ${mcp_server_dir}/packages/start_mcp_server.sh
+
+# Keeping the container running at all times
+#cat <<EOF >> "${mcp_server_dir}/packages/gravitino-iceberg-rest-server/bin/gravitino-iceberg-rest-server.sh"
+
+# Keeping a process running in the background
+#tail -f /dev/null
+#EOF
diff --git a/dev/docker/mcp-server/start-mcp-server.sh b/dev/docker/mcp-server/start-mcp-server.sh
new file mode 100644
index 0000000000..da368e2cc6
--- /dev/null
+++ b/dev/docker/mcp-server/start-mcp-server.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# 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.
+#
+
+cd /root/mcp-server
+
+uv run mcp_server --transport=http $@


(gravitino) 01/03: iceberg doc

Posted by fa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch mcp_docker
in repository https://gitbox.apache.org/repos/asf/gravitino.git

commit 0b2cb79e814807eefef99dcafcd4bfb773c697c9
Author: fanng <xi...@datastrato.com>
AuthorDate: Fri Aug 15 20:56:22 2025 +0800

    iceberg doc
---
 dev/docker/build-docker.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev/docker/build-docker.sh b/dev/docker/build-docker.sh
index c48607e615..9b4758e1ba 100755
--- a/dev/docker/build-docker.sh
+++ b/dev/docker/build-docker.sh
@@ -27,7 +27,7 @@ usage() {
   cat << EOF
 Usage:
 
-./build-docker.sh --platform [all|linux/amd64|linux/arm64] --type [gravitino|hive|kerberos-hive|trino|doris|ranger|iceberg-rest-server] --image {image_name} --tag {tag_name} --latest
+./build-docker.sh --platform [all|linux/amd64|linux/arm64] --type [gravitino|hive|kerberos-hive|trino|doris|ranger|iceberg-rest-server|mcp-server] --image {image_name} --tag {tag_name} --latest
 
 Notice: You shouldn't use 'all' for the platform if you don't use the Github action to publish the Docker image.
 EOF
@@ -115,6 +115,8 @@ elif [ "${component_type}" == "ranger" ]; then
   build_args="--build-arg RANGER_PACKAGE_NAME=${RANGER_PACKAGE_NAME} --build-arg MYSQL_CONNECTOR_PACKAGE_NAME=${MYSQL_CONNECTOR_PACKAGE_NAME} --build-arg LOG4JDBC_PACKAGE_NAME=${LOG4JDBC_PACKAGE_NAME} --build-arg RANGER_VERSION=${RANGER_VERSION}"
 elif [ "${component_type}" == "iceberg-rest-server" ]; then
   . ${script_dir}/iceberg-rest-server/iceberg-rest-server-dependency.sh
+elif [ "${component_type}" == "mcp-server" ]; then
+  . ${script_dir}/mcp-server/mcp-server-dependency.sh
 else
   echo "ERROR : ${component_type} is not a valid component type"
   usage


(gravitino) 03/03: mcp server

Posted by fa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch mcp_docker
in repository https://gitbox.apache.org/repos/asf/gravitino.git

commit 6068d152b55bbd3142445ffad09b95d12cdfdce2
Author: fanng <xi...@datastrato.com>
AuthorDate: Sun Aug 17 20:24:06 2025 +0800

    mcp server
---
 .github/workflows/docker-image.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 4bd63eed73..ab841315df 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -19,6 +19,7 @@ on:
           - 'gravitino-playground:hive'
           - 'gravitino-playground:ranger'
           - 'gravitino-iceberg-rest-server'
+          - 'gravitino-mcp-server'
       docker_repo_name:
         description: 'Docker repository name (default is apache)'
         required: false
@@ -91,6 +92,9 @@ jobs:
           elif [ "${{ github.event.inputs.image }}" == "gravitino-iceberg-rest-server" ]; then
             echo "image_type=iceberg-rest-server" >> $GITHUB_ENV
             echo "image_name=${{ github.event.inputs.docker_repo_name }}/gravitino-iceberg-rest" >> $GITHUB_ENV
+          elif [ "${{ github.event.inputs.image }}" == "gravitino-mcp-server" ]; then
+            echo "image_type=mcp-server" >> $GITHUB_ENV
+            echo "image_name=${{ github.event.inputs.docker_repo_name }}/gravitino-mcp-server" >> $GITHUB_ENV
           fi
 
           if [ "${{ github.event.inputs.publish-latest-tag }}" == "true" ]; then