diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..89eef66 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Stage 1: Build the project +FROM node:20-buster AS builder + +# Set working directory +WORKDIR /app + +# Copy package.json and package-lock.json to the working directory +COPY package.json package-lock.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Build the application +RUN npm run build + +# Stage 2: Create the runtime image +FROM node:20-slim + +# Set working directory +WORKDIR /app + +# Copy built files from the builder stage +COPY --from=builder /app/build ./build +COPY --from=builder /app/package.json /app/package-lock.json ./ + +# Install production dependencies +RUN npm ci --production + +# Set environment variables if needed (e.g., for Fireproof DB connection) + +# Command to run the application +ENTRYPOINT ["node", "build/index.js"] \ No newline at end of file diff --git a/README.md b/README.md index 8a74ce6..9b5cadb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,22 @@ # Model Context Protocol and Fireproof Demo: JSON Document Server +[![smithery badge](https://smithery.ai/badge/@fireproof-storage/mcp-database-server)](https://smithery.ai/server/@fireproof-storage/mcp-database-server) + This is a simple example of how to use a [Fireproof](https://fireproof.storage/) database in a [Model Context Protocol](https://github.com/modelcontextprotocol) server (used for plugging code and data into A.I. systems such as [Claude Desktop](https://claude.ai/download)). This demo server implements a basic JSON document store with CRUD operations (Create, Read, Update, Delete) and the ability to query documents sorted by any field. # Installation +### Installing via Smithery + +To install Fireproof Database for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@fireproof-storage/mcp-database-server): + +```bash +npx -y @smithery/cli install @fireproof-storage/mcp-database-server --client claude +``` + +### Manual Installation Install dependencies: ```bash diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..8a62093 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,13 @@ +# 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: [] + properties: {} + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({ command: 'node', args: ['build/index.js'], env: {} }) \ No newline at end of file