Skip to content

OCI API and OCI Cloud MCP server containers exit before initialize: uv run re-reads the workspace source at startup #540

Open

Description

@playb0t

The OCI API image built by the documented container path does not start, and neither does the OCI Cloud image. The root README builds it with moon run oci-api-mcp-server:containerize (the task runs podman build . in the project directory), and the client examples run it with podman run -i --rm .... The server exits before the MCP handshake.

#421 changed the build to uv --no-cache sync --no-sources --all-extras --no-editable, so the image installs published artifacts. The entry point still runs uv run oracle.oci-api-mcp-server, and uv run reads tool.uv.sources again at startup. pyproject.toml declares oracle-mcp-common = { workspace = true }, and the workspace member ../common lies outside the build context (COPY . /app), so uv stops with:

error: Failed to generate package metadata for `oracle-oci-api-mcp-server==2.1.5 @ editable+.`
  cause: Failed to parse entry: `oracle-mcp-common`
  cause: `oracle-mcp-common` references a workspace in `tool.uv.sources` (e.g., `oracle-mcp-common = { workspace = true }`), but is not a workspace member

To reproduce, build the unmodified Containerfile and run it:

cd src/oci-api-mcp-server
podman build -t oci-api-mcp -f Containerfile .
podman run --rm -i --network=none oci-api-mcp

The container exits with code 2 and the error above on stderr, stdout stays empty, and an MCP client never gets an initialize response.

oci-cloud-mcp-server has the same entry point and the same workspace source, and fails the same way, with oracle-oci-cloud-mcp-server==2.2.3 @ editable+. in the first line. The other Python images that start with uv run declare no workspace source, so this error does not apply to them.

Proposed fix: start the console script the build already installed, /app/.venv/bin/oracle.oci-api-mcp-server and /app/.venv/bin/oracle.oci-cloud-mcp-server. Nothing is resolved at runtime, and uv is no longer needed after the build. I have the change ready (the ENTRYPOINT line and a changelog entry for each server) and can open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions