Yes it is. In 2010, the Building Regulations for England were changed to officially permit composting toilets as part of a drive to reduce domestic water consumption. Similarly, in other regions in the UK, the use of compost toilets is legal.
There are various regulatory bodies (planning, building regs, environment agency) that might want to know more about the toilet, and how you plan to deal with any outputs.
These bodies will be interested in the safety of the toilet for the user and the person(s) maintaining the compost toilet, as well as the wider environment.