Skip to main content
Glama
VeryBigSad

Nginx Proxy Manager MCP

by VeryBigSad

update_redirection_host

Modify an existing redirection host configuration in Nginx Proxy Manager to change domain routing, SSL settings, or forwarding behavior.

Instructions

Update an existing redirection host

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
host_idYesThe ID of the redirection host to update
domain_namesNo
forward_schemeNo
forward_http_codeNo
forward_domain_nameNo
preserve_pathNo
certificate_idNo
ssl_forcedNo
block_exploitsNo
advanced_configNo

Implementation Reference

  • The NPMClient method that performs the actual API request to update a redirection host.
    async def update_redirection_host(self, host_id: int, host: RedirectionHost) -> RedirectionHost:
        host_id = _validate_int_id(host_id, "host_id")
        response = await self._request(
            "PUT", f"/api/nginx/redirection-hosts/{host_id}",
            json=host.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on", "owner_user_id"}),
        )
        return RedirectionHost(**response.json())
  • The handler in the MCP server that processes the 'update_redirection_host' tool call. It fetches the current state, merges the updates, and calls the client method.
    elif name == "update_redirection_host":
        args = dict(arguments)
        host_id = args.pop("host_id")
        current = await npm_client.get_redirection_host(host_id)
        updated_data = current.model_dump()
        updated_data.update(args)
        return _model_response(await npm_client.update_redirection_host(host_id, RedirectionHost(**updated_data)))
  • The registration of the 'update_redirection_host' tool with its input schema.
    Tool(
        name="update_redirection_host",
        description="Update an existing redirection host",
        inputSchema={
            "type": "object",
            "properties": {
                "host_id": {"type": "integer", "description": "The ID of the redirection host to update"},
                "domain_names": {"type": "array", "items": {"type": "string"}},
                "forward_scheme": {"type": "string", "enum": ["auto", "http", "https"]},
                "forward_http_code": {"type": "integer"},
                "forward_domain_name": {"type": "string"},
                "preserve_path": {"type": "boolean"},
                "certificate_id": {"type": "integer"},
                "ssl_forced": {"type": "boolean"},
                "block_exploits": {"type": "boolean"},
                "advanced_config": {"type": "string"},
            },
            "required": ["host_id"],
        },
    ),

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