A device for restraining/locking mechanical parts on machines tools comprising: - at least one hydraulic cylinder fixable to a machine tool; - at least one first piston inserted in said hydraulic cylinder and comprising a head which projects from said hydraulic cylinder, said first piston being slidable relative to said hydraulic cylinder due to the thrust of a pressurised hydraulic fluid along a main line between a home configuration, in which said head is located outside a cavity of a mechanical part to be machined, and an operating configuration, in which said head is located inside said cavity; - at least two self-centring locking elements joined to said head in such a way that they are movable along lines of sliding which are substantially transversal to said main line for abutting an inner surface of said cavity when said first piston is in said operating configuration; - movement means (21, 22) for moving said self-centring locking elements between a retracted position and an extracted position, wherein said movement means (21, 22) comprise: - at least one hydraulic chamber made in said first piston; - at least one second piston which is inserted in said hydraulic chamber, which is slidable relative to said first piston along said main line due to the thrust of said pressurised hydraulic fluid between a starting position, corresponding to said retracted position, and an arrival position, corresponding to said extracted position, and which comprises an operating portion joined to said self-centring locking elements and suitable for converting the motion of said second piston along said main line into the motion of said self-centring locking elements along said lines of sliding; and - adjusting means for adjusting said extracted position; characterised in that said adjusting means comprise at least one contact member joined to said first piston in a position modifiable by an operator and suitable for making contact with a contact surface of said second piston in said arrival position, for defining an end of stroke of the sliding of said second piston along said main line. - at least one hydraulic cylinder fixable to a machine tool; - at least one first piston inserted in said hydraulic cylinder and comprising a head which projects from said hydraulic cylinder, said first piston being slidable relative to said hydraulic cylinder due to the thrust of a pressurised hydraulic fluid along a main line between a home configuration, in which said head is located outside a cavity of a mechanical part to be machined, and an operating configuration, in which said head is located inside said cavity; - at least two self-centring locking elements joined to said head in such a way that they are movable along lines of sliding which are substantially transversal to said main line for abutting an inner surface of said cavity when said first piston is in said operating configuration; - movement means (21, 22) for moving said self-centring locking elements between a retracted position and an extracted position, wherein said movement means (21, 22) comprise: - at least one hydraulic chamber made in said first piston; - at least one second piston which is inserted in said hydraulic chamber, which is slidable relative to said first piston along said main line due to the thrust of said pressurised hydraulic fluid between a starting position, corresponding to said retracted position, and an arrival position, corresponding to said extracted position, and which comprises an operating portion joined to said self-centring locking elements and suitable for converting the motion of said second piston along said main line into the motion of said self-centring locking elements along said lines of sliding; and - at least one hydraulic chamber made in said first piston; - at least one second piston which is inserted in said hydraulic chamber, which is slidable relative to said first piston along said main line due to the thrust of said pressurised hydraulic fluid between a starting position, corresponding to said retracted position, and an arrival position, corresponding to said extracted position, and which comprises an operating portion joined to said self-centring locking elements and suitable for converting the motion of said second piston along said main line into the motion of said self-centring locking elements along said lines of sliding; and - adjusting means for adjusting said extracted position;