Purpose: This guide shows you how to take any Model‑Context Protocol (MCP) server image and “wrap” it with Meshagent so the server can be launched as a service inside a Meshagent Room and then accessed by agents, chatbots, or external callers.
Layer | What It Adds |
---|---|
MCP Base Image | Implements your domain logic and OpenAPI spec |
Meshagent Wrapper | • Starts Meshagent’s mcp stdio-service |
• Proxies HTTP ↔ stdin/stdout | |
• Handles Room auth, health, logging |
mcp/3d-printer
from Docker Hub.docker build -t meshagent/mcp-3d-printer:latest .
.meshagent service
.Key points
meshagent mcp stdio-service
converts stdin/stdout ↔ HTTP.--path=/webhook
is Meshagent’s default webhook path for MCP traffic.- The wrapper stays thin—no changes to the underlying server code.
--room
creates (or re‑uses) a named Room.--port
maps container port 8000 to a callable toolkit endpoint within the Room.print_3d_model
, list_printers
, etc.—through standard Meshagent JSON‑RPC messages.
Symptom | Fix |
---|---|
Toolkit never appears | • Check meshagent service ... logs for image‑pull errors |
• Verify --port path matches --path in Dockerfile | |
HTTP 404 on /webhook | Confirm --path flag in ENTRYPOINT and --port ... path= agree |
Permission errors | Make sure you switched back to USER user after root installs |
Broken pip | Add RUN apk add gcc musl-dev if native wheels need compiling |
ARG MESHAGENT_VERSION
) to avoid surprises.liveness=/
) for production Rooms.README.md
, labels) so users know what to set.:latest
and semver tags.PARENT_ENTRYPOINT
setMESHAGENT_PORT
exposedmeshagent mcp stdio-service
meshagent service ...