From c5841d671388fef14ac5039dbc71a62d0d9bf383 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 31 Jan 2025 01:03:38 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf22c4a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use the official Node.js image with a version suitable for your application +FROM node:18-alpine AS builder + +# Set the working directory +WORKDIR /app + +# Copy package files +COPY notion/package.json notion/package-lock.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the source code +COPY notion/tsconfig.json notion/src ./notion/ + +# Build the TypeScript application +RUN npm run build --prefix notion + +# Use a smaller image to run the application +FROM node:18-alpine + +# Set the working directory +WORKDIR /app + +# Copy built files from the builder stage +COPY --from=builder /app/notion/build ./build +COPY --from=builder /app/notion/package.json /app/notion/package-lock.json ./ + +# Install only production dependencies +RUN npm ci --omit=dev + +# Expose port if necessary +# EXPOSE 3000 + +# Command to run the application +CMD ["node", "build/index.js"] From d3974e161272b88f70a6258f2b7a97b084fbfb43 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 31 Jan 2025 01:03:39 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..1564bd8 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,17 @@ +# 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: + - notionApiToken + properties: + notionApiToken: + type: string + description: The API token for accessing the Notion API. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + config => ({ command: 'node', args: ['build/index.js'], env: { NOTION_API_TOKEN: config.notionApiToken } }) From 27186e7586e87c324ca1be4fe8aca033e08f892a Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 31 Jan 2025 01:03:40 +0800 Subject: [PATCH 3/3] Update README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a0877b0..e47f43a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Notion MCP Server +[![smithery badge](https://smithery.ai/badge/@suekou/mcp-notion-server)](https://smithery.ai/server/@suekou/mcp-notion-server) MCP Server for the Notion API, enabling Claude to interact with Notion workspaces. @@ -9,6 +10,14 @@ Here is a detailed explanation of the steps mentioned above in the following art - English Version: https://dev.to/suekou/operating-notion-via-claude-desktop-using-mcp-c0h - Japanese Version: https://qiita.com/suekou/items/44c864583f5e3e6325d9 +### Installing via Smithery + +To install Notion MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@suekou/mcp-notion-server): + +```bash +npx -y @smithery/cli install @suekou/mcp-notion-server --client claude +``` + 1. **Create a Notion Integration**: - Visit the [Notion Your Integrations page](https://www.notion.so/profile/integrations).