create_stream
Create TCP/UDP stream proxies in Nginx Proxy Manager by specifying incoming ports and forwarding destinations to route network traffic.
Instructions
Create a new TCP/UDP stream proxy
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| incoming_port | Yes | Port to listen on (1-65535) | |
| forwarding_host | Yes | Host to forward to | |
| forwarding_port | Yes | Port to forward to (1-65535) | |
| tcp_forwarding | No | ||
| udp_forwarding | No | ||
| certificate_id | No |
Implementation Reference
- src/npm_mcp/client.py:283-288 (handler)The actual API call implementation for the 'create_stream' tool.
async def create_stream(self, stream: Stream) -> Stream: response = await self._request( "POST", "/api/nginx/streams", json=stream.model_dump(exclude_none=True, exclude={"id", "created_on", "modified_on"}), ) return Stream(**response.json()) - src/npm_mcp/server.py:129-143 (registration)Registration of the 'create_stream' tool, including its input schema.
name="create_stream", description="Create a new TCP/UDP stream proxy", inputSchema={ "type": "object", "properties": { "incoming_port": {"type": "integer", "description": "Port to listen on (1-65535)"}, "forwarding_host": {"type": "string", "description": "Host to forward to"}, "forwarding_port": {"type": "integer", "description": "Port to forward to (1-65535)"}, "tcp_forwarding": {"type": "boolean", "default": True}, "udp_forwarding": {"type": "boolean", "default": False}, "certificate_id": {"type": "integer"}, }, "required": ["incoming_port", "forwarding_host", "forwarding_port"], }, ), - src/npm_mcp/server.py:414-415 (handler)Dispatcher logic in the MCP server that invokes the client implementation.
elif name == "create_stream": return _model_response(await npm_client.create_stream(Stream(**arguments)))