feat(compose): wire hf-mcp-server into agents overlay (port 8203) - #2276
Conversation
Docker Hardening ValidationHardening Validation ReportValidated: Wed Jul 29 01:04:06 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: p7-room-orchestrator [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret [INFO] Validating: p7_control_token ====================================== |
3e3ed5c to
a5cbbfa
Compare
Docker Hardening ValidationHardening Validation ReportValidated: Wed Jul 29 01:04:59 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: p7-room-orchestrator [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret [INFO] Validating: p7_control_token ====================================== |
|
Warning Review limit reached
Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e3ed5c5a9
ℹ️ 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".
| ports: | ||
| - ${HF_MCP_SERVER_BIND:-0.0.0.0}:${HF_MCP_SERVER_PORT:-8203}:8096 |
There was a problem hiding this comment.
Bind the unauthenticated model API to localhost by default
When this compose profile runs on a host reachable from a LAN, tailnet, or public interface, the default 0.0.0.0 binding exposes the service without authentication. In particular, anyone able to reach port 8203 can call POST /api/model/download with an arbitrary valid Hugging Face repository ID, causing multi-gigabyte downloads into the host-mounted cache and potentially exhausting disk space. Default this binding to 127.0.0.1 or require authentication before exposing it beyond the host.
Useful? React with 👍 / 👎.
| # HF MCP Server — Model Context Protocol tools for HuggingFace Hub. | ||
| # Provides hf.model.search/info/download/list/convert_gguf and publishes | ||
| # hf.model.downloaded.v1. Uses local /models cache shared with Ollama/vLLM. |
There was a problem hiding this comment.
Implement MCP transport before advertising this endpoint
Every standard MCP client pointed at the newly advertised /sse endpoint will fail to initialize or invoke these tools: pmoves/services/hf-mcp-server/main.py:983-1048 emits one custom event: tools payload and immediately ends the stream, with no MCP endpoint announcement, JSON-RPC initialization, or corresponding POST message handler. The compose wiring therefore starts a REST service, but not the MCP server described here; the service needs a real SSE or Streamable HTTP MCP transport before clients such as Crush can use it.
Useful? React with 👍 / 👎.
| networks: [pmoves_app, pmoves_bus, pmoves_external] # HuggingFace API | ||
| volumes: | ||
| - ${HF_HOME:-./data/models}:/models |
There was a problem hiding this comment.
Share the downloaded-model volume with inference services
When a model is downloaded through this service, it is written under this host bind, but no Ollama or vLLM service consumes that bind despite the new claim that the cache is shared. The actual pmoves-ollama service mounts the distinct pmoves-ollama-models volume at /root/.ollama/models (docker-compose.yml:3459-3460), and the main compose file contains no vLLM cache mount, so downloaded models remain invisible to both inference paths. Mount a common cache into the relevant consumers or remove the shared-cache integration claim and provide an explicit import step.
Useful? React with 👍 / 👎.
- Add hf-mcp-server service to pmoves/docker-compose.yml (internal 8096, host 8203) - Update scripts/split_compose.py agents group and regenerate docker-compose.agents.yml - Add hf_mcp_server entry to pmoves/config/agent_registry.yaml - Update .claude/CATALOG.md and pmoves/docs/SERVICE_DOCS_MATRIX.md - Fix make hf-mcp-health to use host port 8203 - Refresh handoff with PM-Spark VSS notes for Claw integration
a5cbbfa to
88b3c90
Compare
Docker Hardening ValidationHardening Validation ReportValidated: Wed Jul 29 01:11:57 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: p7-room-orchestrator [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret [INFO] Validating: p7_control_token ====================================== |
Addresses Codex review threads on PR #2276: - Bind hf-mcp-server host port to 127.0.0.1 by default (was 0.0.0.0). - Replace stub /sse with mcp.server.MCPServer mounted at /mcp: - SSE endpoint: GET /mcp/sse - JSON-RPC messages: POST /mcp/messages/ - Tools: hf.model.search/info/download/list/convert_gguf - Tighten shared-cache wording: downloads land in /models; other services can mount the same path or import converted GGUF artifacts. - Update all /sse references to /mcp/sse in README, service CLAUDE.md, .claude/CATALOG.md, and SPARK handoff doc. - Capture MCP/SSE review patterns in .claude/PATTERNS.md. - Add AGNOTE4482PHI.t1.md entry for review triage. Verification: container healthy, SSE initialize + tools/list exchange passes against a temporary NATS container.
Docker Hardening ValidationHardening Validation ReportValidated: Wed Jul 29 01:41:08 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: p7-room-orchestrator [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret [INFO] Validating: p7_control_token ====================================== |
|
@chatgpt-codex-connector All three review threads addressed in commit P1 — bind to localhost ✅ Fixed
P1 — implement real MCP transport ✅ Fixed
P2 — shared-cache wording ✅ Fixed
Also captured these patterns in Ready for re-review / merge. |
Addresses Codex review threads on PR #2276: - Bind hf-mcp-server host port to 127.0.0.1 by default (was 0.0.0.0). - Replace stub /sse with mcp.server.MCPServer mounted at /mcp: - SSE endpoint: GET /mcp/sse - JSON-RPC messages: POST /mcp/messages/ - Tools: hf.model.search/info/download/list/convert_gguf - Tighten shared-cache wording: downloads land in /models; other services can mount the same path or import converted GGUF artifacts. - Update all /sse references to /mcp/sse in README, service CLAUDE.md, .claude/CATALOG.md, and SPARK handoff doc. - Capture MCP/SSE review patterns in .claude/PATTERNS.md. - Add AGNOTE4482PHI.t1.md entry for review triage. Verification: container healthy, SSE initialize + tools/list exchange passes against a temporary NATS container.
15c2ffb to
c470efb
Compare
|
Amended commit |
Docker Hardening ValidationHardening Validation ReportValidated: Wed Jul 29 01:43:25 UTC 2026Services CheckedPMOVES.AI Docker Hardening Validation[INFO] Checking: pmoves/docker-compose.hardened.yml [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: extract-worker [INFO] Validating: langextract [INFO] Validating: presign [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: pdf-ingest [INFO] Validating: jellyfin-bridge [INFO] Validating: invidious-companion-proxy [INFO] Validating: ffmpeg-whisper [INFO] Validating: media-video [INFO] Validating: media-audio [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: deepresearch [INFO] Validating: supaserch [INFO] Validating: publisher-discord [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: comfy-watcher [INFO] Validating: grayjay-plugin-host [INFO] Validating: agent-zero [INFO] Validating: p7-room-orchestrator [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: pmoves-yt [INFO] Validating: notebook-sync [INFO] Validating: supabase_service_role_key [INFO] Validating: supabase_jwt_secret [INFO] Validating: p7_control_token ====================================== |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15c2ffb124
ℹ️ 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".
| snapshot_download, | ||
| ) | ||
| from huggingface_hub.utils import tqdm as hf_tqdm | ||
| from mcp.server import MCPServer |
There was a problem hiding this comment.
Require an MCP release that exports MCPServer
Any environment or cached Docker dependency layer that resolved the allowed mcp>=0.9.0 requirement to a 1.x release will fail during startup at this import. For example, the repository's locked MCP 1.28.1 package exports FastMCP, not MCPServer; this API is available in MCP 2.0. Raise the service requirement to the release that introduced MCPServer so rebuilding this code cannot reuse or resolve an incompatible dependency.
Useful? React with 👍 / 👎.
|
|
||
| # Mount the MCP SSE transport under /mcp so clients connect at /mcp/sse and | ||
| # POST JSON-RPC messages to /mcp/messages/. | ||
| app.mount("/mcp", mcp_server.sse_app(sse_path="/sse", message_path="/messages/")) |
There was a problem hiding this comment.
Permit the Compose hostname on the SSE transport
When another container connects to http://hf-mcp-server:8096/mcp/sse, MCP 2.0's sse_app() auto-enables DNS-rebinding protection for its default host="127.0.0.1" and permits only localhost Host headers. The agents Compose service explicitly uses the hostname hf-mcp-server, so peer-container MCP requests are rejected with 421 before initialization. Configure transport security to allow the Compose hostname while retaining the localhost-only host-port publication.
Useful? React with 👍 / 👎.
| - HF_HOME=${HF_HOME:-/models} | ||
| - HF_HUB_CACHE=${HF_HUB_CACHE:-/models/hub} |
There was a problem hiding this comment.
Separate host cache path from in-container HF paths
When an operator supplies the repository's env.hf-models.example values (HF_HOME=/mnt/models/hf and HF_HUB_CACHE=/mnt/models/hf/hub), these lines make the process write under those paths inside the container, while the volume at line 3160 mounts the same host directory at /models. Downloads therefore go to the writable container layer rather than the persistent mount and disappear when the container is recreated. Use a distinct host-path variable such as HF_MODEL_PATH and keep the in-container cache rooted at the volume target.
Useful? React with 👍 / 👎.
| # Mount the MCP SSE transport under /mcp so clients connect at /mcp/sse and | ||
| # POST JSON-RPC messages to /mcp/messages/. | ||
| app.mount("/mcp", mcp_server.sse_app(sse_path="/sse", message_path="/messages/")) |
There was a problem hiding this comment.
Update the route test for the mounted MCP protocol
The existing TestSSETools.test_sse_returns_tools_event still requests /sse and expects the removed stub's unsolicited tools event. With this mount it receives 404, and merely changing the URL would leave it waiting because a real MCP session requires initialize and tools/list JSON-RPC messages. Rewrite the route test to exercise /mcp/sse plus /mcp/messages/; otherwise the service test suite remains broken and does not validate the new transport.
AGENTS.md reference: pmoves/AGENTS.md:L34-L39
Useful? React with 👍 / 👎.
- Add PMOVES-Spark-VSS submodule (POWERFULMOVES/PM-Spark-video-search-and-summarization), tracking main. - Add SUBMODULE_CODEX_HOMES overlay for the VSS submodule. - Add SPARK_VSS_INTEGRATION_2026-07-29.md handoff with foundation status, next-step plan for Claw skills, pmoves-vss-agent compose service, registry/catalog parity, and full-stack overlay risks. - Update SPARK_HF_MCP_SERVER_WIRING_2026-07-28.md to mark VSS lane claimed. - Update AGNOTE4482PHI.t1.md with #2276 merge release and new VSS claim. Co-authored-by: Agent Zero <agent.zero@pmoves.ai>
Summary
Finishes the open SPARK handoff to wire
pmoves/services/hf-mcp-server/into the agents compose overlay on host port8203.Changes
pmoves/docker-compose.yml— addshf-mcp-serverservice:8096, host port8203["agents", "research"]*tier-agent-hardened-rwhardening${HF_HOME:-./data/models}:/modelsHF_TOKEN,HF_HOME,HF_HUB_CACHE,NATS_URLnats+nats-initGET /healthzpmoves/scripts/split_compose.py— includeshf-mcp-serverin theagentsgroup.pmoves/docker-compose.agents.yml— regenerated from source.pmoves/config/agent_registry.yaml— addshf_mcp_serverentry (port 8203,/healthz, publisheshf.model.downloaded.v1)..claude/CATALOG.md+pmoves/docs/SERVICE_DOCS_MATRIX.md— documented port/health/MCP surface.pmoves/mk/hf.mk—hf-mcp-healthnow checks:8203(was stale internal:8096).pmoves/docs/handoffs/SPARK_HF_MCP_SERVER_WIRING_2026-07-28.md— marks compose/registry items done and adds PM-Spark VSS integration notes for Claw.pmoves/docs/AGENTS/AGNOTE4482PHI.t1.md+.claude/PATTERNS.md— claim/release entry and lane learnings.Verification
docker compose configrenders the service correctly (0.0.0.0:8203 → 8096, networkspmoves_app/pmoves_bus/pmoves_external,/modelsvolume).docker buildofservices/hf-mcp-server/Dockerfilesucceeds.pmoves-hf-mcp-server:spark-localcontainer on:8203is healthy:{"status":"healthy","service":"hf-mcp-server","nats":"connected"}Related
pmoves/docs/handoffs/SPARK_HF_MCP_SERVER_WIRING_2026-07-28.md