Replace in-memory storage with SQLite (WAL mode), add workspace-based multi-tenancy with auto-detection via server.listRoots(), and embed the canvas server into the MCP process for single-process operation. 🔧 Core enhancements: - SQLite persistence with versioning, element history, and search - Multi-tenancy: isolated canvases per workspace (SHA-256 tenant IDs) - Embedded canvas lifecycle (single node process starts MCP + canvas) - Auto-sync with 3s debounce and manual override toggle - Configurable canvas port via CANVAS_PORT env var - 6 new MCP tools (search, history, tenants, projects) - Workspace switcher UI with dropdown search - Sync normalization to prevent bound-text breakage on reload 🐳 Docker & CI improvements: - BuildKit cache mounts for faster npm installs across builds - Skip native compilation in frontend-builder stage (--ignore-scripts) - Build only linux/amd64 on PRs, multi-arch on push to main - Docker Hub registry with proper build tools for better-sqlite3 - CI and Docker status check gates (github/ci-status-check, github/docker-build-check) 📦 Package & publishing: - Renamed to @sanjibdevnath/mcp-excalidraw-local (v3.0.0) - Updated npm-publish workflow for scoped package - Updated bin entry, keywords, and files list 📝 Documentation: - README with UI screenshots, architecture diagram, and full feature docs - Updated agent skill with 32-tool cheatsheet and workflow playbooks - Fork attribution and upstream comparison table Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
Docker
48 lines
1.4 KiB
Docker
# Dockerfile for MCP Excalidraw Server
|
|
# Builds the MCP server with SQLite persistence
|
|
|
|
# Stage 1: Build backend (TypeScript compilation + native modules)
|
|
FROM node:18-slim AS builder
|
|
|
|
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci
|
|
|
|
COPY src ./src
|
|
COPY tsconfig.json ./
|
|
RUN npm run build:server
|
|
|
|
# Stage 2: Production MCP Server
|
|
FROM node:18-slim AS production
|
|
|
|
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN addgroup --system --gid 1001 nodejs && \
|
|
adduser --system --uid 1001 --gid 1001 nodejs
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev
|
|
|
|
# Remove build tools after native modules are compiled
|
|
RUN apt-get purge -y python3 make g++ && apt-get autoremove -y
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
RUN chown -R nodejs:nodejs /app
|
|
USER nodejs
|
|
|
|
ENV NODE_ENV=production
|
|
ENV EXPRESS_SERVER_URL=http://localhost:3000
|
|
ENV ENABLE_CANVAS_SYNC=true
|
|
|
|
CMD ["node", "dist/index.js"]
|
|
|
|
LABEL org.opencontainers.image.source="https://github.com/sanjibdevnathlabs/mcp-excalidraw-local"
|
|
LABEL org.opencontainers.image.description="MCP Excalidraw Server - Model Context Protocol for AI agents (with SQLite persistence & multi-tenancy)"
|
|
LABEL org.opencontainers.image.licenses="MIT"
|