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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ jobs:
uv venv /tmp/uxarray-mcp-wheel --python 3.12
uv pip install --python /tmp/uxarray-mcp-wheel/bin/python dist/uxarray_mcp-*.whl
/tmp/uxarray-mcp-wheel/bin/uxarray-mcp --help
/tmp/uxarray-mcp-wheel/bin/python scripts/check_mcp_handshake.py \
--command /tmp/uxarray-mcp-wheel/bin/uxarray-mcp

test-hpc:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
uv venv /tmp/uxarray-mcp-wheel --python 3.12
uv pip install --python /tmp/uxarray-mcp-wheel/bin/python dist/uxarray_mcp-*.whl
/tmp/uxarray-mcp-wheel/bin/uxarray-mcp --help
/tmp/uxarray-mcp-wheel/bin/python scripts/check_mcp_handshake.py \
--command /tmp/uxarray-mcp-wheel/bin/uxarray-mcp

- name: Upload distributions
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -109,6 +111,11 @@ jobs:
fi
/tmp/uxarray-mcp-pypi/bin/uxarray-mcp --help
/tmp/uxarray-mcp-pypi/bin/python -c "import uxarray_mcp; print(uxarray_mcp.__version__)"
curl -fsSL \
https://raw.githubusercontent.com/UXARRAY/uxarray-mcp-server/${REF_NAME}/scripts/check_mcp_handshake.py \
-o /tmp/check_mcp_handshake.py
/tmp/uxarray-mcp-pypi/bin/python /tmp/check_mcp_handshake.py \
--command /tmp/uxarray-mcp-pypi/bin/uxarray-mcp

update-conda-feedstock:
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ uses Semantic Versioning for public releases.

## Unreleased

### Fixed
- Pin the MCP Python SDK to `<2` until toolregistry-server supports the renamed
`MCPError` exception in SDK 2.x. Fresh installs previously resolved MCP 2.0,
installed successfully, then failed when starting the stdio server.
- CI and release verification now perform a real clean-wheel MCP handshake:
initialize the server, list tools, and call `get_capabilities` over stdio.
- Package metadata now enforces the documented UXarray 2026.7.0 minimum used by
the vector-calculus fixes and scientific contracts.

### Breaking
- `gradient` and `curl` now default `scale_by_radius=True`, matching UXarray's
public API. Pass `scale_by_radius=False` explicitly to preserve the previous
Expand Down
3 changes: 2 additions & 1 deletion conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ requirements:
# behavior is validated on conda-forge.
- python >={{ python_min }}
- toolregistry-server >=0.4.0
- mcp >=1.20,<2
- holoviews >=1.19.0
- matplotlib-base >=3.9.0
- pyyaml >=6.0
- uxarray >=2026.6.0
- uxarray >=2026.7.0

test:
requires:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ license = { file = "LICENSE" }
requires-python = ">=3.12,<3.13"
dependencies = [
"toolregistry-server[mcp]>=0.4.0",
# toolregistry-server 0.4.x imports McpError, renamed to MCPError in mcp 2.
"mcp>=1.20,<2",
"holoviews>=1.19.0",
"matplotlib>=3.9.0",
"pyyaml>=6.0",
"uxarray>=2026.6.0",
"uxarray>=2026.7.0",
]

[project.optional-dependencies]
Expand Down
45 changes: 45 additions & 0 deletions scripts/check_mcp_handshake.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
"""Verify a clean uxarray-mcp install over the real stdio MCP transport."""

from __future__ import annotations

import argparse
import asyncio

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client


async def _check(command: str) -> None:
server = StdioServerParameters(command=command, args=["serve", "--profile", "core"])
async with stdio_client(server) as (read, write):
async with ClientSession(read, write) as session:
initialized = await session.initialize()
listed = await session.list_tools()
names = {tool.name for tool in listed.tools}
required = {"get_capabilities", "run_analysis"}
if not required.issubset(names):
raise RuntimeError(
f"Missing required tools: {sorted(required - names)}"
)
result = await session.call_tool(
"get_capabilities", {"grid_path": "healpix:1"}
)
if result.isError:
raise RuntimeError(f"get_capabilities failed: {result.content}")
print(
f"MCP handshake passed: {initialized.serverInfo.name} "
f"with {len(listed.tools)} tools"
)


def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--command", default="uxarray-mcp")
args = parser.parse_args()
asyncio.run(_check(args.command))
return 0


if __name__ == "__main__":
raise SystemExit(main())
6 changes: 4 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading