Skip to content

Conversation

@tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Nov 21, 2025

This commit integrates the MCP (Model Context Protocol) server component into the Cloudberry build system, allowing users to optionally build and install it using the standard configure/make workflow.

What:

  • Added --enable-mcp-server option to configure.ac with dependency checks for Python 3.10+ and uv/pip package managers
  • Created mcp-server/Makefile to build Python wheel packages and install them to the configured prefix directory
  • Modified GNUmakefile.in to conditionally build, install, and clean mcp-server based on the configure flag
  • Updated mcp-server/pyproject.toml to require Python 3.11

How:

  • The Makefile uses Python's standard build tools (uv or pip) to create wheel packages from pyproject.toml
  • Installation uses --target to place packages in the correct site-packages directory with all dependencies
  • A wrapper script is generated to set PYTHONPATH and invoke the server module
  • Platform support is limited to Linux (PORTNAME=linux) as mcp-server is not intended for macOS production use

Usage:
./configure --enable-mcp-server --prefix=/path/to/install make make install cloudberry-mcp-server --help

Compatibility:

  • Requires Python 3.10 or later (Python 3.11 recommended)
  • Rocky Linux 9 users need to install python3.11+ alongside the system Python 3.9 to avoid conflicts with Cloudberry's Python dependencies

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@my-ship-it my-ship-it force-pushed the mcp-make branch 3 times, most recently from 5b966bf to 8844839 Compare November 28, 2025 06:34
Comment on lines +957 to +960
AC_PATH_PROG([PYTHON3], [python3])
if test -z "$PYTHON3"; then
AC_MSG_ERROR([python3 is required for --enable-mcp-server but was not found])
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we check the python version that is required by mcp-server?

# gpAux/Makefile is the entry point for the enterprise build, which ends up
# calling top-level configure and this Makefile
$(MAKE) -C gpMgmt $@
ifeq ($(enable_mcp_server), yes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should set this feature in src/Makefile.global.in?

This commit integrates the MCP (Model Context Protocol) server
component into the Cloudberry build system, allowing users to
optionally build and install it using the standard configure/make
workflow.

What:
- Added --enable-mcp-server option to configure.ac with dependency
  checks for Python 3.10+ and uv/pip package managers
- Created mcp-server/Makefile to build Python wheel packages and
  install them to the configured prefix directory
- Modified GNUmakefile.in to conditionally build, install, and clean
  mcp-server based on the configure flag
- Updated mcp-server/pyproject.toml to require Python 3.11

How:
- The Makefile uses Python's standard build tools (uv or pip) to
  create wheel packages from pyproject.toml
- Installation uses --target to place packages in the correct
  site-packages directory with all dependencies
- A wrapper script is generated to set PYTHONPATH and invoke the
  server module
- Platform support is limited to Linux (PORTNAME=linux) as mcp-server
  is not intended for macOS production use

Usage:
  ./configure --enable-mcp-server --prefix=/path/to/install
  make
  make install
  cloudberry-mcp-server --help

Compatibility:
- Requires Python 3.10 or later (Python 3.11 recommended)
- Rocky Linux 9 users need to install python3.11+ alongside the
  system Python 3.9 to avoid conflicts with Cloudberry's Python
  dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants