[PR #1459] [MERGED] Tool for enable config created and registered on mcp config #4383

Closed
opened 2026-02-28 12:00:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/0xJacky/nginx-ui/pull/1459
Author: @FelipeGCaetano
Created: 11/28/2025
Status: Merged
Merged: 11/28/2025
Merged by: @0xJacky

Base: devHead: dev


📝 Commits (3)

  • 7e2d5bc Tool for enable config created and registered on mcp config
  • 94dd929 fix: Added protection for missing traversal path and windonws syslink path transformation on enable config cmp tool
  • 95d04e4 fix: Fix error to create dstDir if do not exists

📊 Changes

2 files changed (+115 additions, -0 deletions)

View changed files

mcp/config/config_enable.go (+114 -0)
📝 mcp/config/register.go (+1 -0)

📄 Description

Created new usefull tool to enable a previously created settings.


Note

Adds a tool to enable Nginx configs by creating a sites-enabled symlink, testing config, reloading Nginx, and registers the tool.

  • MCP Config Tools:
    • New tool: nginx_config_enable in mcp/config/config_enable.go.
      • Creates symlink from sites-available (or specified base_dir) to sites-enabled.
      • Validates paths, ensures destination directory, supports overwrite.
      • Runs nginx -t via nginx.Control(TestConfig) and reloads on success; reverts on failure.
      • Returns JSON result with status, message, source, destination.
    • Registration: Adds tool to Init() in mcp/config/register.go.

Written by Cursor Bugbot for commit 95d04e48e4. This will update automatically on new commits. Configure here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/0xJacky/nginx-ui/pull/1459 **Author:** [@FelipeGCaetano](https://github.com/FelipeGCaetano) **Created:** 11/28/2025 **Status:** ✅ Merged **Merged:** 11/28/2025 **Merged by:** [@0xJacky](https://github.com/0xJacky) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (3) - [`7e2d5bc`](https://github.com/0xJacky/nginx-ui/commit/7e2d5bc2bb5c801cbc11b3e065b15d55d6227f25) Tool for enable config created and registered on mcp config - [`94dd929`](https://github.com/0xJacky/nginx-ui/commit/94dd929ab21b6fa6bd4e3c6154ef4da410ba76a4) fix: Added protection for missing traversal path and windonws syslink path transformation on enable config cmp tool - [`95d04e4`](https://github.com/0xJacky/nginx-ui/commit/95d04e48e410399f842002908bf10167f5521f9e) fix: Fix error to create dstDir if do not exists ### 📊 Changes **2 files changed** (+115 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `mcp/config/config_enable.go` (+114 -0) 📝 `mcp/config/register.go` (+1 -0) </details> ### 📄 Description Created new usefull tool to enable a previously created settings. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds a tool to enable Nginx configs by creating a `sites-enabled` symlink, testing config, reloading Nginx, and registers the tool. > > - **MCP Config Tools**: > - **New tool**: `nginx_config_enable` in `mcp/config/config_enable.go`. > - Creates symlink from `sites-available` (or specified `base_dir`) to `sites-enabled`. > - Validates paths, ensures destination directory, supports `overwrite`. > - Runs `nginx -t` via `nginx.Control(TestConfig)` and reloads on success; reverts on failure. > - Returns JSON result with `status`, `message`, `source`, `destination`. > - **Registration**: Adds tool to `Init()` in `mcp/config/register.go`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 95d04e48e410399f842002908bf10167f5521f9e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 12:00:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#4383
No description provided.