From hosted-deploy
Deploy MCP servers as hosted connectors on MintMCP using Docker containers. Use when: (1) building a Dockerfile for an MCP server to deploy on MintMCP, (2) testing a container image locally with hosted-cli, (3) deploying or updating a hosted connector via hosted-cli build-and-deploy/deploy, (4) configuring per-user environment variables for hosted connectors, (5) adapting a stdio-only MCP server for hosted deployment. Trigger on: Dockerfile creation for MCP servers, hosted-cli commands, hosted connector deployment, per-user env setup, or questions about MintMCP hosting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hosted-deploy:hosted-connector-deployThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide users through building, testing, and deploying Docker-based MCP servers on MintMCP.
Guide users through building, testing, and deploying Docker-based MCP servers on MintMCP.
Transport: Use HTTP whenever the server supports it.
/mcp on port 8000. This is the happy path.How does the server take credentials? Ask the user which applies:
a) No credentials -> No special handling. Proceed to step 3.
b) API key / token -> Ask how the server receives it (env var, header, etc.), then ask: is this a single shared key for the whole org, or does each user bring their own?
c) OAuth -> See references/oauth.md.
Is there an existing Dockerfile?
/mcp on port 8000initialize and tools/list succeed WITHOUT per-user credential env varslinux/amd64FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "server.py"]
The server should bind to 0.0.0.0:8000 and serve at /mcp. Example with FastMCP:
from fastmcp import FastMCP
mcp = FastMCP("my-connector")
@mcp.tool()
async def hello(name: str) -> str:
return f"Hello, {name}!"
if __name__ == "__main__":
mcp.run(transport="streamable-http", host="0.0.0.0", port=8000, path="/mcp")
FROM node:20-slim AS build
WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build
FROM node:20-slim
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/dist /app/dist
COPY --from=build /app/package.json /app/package-lock.json ./
RUN npm ci --ignore-scripts --omit=dev && npm cache clean --force
EXPOSE 8000
CMD ["node", "dist/index.js"]
Note: COPY . . before npm ci is intentional — many packages have a prepare script
that runs tsc during install, which needs the source files present. If the package has
no prepare script, you can split COPY package.json / npm ci / COPY . . for
better layer caching.
Ensure it meets the requirements above. Key checks:
/mcp on port 8000Before running any hosted-cli commands, determine a stable version to pin to. Run this to find the latest version published at least 3 days ago:
npm view @mintmcp/hosted-cli time --json
Pick the newest version whose publish date is at least 1 day old. Pin all
npx @mintmcp/hosted-cli commands in this session to that version using
npx @mintmcp/hosted-cli@<version>.
npx @mintmcp/hosted-cli@<pinned-version> auth login
npx @mintmcp/hosted-cli@<pinned-version> test-image --dockerfile Dockerfile --context .
This builds the image, starts it locally, and verifies the server responds to MCP requests correctly.
Pass env vars for testing:
npx @mintmcp/hosted-cli@<pinned-version> test-image --dockerfile Dockerfile --context . -e API_KEY=test
New connector from Dockerfile (build + push + create):
npx @mintmcp/hosted-cli@<pinned-version> build-and-push --name "My Connector" --transport http --dockerfile Dockerfile --context .
build-and-push builds the image, pushes it, and creates the connector.
Use --name and --transport for new connectors.
Update existing connector (from same directory with .mintmcp/hosted.json):
npx @mintmcp/hosted-cli@<pinned-version> build-and-push --dockerfile Dockerfile --context .
Deploy from pre-built image (already in a registry):
npx @mintmcp/hosted-cli@<pinned-version> deploy -n "My Connector" --image ghcr.io/org/my-server:latest -t http
Note: build-and-deploy requires --image pointing to an existing registry ref.
It does NOT build from a Dockerfile. Use build-and-push when building from source.
After deployment, the CLI prints a connector settings URL. Go there to:
Container exits before probe succeeds:
0.0.0.0:8000 (not 127.0.0.1)/mcp endpoint handles POST with JSON-RPC initialize methodImage too large:
python:3.12-slim, node:20-slim)Per-user env not reaching the server:
npx claudepluginhub mintmcp/mintmcp-claude-code --plugin hosted-deployProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.