From e03962813b44f2c2c826da5a58344c71a5af1854 Mon Sep 17 00:00:00 2001 From: ty Date: Fri, 23 Oct 2026 13:57:41 -0500 Subject: [PATCH] feat(mcp-server): Dockerfile and glama.json for the Glama server listing awesome-mcp-servers only lists servers with their own Glama server page (glama.ai/mcp/servers/teakesdev/corpus-agent-kit), and Glama scores a server by starting it in Docker and sending initialize + tools/list. The connector listing for the hosted endpoint does not count. - Dockerfile: two-stage node:22-alpine build of the mcp-server workspace only; the runtime image is the compiled output (no runtime deps), runs as the node user, stdio entrypoint. - glama.json: claims the server for maintainer teakesdev. - CI: docker build, so the image can't silently stop building. Verified locally: the image answers initialize (corpus-legal 1.2.1), tools/list (10 tools) and ping over stdio, with no API key. Co-Authored-By: Claude Opus 5.5 --- .dockerignore | 6 ++++++ .github/workflows/ci.yml | 1 + Dockerfile | 26 ++++++++++++++++++++++++++ glama.json | 4 ++++ 4 files changed, 37 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 glama.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cbca873 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +**/node_modules +**/dist +.git +.env +.env.* +*.log diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a257e45..06bcbb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: - run: npm run typecheck - run: npm run build - run: npm pack --workspace mcp-server --dry-run + - run: docker build -t corpus-mcp . - run: node scripts/check-plugin-package.mjs - uses: actions/setup-python@v5 with: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dcb97b5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Corpus MCP server (stdio). A thin client of the hosted server at +# corpuslaw.us: every MCP request is forwarded there, so the container needs +# outbound HTTPS and nothing else. No API key is required to start it or to +# list tools; set CORPUS_API_KEY for higher search limits. +# +# docker build -t corpus-mcp . +# docker run -i --rm corpus-mcp +FROM node:22-alpine AS build +WORKDIR /app +COPY package.json package-lock.json ./ +COPY mcp-server/package.json mcp-server/ +RUN npm ci --workspace mcp-server --include-workspace-root=false +COPY tsconfig.base.json ./ +COPY mcp-server/tsconfig.json mcp-server/ +COPY mcp-server/src mcp-server/src +RUN npm run build --workspace mcp-server + +# The server has no runtime dependencies, so the final image is just the +# compiled output on a clean Node. +FROM node:22-alpine +WORKDIR /app +ENV NODE_ENV=production +COPY --from=build /app/mcp-server/package.json ./ +COPY --from=build /app/mcp-server/dist ./dist +USER node +ENTRYPOINT ["node", "dist/index.js"] diff --git a/glama.json b/glama.json new file mode 100644 index 0000000..abf1596 --- /dev/null +++ b/glama.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://glama.ai/mcp/schemas/server.json", + "maintainers": ["teakesdev"] +}