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

Closed
opened 2026-03-01 15:42:24 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/0xJacky/nginx-ui/pull/1459

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/0xJacky/nginx-ui/pull/1459 **State:** closed **Merged:** Yes --- 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 -->
kerem 2026-03-01 15:42:24 +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#5729
No description provided.