From ef5f8ba87a422ee0df82f5d699c6e5ff1b527630 Mon Sep 17 00:00:00 2001 From: Bart Date: Mon, 2 Jun 2025 15:47:38 +0200 Subject: [PATCH] add dockerfile --- Dockerfile | 13 +++++++++++++ README.md | 19 +++++++++++++++++++ package.json | 1 + 3 files changed, 33 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bb65f59 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN npm run build + +ENV API_KEY="" + +CMD ["node", "build/index.js"] \ No newline at end of file diff --git a/README.md b/README.md index 9ba7c52..0dc1a8b 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ npm install --prefix=~/.global-node-modules @ahrefs/mcp@latest -g ``` ## Configuration + +### NPX You can now add the Ahrefs MCP to your favourite AI assistant app by adding the `ahrefs` part to your app's configuration file: ```json { @@ -46,6 +48,23 @@ You can now add the Ahrefs MCP to your favourite AI assistant app by adding the } ``` +### Docker + +```json +{ + "id": "ahrefs-docker", + "command": "docker", + "args": [ + "run","--rm","-i", + "-e","API_KEY=${API_KEY}", + "ahrefs-mcp-server" + ], + "env": { + "API_KEY": "" + } +} +``` + ### Specific for Windows OS ```json { diff --git a/package.json b/package.json index ccffa25..3dce74e 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "type": "module", "scripts": { "build": "tsc", + "build-docker": "docker build -t ahrefs-mcp-server .", "start": "npm run build && node build/index.js" }, "keywords": [