docs/guide/mcp-config.md
The MCP Configuration File Management module provides a set of tools and resources for managing Nginx configuration files. These features allow AI agents and automation tools to perform various configuration file operations, including reading, creating, modifying, and organizing configuration files.
toolnginx_config_base_pathtoolnginx_config_listtoolnginx_config_gettoolnginx_config_addtoolnginx_config_modifytoolnginx_config_renametoolnginx_config_mkdirtoolnginx_config_historytoolnginx_config_enableHere are some examples of using MCP Configuration File Management features:
{
"tool": "nginx_config_base_path",
"parameters": {}
}
Example response:
{
"base_path": "/etc/nginx"
}
{
"tool": "nginx_config_list",
"parameters": {
"path": "/etc/nginx/conf.d"
}
}
Example response:
{
"files": [
{
"name": "default.conf",
"is_dir": false,
"path": "/etc/nginx/conf.d/default.conf"
},
{
"name": "example.conf",
"is_dir": false,
"path": "/etc/nginx/conf.d/example.conf"
}
]
}
{
"tool": "nginx_config_get",
"parameters": {
"path": "/etc/nginx/conf.d/default.conf"
}
}
{
"tool": "nginx_config_modify",
"parameters": {
"path": "/etc/nginx/conf.d/default.conf",
"content": "server {\n listen 80;\n server_name example.com;\n location / {\n root /usr/share/nginx/html;\n index index.html;\n }\n}"
}
}
{
"tool": "nginx_config_enable",
"parameters": {
"name": "my-site.conf",
"base_dir": "sites-available",
"overwrite": false
}
}
Example response:
{
"status": "success",
"message": "Site enabled and Nginx reloaded successfully",
"source": "/etc/nginx/sites-available/my-site.conf",
"destination": "/etc/nginx/sites-enabled/my-site.conf"
}