Skip to content

fix(labs): clean /mcp endpoint — image 0.2.2 - #139

Merged
mashkovd merged 1 commit into
mainfrom
fix/labs-trading-data-021
May 6, 2026
Merged

mashkovd merged 1 commit into
mainfrom
fix/labs-trading-data-021

Conversation

@mashkovd

@mashkovd mashkovd commented May 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Smoke right after PR #137 merged surfaced HTTP 404 on every tools/list call. Root cause: FastMCP defaults streamable_http_path="/mcp" inside its own sub-app, which compounded with api.mount("/mcp", mcp_app) in mctl-trading-data into the surprise public path /mcp/mcp.

Canonical fix lives in mctl-trading-data 0.2.2 (commit c7e8a37, image already published): mount the FastMCP sub-app at FastAPI "/" and keep FastMCP's default streamable_http_path="/mcp". Public path is now exactly /mcp — no trailing slash, no /mcp/mcp, matches every other MCP endpoint in the ecosystem (api.mctl.ai/mcp, every public example).

Net effect on this gitops change: a single one-line bump of the labs-trading-data image tag from 0.2.0 to 0.2.2. The labs-openclaw bridge URL is already correct at /mcp (no trailing slash) — no change needed there.

 image:
   repository: ghcr.io/mctlhq/mctl-trading-data
-  tag: "0.2.0"
+  tag: "0.2.2"

tests/test_app_routes.py in mctl-trading-data locks the regression — it asserts /mcp is in routes and explicitly forbids both /mcp/ and /mcp/mcp.

Test plan

  • mctl-trading-data 0.2.2 PR-validation + docker-publish workflows green
  • After merge + ~3 min ArgoCD reconcile: kubectl -n labs get pod -l app.kubernetes.io/instance=labs-trading-data Ready 1/1 (rolling update from 0.2.0)
  • kubectl -n labs exec deploy/labs-openclaw-base-service -- curl -sf http://labs-trading-data-base-service.labs.svc.cluster.local:8080/healthz → 200
  • kubectl -n labs port-forward svc/labs-trading-data-base-service 18080:8080 then full MCP handshake against http://127.0.0.1:18080/mcp returns the 6 expected tools
  • @codex review clean (or copilot clean — merge gate per feedback_pr_codex_review)

@mashkovd

mashkovd commented May 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@mashkovd

mashkovd commented May 6, 2026

Copy link
Copy Markdown
Member Author

@copilot review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Smoke right after PR #137 merged surfaced HTTP 404 on every tools/list
call. FastMCP defaults streamable_http_path="/mcp" inside its sub-app;
combined with `api.mount("/mcp", mcp_app)` in trading-data the public
path compounded into /mcp/mcp.

The intermediate fix (0.2.1, never deployed) set
streamable_http_path="/" so the path was /mcp/ — functional but at odds
with the rest of the MCP ecosystem (api.mctl.ai/mcp, every public
example) where the convention is bare /mcp without a trailing slash.

0.2.2 is the canonical fix: keep FastMCP's default streamable_http_path
"/mcp" and mount its sub-app at FastAPI "/" instead of "/mcp". Public
URL is now exactly /mcp. FastAPI explicit routes (/healthz, /readyz,
/openapi.json, /docs) match before the mount falls through, so there
is no route conflict.

  - bump labs-trading-data image to 0.2.2 (mctl-trading-data c7e8a37)
  - openclaw bridge URL stays at /mcp (no trailing slash)
@mashkovd
mashkovd force-pushed the fix/labs-trading-data-021 branch from 919de4b to 00a05f8 Compare May 6, 2026 21:53
@mashkovd mashkovd changed the title fix(labs): trading-data MCP at /mcp/ — image 0.2.1 + bridge URL fix(labs): clean /mcp endpoint — image 0.2.2 May 6, 2026
@mashkovd

mashkovd commented May 6, 2026

Copy link
Copy Markdown
Member Author

Force-pushed simpler diff: 0.2.1 (which left path at /mcp/) is replaced by 0.2.2 which moves the mount to FastAPI root and keeps FastMCP's default streamable_http_path="/mcp". Public path is now exactly /mcp. PR is now a single one-line image tag bump.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant