From e0833f3dc596d121e042a459ce3f5ae166256505 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 02:01:15 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e4f4ca3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use a Node.js image as the base image +FROM node:18-alpine AS builder + +# Set the working directory +WORKDIR /app + +# Copy the package.json and package-lock.json files +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm install --ignore-scripts + +# Copy the rest of the application code +COPY . . + +# Build the application +RUN npm run build + +# Create a new stage for the release image +FROM node:18-alpine AS release + +# Set the working directory +WORKDIR /app + +# Copy the built files and necessary package files +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package-lock.json ./ + +# Install only production dependencies +RUN npm ci --omit=dev + +# Expose port (if necessary) +# EXPOSE 3000 + +# Define environment variables for the Google Cloud project and key file +ENV GOOGLE_APPLICATION_CREDENTIALS=/app/key.json + +# Define the entrypoint command +ENTRYPOINT ["node", "dist/index.js"] + +# Default command arguments (these can be overridden at runtime) +CMD ["--project-id", "your-project-id", "--location", "us-central1"] \ No newline at end of file From d752e68823cda3e59de0604aa6645ce7f0c6e766 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 02:01:15 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..1e367b0 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,24 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - projectId + properties: + projectId: + type: string + description: Your Google Cloud project ID. + location: + type: string + default: us-central1 + description: The BigQuery location, defaults to 'us-central1'. + keyFile: + type: string + description: Path to the service account key JSON file. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: 'node', args: ['dist/index.js', '--project-id', config.projectId, '--location', config.location, '--key-file', config.keyFile]}) \ No newline at end of file From 8552a369313b327937f1a7f6f6222a54f17feb17 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Wed, 29 Jan 2025 02:01:16 +0800 Subject: [PATCH 3/3] Update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 978b92e..38e88bd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # BigQuery MCP Server -[](https://smithery.ai/protocol/@ergut/mcp-bigquery-server) +[](https://smithery.ai/server/@ergut/mcp-bigquery-server)