@neirth/sony-camera-mcp
v1.9.0
Published
MCP Server for controlling Sony Alpha 6100 camera
Downloads
50
Maintainers
Readme
Sony Camera MCP Server
A Model Context Protocol (MCP) server for controlling Sony Alpha cameras remotely. This server provides AI assistants with the ability to interact with Sony cameras using the Camera Remote API.
Features
- Exposure Control: Adjust ISO, shutter speed, and exposure compensation
- Photo Capture: Take pictures and receive them as base64-encoded images
- Zoom Control: Control camera zoom in/out with different modes
- Shoot Mode Management: Switch between still and movie modes
- Live View: Start and stop live view streaming
- Real-time Communication: Direct integration with Sony Camera Remote API
Quick Start
The easiest way to use this MCP server is with npx:
npx -y @neirth/sony-camera-mcpRequirements
- Sony Alpha camera with Wi-Fi capability and Camera Remote API support
- Camera connected via Wi-Fi Direct or to the same network as your computer
- Node.js 18+ (for development)
Note: This server has been tested and verified to work with the Sony Alpha 6100. Other Sony Alpha cameras with Camera Remote API support should work as well.
Supported Sony Cameras
This server works with Sony Alpha cameras that support the Camera Remote API, including:
- Sony α7 series
- Sony α6000 series
- Sony FX series
- And other compatible Sony cameras with Wi-Fi
Configuration
Environment Variables
You can configure the server using environment variables:
CAMERA_IP=192.168.122.1 # Camera IP address (default: 192.168.122.1)
CAMERA_PORT=10000 # Camera port (default: 10000)
DD_XML_PORT=64321 # Device description XML port (default: 64321)
DEBUG=true # Enable debug logging (default: false)Camera Setup
- Enable Wi-Fi on your Sony camera
- Set the camera to "Control with Smartphone" mode or enable Wi-Fi Direct
- Connect your camera to your Wi-Fi network or establish a Wi-Fi Direct connection
- Note the camera's IP address (usually found in camera network settings)
Wi-Fi Direct: If using Wi-Fi Direct, your camera will create its own network that you can connect to directly from your computer. This is often the easiest setup method.
Available Tools
exposure_control
Control camera exposure settings.
Parameters:
action: "get" or "set"parameter: "iso", "shutter_speed", "ev", "white_balance" (for get/set operations)value: New value (for set operations)
Examples:
- Get current ISO:
{"action": "get", "parameter": "iso"} - Set ISO to 800:
{"action": "set", "parameter": "iso", "value": "800"} - Get all exposure settings:
{"action": "get"}
shoot_control
Capture photos.
Parameters:
action: "capture"
Example:
- Take a picture:
{"action": "capture"}
zoom_control
Control camera zoom.
Parameters:
action: "in" or "out"type: "1shot", "start", or "stop"
Example:
- Zoom in once:
{"action": "in", "type": "1shot"}
shoot_mode
Manage shooting mode.
Parameters:
action: "get" or "set"mode: "still" or "movie" (for set operations)
Examples:
- Get current mode:
{"action": "get"} - Set to still mode:
{"action": "set", "mode": "still"}
live_view
Control live view streaming.
Parameters:
action: "start" or "stop"
Examples:
- Start live view:
{"action": "start"} - Stop live view:
{"action": "stop"}
Development
Installation
git clone <repository-url>
cd sony_camera_mcp
npm installBuilding
npm run buildTesting
npm testRunning in Development Mode
npm run devContributing with Conventional Commits
This project uses conventional commits for better changelog generation and automated versioning.
Making Commits
Use the interactive commit tool:
npm run commit
# or
./commit.shThis will guide you through creating properly formatted commit messages.
Manual Commits
If you prefer to write commits manually, follow the conventional commit format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvementsci: CI/CD changesbuild: Build system changes
Creating Releases
To create a new release:
npm run releaseThis will:
- Analyze commits since the last release
- Determine the next version number
- Generate/update CHANGELOG.md
- Create a git tag
- Commit the changes
CI/CD Pipeline
The project includes GitHub Actions workflows for:
CI/CD Pipeline (
.github/workflows/ci-cd.yml):- Runs tests on multiple Node.js versions
- Builds the project
- Publishes to NPM on releases
- Validates conventional commits on PRs
Manual Release (
.github/workflows/release.yml):- Manually triggered releases
- Choose release type (patch/minor/major)
- Automated NPM publishing
Required Secrets
To enable NPM publishing, add the following secret to your GitHub repository:
NPM_TOKEN: Your NPM authentication token
Integration with AI Assistants
This MCP server is designed to work with AI assistants that support the Model Context Protocol. When integrated, AI assistants can:
- Automatically adjust camera settings based on scene analysis
- Capture photos and analyze them in real-time
- Provide cinematography advice and apply optimal settings
- Control multiple camera functions through natural language
Troubleshooting
Common Issues
- Camera not found: Ensure the camera is connected to Wi-Fi or Wi-Fi Direct and the IP address is correct
- Connection timeout: Check that both devices are on the same network or properly connected via Wi-Fi Direct
- Permission denied: Make sure the camera is in "Control with Smartphone" mode or Wi-Fi Direct is enabled
Debug Mode
Enable debug logging to see detailed API communication:
DEBUG=true npx -y @neirth/sony-camera-mcpLicense
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
