Skip to main content
Glama
VeryBigSad

Nginx Proxy Manager MCP

by VeryBigSad

update_dead_host

Modify configuration settings for an inactive proxy host in Nginx Proxy Manager to restore functionality or update parameters like domain names, SSL certificates, and security options.

Instructions

Update an existing dead host

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
host_idYesThe ID of the dead host to update
domain_namesNo
certificate_idNo
ssl_forcedNo
hsts_enabledNo
hsts_subdomainsNo
http2_supportNo
advanced_configNo

Implementation Reference

  • Tool handler for 'update_dead_host' which fetches the current host, updates its data with provided arguments, and then sends a PUT request via the NPM client.
    elif name == "update_dead_host":
        args = dict(arguments)
        host_id = args.pop("host_id")
        current = await npm_client.get_dead_host(host_id)
        updated_data = current.model_dump()
        updated_data.update(args)
        return _model_response(await npm_client.update_dead_host(host_id, DeadHost(**updated_data)))
  • Definition of the 'update_dead_host' tool in the MCP server registration, including the input schema.
    Tool(
        name="update_dead_host",
        description="Update an existing dead host",
        inputSchema={
            "type": "object",
            "properties": {
                "host_id": {"type": "integer", "description": "The ID of the dead host to update"},
                "domain_names": {"type": "array", "items": {"type": "string"}},
                "certificate_id": {"type": "integer"},
                "ssl_forced": {"type": "boolean"},
                "hsts_enabled": {"type": "boolean"},
                "hsts_subdomains": {"type": "boolean"},
                "http2_support": {"type": "boolean"},
                "advanced_config": {"type": "string"},
            },
            "required": ["host_id"],
        },
  • The actual API client method that performs the network request for updating a dead host.
    async def update_dead_host(self, host_id: int, host: DeadHost) -> DeadHost:
        host_id = _validate_int_id(host_id, "host_id")
        response = await self._request(
            "PUT", f"/api/nginx/dead-hosts/{host_id}",
            json=host.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on", "owner_user_id"}),
        )
        return DeadHost(**response.json())

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