Skip to content

EIC MCP servers, supergateway, eic-mcp, opencode, py-mcp (+deps) - #986

Draft
aprozo wants to merge 20 commits into
developfrom
feat/mcp-servers
Draft

EIC MCP servers, supergateway, eic-mcp, opencode, py-mcp (+deps)#986
aprozo wants to merge 20 commits into
developfrom
feat/mcp-servers

Conversation

@aprozo

@aprozo aprozo commented Jul 17, 2026

Copy link
Copy Markdown

Ships the EIC MCP stack as proper Spack packages so eic-shell stops relying on runtime clone+build (companion to eic/eic-mcp#1 and the containers wiring PR).

One commit per package:

  • py-mcp (1.28.1, +cli variant) and its missing pure-python deps py-httpx-sse, py-sse-starlette, py-restrictedpython; py-pyjwt override adding 2.10.1 (builtin stops at 2.4.0, mcp needs ≥2.10.1). These four are general-purpose — open question whether they should go upstream to spack/spack-packages instead; kept here so the containers pin can move now.
  • uproot-mcp-server (v0.1.0 tag tarball), rucio-eic-mcp-server (commit-pinned; no upstream tag yet).
  • xrootd-mcp-server / zenodo-mcp-server: compile the TypeScript explicitly. Released tags have no prepare hook, so npm install --global . from source shipped no build/ tree and no runnable console command (why the current eic_xl has them in the env but nothing on PATH); build/ is also gitignored with no files list, so npm pack would drop the compiled tree even after building — an empty .npmignore keeps it. Complements Add HTTP/SSE transport (+ build-from-source fix) xrootd-mcp-server#98.
  • supergateway (3.4.3, npm prebuilt tarball): the stdio→streamable-HTTP bridge.
  • eic-mcp (pinned to the Service management only: serve installed servers, never build or fetch eic-mcp#1 rework): service management only.
  • opencode (1.18.3): AI coding agent CLI from the per-platform GitHub release binary (the npm wrapper needs a network postinstall).

Tested inside eicweb/eic_xl:nightly: all packages concretize; supergateway/opencode/py-pyjwt/pure-python deps and both fixed node servers install cleanly with compiled trees and runnable entry points; end-to-end MCP-over-HTTP served by eic-mcp up on ports 9101–9104.

@aprozo

aprozo commented Jul 17, 2026

Copy link
Copy Markdown
Author

Two updates after digging into the CI results:

1. The build-packages failures for the pure-python packages are a harness issue, not recipe defects. spack install --test root runs install-time test_imports in the build environment that spack freezes before the package is installed. python-venv's setup_dependent_run_environment guards on os.path.isdir(purelib) (spack-packages#49275), which is false at that point, so the package's own site-packages never reaches PYTHONPATH — and any from-source pure-python package fails the import test. Control: stock builtin py-colorama (unrelated to this PR) fails identically in this stack; both new recipes pass spack test run (the stand-alone TEST context, which sets the environment up after install). Existing python packages only look green in this CI because buildcache reuse skips install-time tests entirely. Suggestion: have the workflow install without --test root and follow with spack test run <pkg>, or pursue the guard fix in spack core.

2. py-mcp now defaults cli to off (commit c638e64): the cli extra pulls py-typer, whose newest packaged version (0.23.2) pins py-click@:8.1.8 — unsatisfiable in eic_xl, which needs click 8.3+ (flask via pyrobird). The servers only import mcp.server core, so nothing loses functionality.

Also planning to propose py-mcp + py-httpx-sse + py-sse-starlette + py-restrictedpython + the py-pyjwt 2.10.1 bump upstream in spack/spack-packages; the copies here would then be dropped in favour of cherry-picks in eic/containers.

aprozo and others added 19 commits July 28, 2026 14:37
Builtin stops at 2.4.0; py-mcp needs pyjwt>=2.10.1. Newer sdists use the
PEP 625 lowercase filename, so the version carries its own url.
The Model Context Protocol python SDK. All other deps exist in builtin;
+cli (default on) adds py-typer and py-python-dotenv for mcp[cli].
Talks to the Rucio REST API over requests; no rucio client dependency.
No release tag upstream yet, so 0.1.0 pins the current main commit.
Released tags have no 'prepare' hook, so 'npm install --global .' from
source never ran tsc and shipped no build/ tree and no runnable console
command. build/ is also gitignored with no files list, so npm pack would
drop the compiled tree even after building — an empty .npmignore keeps it.
Also chmod the bin entry point, which older build scripts skip.
Same prepare-hook and npm-pack gap as xrootd-mcp-server.
stdio to SSE/streamable-HTTP bridge for MCP servers. The npm registry
tarball ships a prebuilt dist/, so install with --ignore-scripts.
Service manager for the installed EIC MCP servers (runtime-deps the four
servers and supergateway). 0.1.0 pins the service-management-only rework
(eic/eic-mcp#1); switch to a tag once released.
AI coding agent CLI, from the per-platform GitHub release binary (the npm
wrapper resolves its binary in a postinstall via optionalDependencies,
which does not work in an offline install phase).
The cli extra pulls py-typer, whose newest packaged version (0.23.2) pins
py-click@:8.1.8 — unsatisfiable in environments that need click 8.3+
(eic_xl: flask via pyrobird). The MCP servers only import mcp.server core
(rucio-eic-mcp-server included, despite its mcp[cli] metadata), so nothing
needs the typer-based mcp dev CLI at runtime.
--test root runs test_imports in the build environment that spack freezes
before the package is installed; python-venv only adds an extension's
site-packages to PYTHONPATH if it already exists on disk, so every
from-source pure-python package fails its import test regardless of the
recipe (verified with stock py-colorama; spack-packages#49275 introduced
the isdir guard). The stand-alone 'Run package tests' step already covers
tests in a correctly constructed post-install environment; promoting it
from informational to a hard gate can be a follow-up.
@aprozo
aprozo force-pushed the feat/mcp-servers branch from 29b5092 to f8c0a08 Compare July 28, 2026 09:37
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.

2 participants