MCP server for advanced camera control and navigation in CesiumJS 3D globe applications.
camera_mcp.mp4
- Smooth Camera Flights: Animated camera transitions with customizable easing functions
- Instant Positioning: Direct camera placement without animation
- Look-At Controls: Lock camera to specific points for orbital viewing
- Orbit Automation: Automated circular orbit around targets
- Camera State Queries: Get current position, orientation, and view bounds
- Controller Configuration: Adjust camera movement constraints and behavior
pnpm install
pnpm run buildpnpm run dev # Development mode with auto-reload
pnpm start # Production modeThe server will start on port 3002 with SSE transport.
Execute camera fly operation with advanced options
Smoothly animates the camera to a destination with configurable easing and flight path.
Capabilities:
- Customizable flight duration (default: 3 seconds)
- 40+ easing functions (LINEAR, QUADRATIC, CUBIC, QUARTIC, QUINTIC, SINUSOIDAL, EXPONENTIAL, CIRCULAR, ELASTIC, BOUNCE, BACK)
- Maximum height control during flight
- Pitch adjustment at specific heights
- Fly-over longitude control for curved paths
- Automatic orientation adjustment
Input:
destination: Target position (longitude, latitude, height)orientation(optional): Camera orientation (heading, pitch, roll in degrees)duration(optional): Animation duration in secondseasingFunction(optional): Animation curvemaximumHeight(optional): Maximum height during flight in meterspitchAdjustHeight(optional): Height to adjust pitchflyOverLongitude(optional): Longitude to fly overflyOverLongitudeWeight(optional): Weight of flyOverLongitude (0-1)
Output:
- Final camera position and orientation
- Animation statistics (duration, client count, response time)
Instantly set camera position without animation
Immediately positions the camera at the specified location and orientation.
Capabilities:
- Zero-animation instant positioning
- Precise position and orientation control
- Rectangle-based view framing
- Heading-pitch-range positioning relative to targets
Input:
destination: Target position (longitude, latitude, height)orientation(optional): Camera orientation (heading, pitch, roll in degrees)
Output:
- Final camera position and orientation
- Client broadcast statistics
Lock camera to look at a specific point on Earth
Sets up a look-at relationship between the camera and a target point, useful for orbiting around landmarks.
Capabilities:
- Target-relative camera positioning
- Automatic heading/pitch/range calculation
- Orbit-ready camera setup
- Landmark inspection mode
Input:
target: Target position to look at (longitude, latitude, height)offset(optional): Camera offset from target (heading, pitch, range)
Output:
- Camera configuration confirmation
- Target and offset details
Start automated camera orbit around target
Begins automatic circular orbit around the current look-at target.
Capabilities:
- Configurable orbit speed and direction
- Smooth circular motion
- Maintains fixed altitude and distance
- Automatic heading updates
Input:
speed(optional): Orbit speed multiplier (default: 1.0, range: 0.1-10.0)direction(optional): 'clockwise' or 'counterclockwise' (default: 'clockwise')
Output:
- Orbit activation confirmation
- Speed and direction settings
Stop the current camera orbit animation
Halts any active automated orbit, returning camera control to user.
Capabilities:
- Immediate orbit cessation
- Preserves current camera position
- Restores manual camera control
Input: None
Output:
- Orbit deactivation confirmation
Get comprehensive camera information
Retrieves detailed camera state including position, orientation, and visible bounds.
Capabilities:
- Current position in cartographic coordinates
- Full orientation (heading, pitch, roll)
- View rectangle (visible lat/lon bounds)
- Height above terrain/ellipsoid
- Real-time state queries
Input: None
Output:
position: Current camera position (longitude, latitude, height)orientation: Current orientation (heading, pitch, roll in degrees)viewRectangle: Visible bounds (west, south, east, north in degrees)timestamp: Query timestamp
Configure camera movement constraints and behavior
Adjusts camera controller settings to customize user interaction and enforce constraints.
Capabilities:
- Enable/disable specific camera movements (rotate, translate, zoom, tilt, look)
- Set maximum/minimum zoom distances
- Configure collision detection
- Adjust inertia and momentum
- Set movement speed multipliers
Input:
enableRotate(optional): Allow camera rotationenableTranslate(optional): Allow camera panningenableZoom(optional): Allow zoom in/outenableTilt(optional): Allow pitch adjustmentenableLook(optional): Allow free-look modemaximumZoomDistance(optional): Maximum zoom-out distance in metersminimumZoomDistance(optional): Minimum zoom-in distance in metersenableCollisionDetection(optional): Prevent camera from going underground
Output:
- Applied configuration settings
- Client broadcast statistics
The camera server works with any MCP-compatible client: Cline, Github Copilot (VS Code), Claude Desktop, or other MCP clients.
Step 1: Install Cline
Install the Cline extension from VS Code marketplace.
Step 2: Configure MCP Server
Add to your Cline MCP settings (~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json or via Cline settings UI):
Note: For Github Copilot or Claude Desktop, use similar configuration in their respective MCP settings files.
{
"mcpServers": {
"cesium-camera-server": {
"command": "node",
"args": [
"{YOUR_WORKSPACE}/cesium-ai-integrations/mcp/cesium-js/servers/camera-server/build/index.js"
],
"env": {
"PORT": "3002",
"COMMUNICATION_PROTOCOL": "sse" // "websocket"
}
}
}
}Step 3: Start the Visual Client (Optional but Recommended)
To see camera movements in real-time 3D:
# Configure environment
cd test-applications/web-app
cp .env.example .env
# Edit .env and add your Cesium Ion token from https://ion.cesium.com/tokens
# Start the web client
pnpm startOpen http://localhost:8080 to view the 3D globe. The status panel will show the camera server connection.
Step 4: Use Cline
Open Cline in VS Code and use natural language commands (see example queries below). The camera server tools will be available automatically.
Try these natural language queries with your AI client:
"Fly to the Eiffel Tower in Paris"
"Show me Mount Everest from 5000 meters altitude"
"Fly to the Golden Gate Bridge at 500m height, looking down at 45 degrees, over 5 seconds"
"Create a cinematic flight to Dubai's Burj Khalifa using exponential easing, maximum height 8000m"
"Lock camera to look at the Colosseum from 300 meters away, then start orbiting clockwise"
"Stop the current orbit"
"Where is the camera currently positioned?"
"Disable camera tilt and set maximum zoom to 20km"
"Fly to the Great Wall of China, then orbit around it for a full 360-degree view"
- Server: Registers MCP tools, exposes SSE endpoint on port 3002
- Browser Manager: Translates commands to Cesium Camera API calls
- Easing Functions: Maps string names to Cesium.EasingFunction enums
- Coordinate Transforms: Handles cartographic ↔ cartesian conversions
Add to your .env file in test-applications/web-app:
CESIUM_ACCESS_TOKEN=your_token_here
MCP_PROTOCOL=websocket
MCP_CAMERA_PORT=3002Environment variables for the camera server:
PORTorCAMERA_SERVER_PORT: Override default server port (default: 3002)COMMUNICATION_PROTOCOL: Choose 'sse' or 'websocket' (default: 'websocket')MAX_RETRIES: Maximum retry attempts for port binding (default: 10)STRICT_PORT: If 'true', fail if exact port unavailable (default: false)
Interested in contributing? Please read CONTRIBUTING.md. We also ask that you follow the Code of Conduct.
Apache 2.0. See LICENSE.