create_simulationLABSCO SUMMARY
A physics sandbox an agent can drive, with the sharp edges written down.
The documentation is unusually honest about where it bites: hinge joints cannot be made through the runtime constraint interface, so a generator writes a URDF instead — and it warns that the generated file must land inside the server's working directory or loading it will be refused. Ray casting and rendered camera images make this usable for perception work, not just for dropping boxes.
What it is
A server over the PyBullet physics engine. Several independent simulations can be alive at once; you add shapes or load a robot from a URDF, step time forward, and query state, contacts and rendered images.
What you get
- Simulations created with the gravity you choose, listed, stepped forward and torn down, with a configurable timestep (create_simulation, list_simulations, step_simulation, set_timestep, destroy_simulation)
- Primitive shapes and URDF models placed in the world, repositioned, and queried for position, orientation and velocity (add_box, add_sphere, add_cylinder, add_capsule, load_urdf, set_object_pose, get_object_state)
- Forces, torques and velocities applied, and physics properties like mass, friction, restitution and damping changed at runtime and read back (apply_force, apply_torque, set_object_velocity, change_dynamics, get_dynamics_info)
- Robot control: how many joints a model has, each joint's limits and axis, its live position and velocity, motor control by position, velocity or torque, and inverse kinematics for an end effector (get_num_joints, get_joint_info, get_joint_state, set_joint_motor_control, calculate_inverse_kinematics)
- Ray casting, singly or in batches, for obstacle detection and lidar-style sensing (ray_test, ray_test_batch)
- Rendered colour, depth and segmentation images from a virtual camera you position yourself (compute_view_matrix, compute_view_matrix_from_yaw_pitch, compute_projection_matrix, get_camera_image)
- Joints between objects, and a generator that writes a URDF for a hinge joint the runtime constraint interface cannot create (create_constraint, remove_constraint, generate_revolute_joint)
- Contact points across the whole world or between one pair, with positions, normals and forces (get_all_collisions, get_collisions_for_pair)
- The world saved to a file and restored later, constraints included (save_simulation, load_simulation)
- Debug rendering of contacts and frames, and camera control, when the graphical mode is on (enable_debug_visualization, set_camera)
Requirements
Python with PyBullet and FastMCP installed, in a virtual environment. It runs headless by default; the graphical mode needs a display, and only one graphical simulation can be alive at a time. Vectors must be given complete — gravity, positions, forces and orientations all take their full set of components — and mass must be positive, so a static ground plane is made heavy rather than massless.
Setup effort
Follow the published steps — python -m venv venv
USE CASES
Checking whether an arrangement stands up
Place the objects, step time forward, and read back positions and contact points.
Driving a robot model
Load the URDF, read the joints and their limits, command a joint by position, and watch the state change.
Working out joint angles for a target pose
Ask for inverse kinematics against the end-effector link and the position you want.
Simulating a sensor
Cast a batch of rays from the robot and read the hits, distances and surface normals.
Seeing what the robot sees
Build the view and projection matrices, then render colour, depth and segmentation from that viewpoint.
Picking up where you stopped
Save the world to a file and restore it later with constraints intact.
Building a hinge
Generate a URDF containing the revolute joint, load it, then drive it with a motor command.
37 tools
Listed in project docs. Your client may show a different list.
list_simulationsdestroy_simulationstep_simulationset_timestepadd_boxadd_sphereadd_cylinderadd_capsuleload_urdfset_object_poseget_object_stateapply_forceapply_torqueset_object_velocitychange_dynamicsget_dynamics_inforay_testray_test_batchcompute_view_matrixcompute_view_matrix_from_yaw_pitchcompute_projection_matrixget_camera_imagecreate_constraintremove_constraintgenerate_revolute_jointget_all_collisionsget_collisions_for_pairenable_debug_visualizationset_camerasave_simulationload_simulationget_num_jointsget_joint_infoget_joint_stateset_joint_motor_controlcalculate_inverse_kinematicsBEFORE YOU INSTALL
What to know first
Tools you get
37 tools named in the project's documentation.
Requires
- Python 3.9 or higher
- pip package manager
- Virtual environment (recommended)
- Only one GUI simulation can be active at a time (PyBullet limitation)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateInstall FastMCP and PyBullet:
pip install fastmcp pybulletQuick command:
python -m src.serverMCP Clients
Cursor
{
"mcpServers": {
"pybullet": {
"url": "http://localhost:8000/mcp",
"disabled": false
}
}
}