Skip to main content
Glama
VeryBigSad

Nginx Proxy Manager MCP

by VeryBigSad

update_proxy_host

Modify an existing Nginx proxy host configuration by updating domain names, forwarding settings, SSL certificates, or security options.

Instructions

Update an existing proxy host

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
host_idYesThe ID of the proxy host to update
domain_namesNo
forward_schemeNo
forward_hostNo
forward_portNo
certificate_idNo
ssl_forcedNo
block_exploitsNo
advanced_configNo

Implementation Reference

  • The implementation of update_proxy_host in NPMClient handles the API request to update a proxy host.
    async def update_proxy_host(self, host_id: int, host: ProxyHost) -> ProxyHost:
        host_id = _validate_int_id(host_id, "host_id")
        response = await self._request(
            "PUT",
            f"/api/nginx/proxy-hosts/{host_id}",
            json=host.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on", "owner_user_id"}),
        )
        return ProxyHost(**response.json())
  • The registration of the update_proxy_host tool in the MCP server.
        name="update_proxy_host",
        description="Update an existing proxy host",
        inputSchema={
            "type": "object",
            "properties": {
                "host_id": {"type": "integer", "description": "The ID of the proxy host to update"},
                "domain_names": {"type": "array", "items": {"type": "string"}},
                "forward_scheme": {"type": "string", "enum": ["http", "https"]},
                "forward_host": {"type": "string"},
                "forward_port": {"type": "integer"},
                "certificate_id": {"type": "integer"},
                "ssl_forced": {"type": "boolean"},
                "block_exploits": {"type": "boolean"},
                "advanced_config": {"type": "string"},
            },
            "required": ["host_id"],
        },
    ),
  • The call_tool handler logic for update_proxy_host in the MCP server, which fetches the current host, updates it with the provided arguments, and then sends the update request.
    elif name == "update_proxy_host":
        args = dict(arguments)
        host_id = args.pop("host_id")
        current = await npm_client.get_proxy_host(host_id)
        updated_data = current.model_dump()
        updated_data.update(args)
        return _model_response(await npm_client.update_proxy_host(host_id, ProxyHost(**updated_data)))

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/VeryBigSad/nginx-proxy-manager-mcp'

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