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 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 -[![smithery badge](https://smithery.ai/badge/@ergut/mcp-bigquery-server)](https://smithery.ai/protocol/@ergut/mcp-bigquery-server) +[![smithery badge](https://smithery.ai/badge/@ergut/mcp-bigquery-server)](https://smithery.ai/server/@ergut/mcp-bigquery-server)
BigQuery MCP Server Logo
@@ -42,10 +42,10 @@ Here's all you need to do: - Claude Desktop (currently the only supported LLM interface) ### Option 1: Quick Install via Smithery (Recommended) -To install BigQuery MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/protocol/@ergut/mcp-bigquery-server), run this command in your terminal: +To install BigQuery MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@ergut/mcp-bigquery-server), run this command in your terminal: ```bash -npx @smithery/cli install @ergut/mcp-bigquery-server --client claude +npx -y @smithery/cli install @ergut/mcp-bigquery-server --client claude ``` The installer will prompt you for: 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