
MCP nit
概览
一个安全加固的模型上下文协议(MCP)服务器,用于通过其HTTP API管理Technium DNS服务器. 与Claude Code和其他与MCP相容的客户端一起为使用而建造. - 覆盖DNS区域、记录、屏蔽、缓存、设置、应用、DNSSEC、日志和诊断 -- -- 在所有参数上(RFC 1035域名检查、IP验证、enum允许列表) -- -- 对本地网络有明确的HTTP选择 -- -- 仅披露安全查询工具 -- -- 用于破坏性操作(删除区域、删除记录、冲出缓存/缓存/屏蔽、未安装应用程序) -- -- 对破坏性操作有更严格的限制 -- -- 如结构化的JSONL至stder -- -- 用于剥离标记、密码、堆积痕迹和敏感路径 -- -- 防止错误信息中的证书/路径泄漏 -- 用于安全的证书存储 -- 防止同时进行认证竞赛 -- 用于所有突变操作; 所有配置都通过环境变量: 认证优先级 :...
概述(AI 翻译)
一个安全加固的模型上下文协议(MCP)服务器,用于通过其HTTP API管理Technium DNS服务器.
与Claude Code和其他与MCP相容的客户端一起为使用而建造.
□ 特性
- 39个工具 涵盖DNS区域、记录、屏蔽、缓存、设置、应用程序、DNSSEC、日志和诊断
- ** 在所有参数(RFC 1035域检查、IP验证、enum允许列表)上输入验证**
- HTTPS执行,明确HTTP选择进入当地网络
- ** 只读模式** 只披露安全查询工具
- ** 破坏性行动需要确认**(删除区、删除记录、冲出缓存/充值/屏蔽、未安装应用程序)
- ** 限制时间**,更严格地限制破坏行动
- ** 审计记录**作为结构化的JSONL进行
- ** 响应消毒** 以去除信号、密码、堆栈痕迹和敏感路径
- ** 防止错误信息中证书/路径泄漏的误入分泌**
- ** 用于安全证书存储的文件支持**
- ** 防止同时进行认证竞赛的自动变种**
- ** 仅限 API 调用 ** 用于所有变异操作; 区导出用途 GET( 由 Technitium API 要求) 带有短寿命会话符
□ 快开始
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
technitium-mcp-secure
A security-hardened Model Context Protocol (MCP) server for managing Technitium DNS Server via its HTTP API.
Built for use with Claude Code and other MCP-compatible clients.
Features
- 39 tools covering DNS zones, records, blocking, cache, settings, apps, DNSSEC, logs, and diagnostics
- Input validation on all parameters (RFC 1035 domain checks, IP validation, enum allowlists)
- HTTPS enforcement with explicit HTTP opt-in for local networks
- Read-only mode to expose only safe query tools
- Confirmation required for destructive operations (delete zone, delete record, flush cache/allow/block, uninstall app)
- Rate limiting with stricter limits on destructive operations
- Audit logging as structured JSONL to stderr
- Response sanitization to strip tokens, passwords, stack traces, and sensitive paths
- Error sanitization to prevent credential/path leakage in error messages
- Token file support for secure credential storage
- Auth mutex to prevent concurrent authentication races
- POST-only API calls for all mutating operations; zone export uses GET (required by Technitium API) with short-lived session tokens
Quick Start
# Clone and build
git clone https://github.com/rosschurchill/technitium-mcp-secure.git
cd technitium-mcp-secure
npm install
npm run build
# Register with Claude Code (see "Generating an API Token" below first)
claude mcp add technitium-dns \
--env TECHNITIUM_URL=https://your-server-ip:5380 \
--env TECHNITIUM_TOKEN=your-api-token \
-- node /path/to/technitium-mcp-secure/dist/index.js
Configuration
All configuration is via environment variables:
| Variable | Required | Description |
|---|---|---|
TECHNITIUM_URL |
Yes | Server URL (e.g. https://192.168.1.100:5380) |
TECHNITIUM_TOKEN |
One of token/password | API token (preferred) |
TECHNITIUM_TOKEN_FILE |
One of token/password | Path to file containing token (must be mode 0600) |
TECHNITIUM_PASSWORD |
One of token/password | Admin password (token is preferred) |
TECHNITIUM_USER |
No | Username (default: admin) |
TECHNITIUM_READONLY |
No | Set true to hide all write tools |
TECHNITIUM_ALLOW_HTTP |
No | Set true to allow insecure HTTP connections |
Authentication priority: TECHNITIUM_TOKEN > TECHNITIUM_TOKEN_FILE > TECHNITIUM_PASSWORD
Sensitive environment variables are cleared from process.env after being read.
Tools
Read-only (18 tools)
| Tool | Description |
|---|---|
dns_health_check |
Server version, uptime, forwarder config, failure rate |
dns_get_stats |
Query statistics with top clients/domains/blocked |
dns_check_update |
Check if a newer server version is available |
dns_resolve |
Test DNS resolution via the server |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →