Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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": "<your-api-key>"
}
}
```

### Specific for Windows OS
```json
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down