import bpy, math

def mat_new(name):
    m=bpy.data.materials.new(name); m.use_nodes=True
    return m, m.node_tree.nodes["Principled BSDF"], m.node_tree

bm_, bpb, bnt = mat_new('GoldfishOrange')
bpb.inputs['Roughness'].default_value=0.28
nt=bnt; nodes=nt.nodes; links=nt.links
vo=nodes.new('ShaderNodeTexVoronoi'); vo.feature='DISTANCE_TO_EDGE'
vo.inputs['Scale'].default_value=60
mapn=nodes.new('ShaderNodeMapping'); mapn.inputs['Scale'].default_value=(2.0,6.0,6.0)
texco=nodes.new('ShaderNodeTexCoord')
links.new(texco.outputs['Object'], mapn.inputs['Vector'])
links.new(mapn.outputs['Vector'], vo.inputs['Vector'])
ramp=nodes.new('ShaderNodeValToRGB'); ramp.color_ramp.interpolation='CONSTANT'
ramp.color_ramp.elements[0].position=0.0; ramp.color_ramp.elements[0].color=(0.75,0.16,0.01,1)
ramp.color_ramp.elements[1].position=0.12; ramp.color_ramp.elements[1].color=(1.0,0.32,0.03,1)
links.new(vo.outputs['Distance'], ramp.inputs['Fac'])

sep=nodes.new('ShaderNodeSeparateXYZ'); links.new(texco.outputs['Object'], sep.inputs['Vector'])
mathz=nodes.new('ShaderNodeMath'); mathz.operation='MULTIPLY_ADD'
links.new(sep.outputs['Z'], mathz.inputs[0])
mathz.inputs[1].default_value=-3.0
mathz.inputs[2].default_value=1.0
clampn=nodes.new('ShaderNodeClamp')
clampn.inputs['Min'].default_value=0.0; clampn.inputs['Max'].default_value=1.0
links.new(mathz.outputs[0], clampn.inputs[0])

mixc=nodes.new('ShaderNodeMix'); mixc.data_type='RGBA'; mixc.blend_type='MIX'
bellycol=nodes.new('ShaderNodeRGB'); bellycol.outputs[0].default_value=(1.0,0.55,0.15,1)
links.new(ramp.outputs['Color'], mixc.inputs['A'])
links.new(bellycol.outputs[0], mixc.inputs['B'])
links.new(clampn.outputs[0], mixc.inputs['Factor'])
links.new(mixc.outputs[2], bpb.inputs['Base Color'])

fm, fpb, fnt = mat_new('FinMaterial')
fpb.inputs['Base Color'].default_value=(1.0,0.42,0.10,1)
fpb.inputs['Roughness'].default_value=0.35
if 'Transmission Weight' in fpb.inputs:
    fpb.inputs['Transmission Weight'].default_value=0.4
    fpb.inputs['IOR'].default_value=1.33
fnt_nodes=fnt.nodes; fnt_links=fnt.links
tc=fnt_nodes.new('ShaderNodeTexCoord')
grad=fnt_nodes.new('ShaderNodeTexGradient'); grad.gradient_type='QUADRATIC_SPHERE'
rmp=fnt_nodes.new('ShaderNodeValToRGB')
rmp.color_ramp.elements[0].position=0.45; rmp.color_ramp.elements[0].color=(0.4,0,0,1)
rmp.color_ramp.elements[1].position=0.9; rmp.color_ramp.elements[1].color=(1,1,1,1)
fnt_links.new(tc.outputs['Generated'], grad.inputs['Vector'])
fnt_links.new(grad.outputs['Color'], rmp.inputs['Fac'])
trans=fnt_nodes.new('ShaderNodeBsdfTranslucent')
mixs=fnt_nodes.new('ShaderNodeMixShader')
out=fnt_nodes['Material Output']
fnt_links.new(rmp.outputs['Color'], mixs.inputs['Fac'])
fnt_links.new(fpb.outputs['BSDF'], mixs.inputs[1])
fnt_links.new(trans.outputs['BSDF'], mixs.inputs[2])
fnt_links.new(mixs.outputs[0], out.inputs['Surface'])

body.data.materials.append(bm_)
for o in ('TailFin','DorsalFin','PecFinR','PecFinL'):
    bpy.data.objects[o].data.materials.append(fm)

bpy.ops.mesh.primitive_circle_add(vertices=96, radius=14, fill_type='NGON', location=(0,0,-1.8))
floor=bpy.context.active_object; floor.name='FloorCircle'
flm, flp,_ = mat_new('FloorMat')
flp.inputs['Base Color'].default_value=(0.05,0.13,0.20,1)
flp.inputs['Roughness'].default_value=0.35
floor.data.materials.append(flm)

w=bpy.data.worlds.new('WaterWorld'); scene.world=w; w.use_nodes=True
wn=w.node_tree; wn.nodes.clear()
bg=wn.nodes.new('ShaderNodeBackground'); bg.inputs['Strength'].default_value=1.2
outw=wn.nodes.new('ShaderNodeOutputWorld')
tcw=wn.nodes.new('ShaderNodeTexCoord')
grw=wn.nodes.new('ShaderNodeValToRGB')
grw.color_ramp.elements[0].position=0.3; grw.color_ramp.elements[0].color=(0.005,0.06,0.12,1)
grw.color_ramp.elements[1].position=0.7; grw.color_ramp.elements[1].color=(0.08,0.35,0.55,1)
wn.links.new(tcw.outputs['Window'], grw.inputs['Fac'])
wn.links.new(grw.outputs['Color'], bg.inputs['Color'])
wn.links.new(bg.outputs[0], outw.inputs['Surface'])

key=bpy.data.lights.new('Key','AREA'); key.energy=800; key.size=6
ko=bpy.data.objects.new('Key', key); ko.location=(4,-5,6); ko.rotation_euler=(math.radians(40),0,math.radians(-40))
rim=bpy.data.lights.new('Rim','AREA'); rim.energy=400; rim.color=(0.5,0.8,1.0); rim.size=4
ro=bpy.data.objects.new('Rim', rim); ro.location=(-6,3,4); ro.rotation_euler=(math.radians(50),0,math.radians(120))
fill=bpy.data.lights.new('Fill','POINT'); fill.energy=200; fill.color=(0.7,0.9,1.0)
fo=bpy.data.objects.new('Fill', fill); fo.location=(0,6,1)
for o in (ko,ro,fo): bpy.context.collection.objects.link(o)

cam=bpy.data.cameras.new('Cam'); cam.lens=85
co=bpy.data.objects.new('Camera', cam); bpy.context.collection.objects.link(co)
co.location=(4.2,-5.2,1.6)
tgt=bpy.data.objects.new('CamTarget', None); tgt.empty_display_size=0.3; bpy.context.collection.objects.link(tgt); tgt.location=(0.1,0,0.1)
con=co.constraints.new('TRACK_TO'); con.target=tgt
scene.camera=co
scene.render.engine='CYCLES'
scene.cycles.samples=64
result={'done':True}


Traceback (most recent call last):
  File "<repo>\.runner\blender-mcp-v1.0.0\addon\mcp_to_blender_server.py", line 230, in _execute_code
    exec(code, namespace)
    ~~~~^^^^^^^^^^^^^^^^^
  File "<string>", line 60, in <module>
NameError: name 'body' is not defined