Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ jobs:
platform=${{ matrix.arch.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Resolve MCP server version
id: mcp_version
run: |
if [ -n "${{ github.event.inputs.docker_image_tag_name }}" ]; then
version="${{ github.event.inputs.docker_image_tag_name }}"
else
version="sha-$(git log -1 --pretty=%h)"
fi
echo "value=$version" >> $GITHUB_OUTPUT
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -126,6 +135,8 @@ jobs:
platforms: ${{ matrix.arch.platform }}
labels: ${{ steps.meta.outputs.labels }}
context: ./ibis-server
build-args: |
MCP_SERVER_VERSION=${{ steps.mcp_version.outputs.value }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
build-contexts: |
wren-core-py=./wren-core-py
wren-core=./wren-core
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ jobs:
git commit -m "Upgrade ibis version to $version"
git push
echo "value=$version" >> $GITHUB_OUTPUT
- name: Sync mcp-server version
run: |
version="${{ steps.next_version.outputs.value }}"
escaped_version=$(printf '%s\n' "$version" | sed 's/[&/\]/\\&/g')
sed -i "s/^version = \".*\"/version = \"$escaped_version\"/" mcp-server/pyproject.toml
git add mcp-server/pyproject.toml
git commit --amend --no-edit
git push --force-with-lease
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -174,6 +182,7 @@ jobs:
context: ./ibis-server
build-args: |
ENV=prod
MCP_SERVER_VERSION=${{ needs.prepare-version.outputs.next_version }}
build-contexts: |
wren-core-py=./wren-core-py
wren-core=./wren-core
Expand Down
7 changes: 7 additions & 0 deletions ibis-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ COPY wren/ ./wren/
# Copy MCP server
COPY --from=mcp-server ./app /mcp-server/app/
COPY --from=mcp-server ./mdl.schema.json /mcp-server/
COPY --from=mcp-server ./pyproject.toml /mcp-server/
ARG MCP_SERVER_VERSION=unknown
RUN if [ -n "$MCP_SERVER_VERSION" ]; then \
sed -i "s/^version = \".*\"/version = \"$MCP_SERVER_VERSION\"/" /mcp-server/pyproject.toml; \
fi

COPY pyproject.toml poetry.lock ./

Expand All @@ -118,6 +123,8 @@ RUN jupyter lab --generate-config --allow-root
COPY entrypoint.sh ./
RUN chmod +x ./entrypoint.sh

LABEL org.opencontainers.image.mcp-server.version=${MCP_SERVER_VERSION}

EXPOSE 8000 8888 9000

ENTRYPOINT ["./entrypoint.sh"]
26 changes: 26 additions & 0 deletions mcp-server/app/wren.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,5 +704,31 @@ async def health_check() -> str:
)


@mcp.tool(
annotations=ToolAnnotations(
title="Get Version",
readOnlyHint=True,
),
)
def get_version() -> str:
"""Return the current version of the Wren MCP server."""
try:
from importlib.metadata import version

return version("mcp-server")
except Exception:
pass
try:
pyproject = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "pyproject.toml")
with open(pyproject, "rb") as f:
for line in f:
decoded = line.decode()
if decoded.startswith("version"):
return decoded.split('"')[1]
except Exception:
pass
return "unknown"


if __name__ == "__main__":
mcp.run(transport=MCP_TRANSPORT)
8 changes: 6 additions & 2 deletions mcp-server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "mcp-server"
version = "0.1.0"
description = "Add your description here"
version = "0.23.0"
description = "MCP server exposing Wren Engine to AI agents"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
Expand All @@ -10,6 +10,10 @@ dependencies = [
"orjson>=3.11.7",
"pydantic>=2.10.6",
"python-dotenv>=1.0.1",
]

[project.optional-dependencies]
dev = [
"ruff>=0.11.0",
]