Skip to main content
Glama

defined-mcp

用于 Defined Networking API 的 MCP 服务器。

安装

uv tool install git+https://github.com/quickvm/defined-mcp.git

安装特定版本或分支:

uv tool install git+https://github.com/quickvm/defined-mcp.git@main

本地开发:

git clone git@github.com:quickvm/defined-mcp.git
cd defined-mcp
uv tool install --editable .

Related MCP server: UniFi MCP Server

配置

DEFINED_API_KEY 环境变量设置为您的 Defined Networking API 密钥。 可从您的 管理面板 获取。

export DEFINED_API_KEY=dnkey-...

使用方法

添加到 Claude Code

claude mcp add defined_mcp -- defined-mcp serve

然后重启 Claude Code。

验证连接

defined-mcp check

独立运行

defined-mcp serve

可用工具

主机 (Hosts)

  • list_hosts — 列出主机(支持按角色、阻塞状态、灯塔节点、中继节点过滤)

  • get_host — 获取主机详情

  • create_host — 创建主机/灯塔节点/中继节点

  • update_host — 更新主机(完全替换)

  • delete_host — 删除主机

  • block_host / unblock_host — 阻塞/解除阻塞主机

  • add_host_tag / remove_host_tag — 添加/移除主机标签

  • create_enrollment_code — 生成注册码

  • create_host_and_enrollment_code — 创建主机并生成注册码

角色与防火墙规则 (Roles & Firewall Rules)

  • list_roles / get_role — 列出/获取角色及其防火墙规则

  • create_role / update_role — 创建/更新角色(完全替换)

  • delete_role — 删除角色

  • add_firewall_rule — 向角色添加防火墙规则(扁平参数,无需 JSON)

  • remove_firewall_rule — 按索引移除防火墙规则

标签 (Tags)

  • list_tags / get_tag — 列出/获取标签

  • create_tag / update_tag — 创建/更新带有配置覆盖的标签

  • delete_tag — 删除标签

  • add_tag_config_override — 添加/替换标签上的配置覆盖

  • remove_tag_config_override — 按键移除配置覆盖

网络 (Networks)

  • list_networks / get_network — 列出/获取网络

  • create_network / update_network — 创建/更新网络

路由 (Routes)

  • list_routes / get_route — 列出/获取路由及其防火墙规则

  • create_route / update_route — 创建/更新路由(完全替换)

  • delete_route — 删除路由

  • add_route_firewall_rule — 向路由添加防火墙规则

  • remove_route_firewall_rule — 按索引移除路由防火墙规则

其他

  • list_audit_logs — 带过滤条件的审计日志

  • list_downloads — 软件下载链接(无需认证)

Claude Code 技能

本仓库包含一个用于交互式网络管理的 Claude Code 技能。当您在此仓库中运行 Claude Code 时,/network-architect 命令会自动可用。

要在任何项目中使用此技能,请将其复制到您的 Claude Code 配置文件中:

cp -r .claude/skills/network-architect ~/.claude/skills/

/network-architect audit

对您的 Defined Networking 账户执行安全和配置审计。获取所有网络、角色、标签和主机,然后报告:

  • 缺少或过于宽松的防火墙规则的角色

  • 无效标签(未分配任何主机)

  • 没有标签、dnclient 版本过旧或最后在线时间过长的主机

  • 每个角色的防火墙覆盖摘要(包含端口/协议/标签详情)

/network-architect design

交互式防火墙策略设计会话。询问您的服务、访问需求和分段需求,然后提出:

  • 角色结构(定义每种主机类型是什么)

  • 标签分类(如访问标签 ssh:allow,身份标签 user-type:admin

  • 表格格式的每个角色防火墙规则(包含 AND 逻辑:角色 + 标签)

/network-architect apply

使用原子工具(add_firewall_ruleadd_host_tag 等)实施网络设计。首先读取当前状态,显示差异,请求确认,并在应用后进行验证。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that enables Claude to manage infrastructure across Kubernetes, Docker, Prometheus, and Terraform through natural language. It provides over 42 specialized tools with a safety-first design, including risk-based command classification and audit logging.
    43
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server providing Claude Code with full UniFi network management capabilities -- devices, clients, ports, bandwidth auditing, firewall policies, and traffic rules -- all through natural language.
    52
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that turns Claude into a UniFi network specialist. Manage devices, optimize WiFi, audit security, and troubleshoot your network through natural language.
    31
    36
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for network operations that lets AI assistants interact with Cisco/Juniper network devices through safe, well-defined tools like compliance audits and configuration backups.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

  • MCP server connecting AI agents to non-custodial staking data across 130+ networks.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quickvm/defined-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server