Python code to add objects to the 3D Cursor
Add new object at cursor
Default values.
If you auto complete on the operator in the python console, it shows the properties and their default values.  There is no need to pass any default value to the operator.
&gt;&gt;&gt; bpy.ops.mesh.primitive_cube_add(
primitive_cube_add()
bpy.ops.mesh.primitive_cube_add(size=2, calc_uvs=True, enter_editmode=False, align='WORLD', location=(0, 0, 0), rotation=(0, 0, 0), scale=(0, 0, 0))
Construct a cube mesh

To add a cube with location and rotation of 3D cursor
bpy.ops.mesh.primitive_cube_add(align='CURSOR')

To add at  cursor location.
bpy.ops.mesh.primitive_cube_add(location=bpy.context.scene.cursor.location)

or equivalently, align to cursor but override rotation.  Even though the zero rotation passed is default, just passing it (in tests so far) overrides cursor rotation.
bpy.ops.mesh.primitive_cube_add(align='CURSOR', rotation=(0, 0, 0))

Related
Precisely move the 3D cursor
How to move selected object to the curser location using a python command?