@solomonneas/adguard-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/index.js +633 -0
- package/dist/mcp-server.js +623 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Solomon Neas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# adguard-mcp
|
|
2
|
+
|
|
3
|
+
MCP server exposing AdGuard Home read/write tools across one or more instances. Three-tier write gating: reads are open, writes require `confirm: true`, destructive ops require `confirm: true` + `destructive: true`.
|
|
4
|
+
|
|
5
|
+
## Tools
|
|
6
|
+
|
|
7
|
+
**Reads (7):** `adguard_status`, `adguard_stats`, `adguard_query_log`, `adguard_list_filter_lists`, `adguard_list_user_rules`, `adguard_list_clients`, `adguard_list_blocked_services_catalog`.
|
|
8
|
+
|
|
9
|
+
**Safe writes (6, require `confirm: true`):** `adguard_add_user_rule`, `adguard_remove_user_rule`, `adguard_add_filter_list`, `adguard_remove_filter_list`, `adguard_toggle_filter_list`, `adguard_set_client_blocked_services`.
|
|
10
|
+
|
|
11
|
+
**Destructive (2, require `confirm: true` + `destructive: true`):** `adguard_replace_user_rules`, `adguard_toggle_protection`.
|
|
12
|
+
|
|
13
|
+
## Configuration
|
|
14
|
+
|
|
15
|
+
Set per-instance env vars. At least one instance is required.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
ADGUARD_PRIMARY_URL=http://192.168.1.10
|
|
19
|
+
ADGUARD_PRIMARY_USERNAME=admin
|
|
20
|
+
ADGUARD_PRIMARY_PASSWORD=<password>
|
|
21
|
+
|
|
22
|
+
# Optional second instance:
|
|
23
|
+
ADGUARD_SECONDARY_URL=http://192.168.1.11
|
|
24
|
+
ADGUARD_SECONDARY_USERNAME=admin
|
|
25
|
+
ADGUARD_SECONDARY_PASSWORD=<password>
|
|
26
|
+
|
|
27
|
+
# Optional: which instance is default when a tool omits the `instance` arg:
|
|
28
|
+
ADGUARD_DEFAULT_INSTANCE=primary
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Instance names are derived from the env-var middle segment (case-insensitive). Add `ADGUARD_LIVINGROOM_URL/USERNAME/PASSWORD` and the MCP picks it up on next start.
|
|
32
|
+
|
|
33
|
+
Every tool accepts optional `instance: "<name>"` to address a non-default box.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
npm install -g @solomonneas/adguard-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Or run via npx:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
npx -y @solomonneas/adguard-mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Setup
|
|
48
|
+
|
|
49
|
+
### Claude Desktop
|
|
50
|
+
|
|
51
|
+
`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"mcpServers": {
|
|
56
|
+
"adguard": {
|
|
57
|
+
"command": "npx",
|
|
58
|
+
"args": ["-y", "@solomonneas/adguard-mcp"],
|
|
59
|
+
"env": {
|
|
60
|
+
"ADGUARD_PRIMARY_URL": "http://192.168.1.10",
|
|
61
|
+
"ADGUARD_PRIMARY_USERNAME": "admin",
|
|
62
|
+
"ADGUARD_PRIMARY_PASSWORD": "your-password"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Claude Code
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
claude mcp add adguard -s user -- npx -y @solomonneas/adguard-mcp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then export env vars in your shell (`~/.bashrc`, `~/.zshrc`) or pass `--env` flags.
|
|
76
|
+
|
|
77
|
+
### OpenClaw
|
|
78
|
+
|
|
79
|
+
Plugin loads automatically once installed. Config goes in your `~/.openclaw/openclaw.json` `plugins.entries.adguard` (or use the bundled `openclaw.plugin.json`):
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"plugins": {
|
|
84
|
+
"entries": {
|
|
85
|
+
"adguard": {
|
|
86
|
+
"package": "@solomonneas/adguard-mcp",
|
|
87
|
+
"activation": { "onStartup": true }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Env vars from `~/.openclaw/workspace/.env` are inherited by the plugin.
|
|
95
|
+
|
|
96
|
+
### Hermes Agent
|
|
97
|
+
|
|
98
|
+
Add to `~/.config/hermes/agents.yaml`:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
mcp_servers:
|
|
102
|
+
adguard:
|
|
103
|
+
command: npx
|
|
104
|
+
args: ["-y", "@solomonneas/adguard-mcp"]
|
|
105
|
+
env:
|
|
106
|
+
ADGUARD_PRIMARY_URL: http://192.168.1.10
|
|
107
|
+
ADGUARD_PRIMARY_USERNAME: admin
|
|
108
|
+
ADGUARD_PRIMARY_PASSWORD: your-password
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Codex CLI
|
|
112
|
+
|
|
113
|
+
`~/.codex/config.toml`:
|
|
114
|
+
|
|
115
|
+
```toml
|
|
116
|
+
[mcp_servers.adguard]
|
|
117
|
+
command = "npx"
|
|
118
|
+
args = ["-y", "@solomonneas/adguard-mcp"]
|
|
119
|
+
|
|
120
|
+
[mcp_servers.adguard.env]
|
|
121
|
+
ADGUARD_PRIMARY_URL = "http://192.168.1.10"
|
|
122
|
+
ADGUARD_PRIMARY_USERNAME = "admin"
|
|
123
|
+
ADGUARD_PRIMARY_PASSWORD = "your-password"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Safety
|
|
127
|
+
|
|
128
|
+
- Credentials only live in memory after env-load and are redacted from logs and error messages.
|
|
129
|
+
- Tier 2 writes require an explicit `confirm: true` arg; the JSON schema documents this on every write tool.
|
|
130
|
+
- Tier 3 destructive ops additionally require `destructive: true`. The model cannot disable protection or overwrite the rules block from a hallucinated tool call.
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT
|