Add HTTP transport + bearer auth + Docker/Compose for self-hosting
Restore the Streamable HTTP transport (kept alongside stdio) guarded by a shared bearer token (MCP_AUTH_TOKEN, constant-time check; /health stays open for probes). Add mcp-server/Dockerfile, root docker-compose.yml and .dockerignore to run it as a container on the Gitea box. README documents hosting + connecting Claude Desktop via mcp-remote. Verified HTTP 401-without/200-with-token locally; npm ci validated for the image build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
26
mcp-server/Dockerfile
Normal file
26
mcp-server/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Build context must be the REPO ROOT (so the shared graph.mjs is available):
|
||||
# docker build -f mcp-server/Dockerfile -t sharepoint-lists-mcp .
|
||||
# or just use docker-compose.yml at the repo root.
|
||||
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app/mcp-server
|
||||
|
||||
# Install deps first for better layer caching.
|
||||
COPY mcp-server/package.json mcp-server/package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Server code …
|
||||
COPY mcp-server/index.mjs ./
|
||||
# … and the shared core it imports, kept at the SAME relative path the import uses
|
||||
# (../.claude/skills/sharepoint-lists/scripts/lib/graph.mjs).
|
||||
COPY .claude/skills/sharepoint-lists/scripts/lib/graph.mjs \
|
||||
/app/.claude/skills/sharepoint-lists/scripts/lib/graph.mjs
|
||||
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 3838
|
||||
|
||||
# Run a non-root user (alpine node image ships one).
|
||||
USER node
|
||||
|
||||
CMD ["node", "index.mjs", "--http"]
|
||||
Reference in New Issue
Block a user