NikonMCP
NikonMCP is the Nikon camera module for the app's local MCP Server. It exposes selected Nikon camera state and camera actions to an MCP client.
Use NikonMCP when an AI assistant, lab tool, scriptable client, or external controller needs to inspect the connected Nikon camera state or request a small set of camera actions. Use the normal app UI when you need full manual control, setup, image browsing, metadata review, or workflow editing.
Before you start
- Open MCP Server.
- Enable the NikonMCP module card.
- Confirm the endpoint and bearer token.
- Start the MCP Server.
- Configure your MCP client with the endpoint and token.
- In the client, list tools and confirm the Nikon tools appear.
The client should use the MCP tool list it receives from the server as the source of truth. Different app versions can expose different NikonMCP tools.
Camera state
nikon_camera_get_state returns the current Nikon state snapshot. Mutating tools also return a state snapshot when practical.
The first NikonMCP camera state fields are:
canCapture: true when the app currently allows a no-AF capture request.statusMessage: the same short camera status message shown in the app.canConfigureConnection: true when connection settings can be changed.isConnected: true when the selected Nikon body is connected.isLiveViewEnabled: true when live view is currently enabled.lastCapturedImagePath: the most recent saved image final path when one is known.lastCapturedImagePaths: all final paths from the most recent capture when more than one file was saved.
lastCapturedImagePath is useful for clients that capture an image and then inspect that saved file with a separate image or vision tool. For RAW plus JPEG or other multi-file modes, use lastCapturedImagePaths when the client needs every saved file.
NikonMCP tools
nikon_hello
Validates that NikonMCP is enabled and reachable. It does not access the camera.
nikon_camera_get_state
Reads the current Nikon state snapshot. This is the safest first call after connecting a client. Use it before requesting capture, live view, or focus so the client can see whether the camera is ready.
nikon_camera_toggle_connection
Requests the same connection toggle behavior as the app's camera connection control. If the body is disconnected, the app starts connection. If the body is connected, the app starts disconnection.
The result is normally accepted, because connection and disconnection run through the app's camera communication path and may still be in progress after the MCP response returns.
nikon_camera_capture
Requests the same no-AF capture path as the app's Shoot button. The tool checks canCapture immediately before requesting capture.
The result is normally accepted, because capture, transfer, final path generation, metadata, and file-save work can continue after the MCP response returns. Call nikon_camera_get_state later to inspect the updated status message and the most recent saved image path.
nikon_camera_toggle_live_view
Requests live view to toggle on or off. The camera must be connected. If live view is not supported or cannot be changed in the current camera state, the tool is rejected.
nikon_camera_contrast_af
Requests contrast autofocus while live view is enabled. The camera must be connected, live view must be on, and contrast AF must be available in the current camera state.
Result statuses
NikonMCP tool results use a stable structured result shape:
ok: true for successful or accepted requests, false for rejection or error.status:ok,accepted,rejected, orerror.reasonCode: a stable code whenokis false.message: a short explanation.state: the current Nikon state snapshot when available.operation: future operation details when a later version adds long-running operation tracking.
The usual statuses are:
ok: the tool completed immediately, such asnikon_camera_get_stateornikon_hello.accepted: the app accepted a camera request and queued or started work.rejected: the request was understood, but the current camera or app state does not allow it.error: an unexpected implementation or runtime failure occurred.
Expected camera-state problems are normally rejected, not protocol errors. For example, capture while the camera is not ready should return a structured rejection instead of a broken MCP response.
Rejection reason codes
Common NikonMCP rejection codes include:
camera_not_connected: the requested tool needs a connected camera.camera_connecting: the camera is already connecting or disconnecting.capture_unavailable: capture is not currently allowed.live_view_unavailable: live view cannot be toggled in the current state.contrast_af_unavailable: contrast AF cannot run in the current state.camera_busy: the camera or app is busy.user_policy_disabled: the profile or module policy blocks the request.license_unavailable: the current license state does not allow the requested action.
Example tool calls
List tools first:
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
Get camera state:
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"nikon_camera_get_state","arguments":{}}}
Capture an image:
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"nikon_camera_capture","arguments":{}}}
Toggle live view:
{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"nikon_camera_toggle_live_view","arguments":{}}}
Run contrast AF:
{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"nikon_camera_contrast_af","arguments":{}}}
Most MCP clients create these JSON-RPC messages for you. Use these examples when debugging a custom client or checking request names.
Practical workflow
- Start MCP Server with NikonMCP enabled.
- Connect the MCP client.
- Call
nikon_camera_get_state. - If
isConnectedis false, requestnikon_camera_toggle_connection. - Wait until state reports
isConnectedtrue. - Confirm
canCaptureis true. - Request
nikon_camera_capture. - Poll
nikon_camera_get_stateuntil the status and last captured path update.
For live view focusing:
- Confirm
isConnectedis true. - Request
nikon_camera_toggle_live_viewif live view is off. - Wait until
isLiveViewEnabledis true. - Request
nikon_camera_contrast_af.
What NikonMCP does not do
NikonMCP is not a replacement for the full app UI. This first camera surface does not expose every camera setting, every workflow, live view image streaming, image browsing, profile editing, or generic app navigation.
MCP controls state and action requests. Large or continuous image data should use app features or a future side-channel designed for that purpose.
Troubleshooting
If NikonMCP does not appear in the client:
- Confirm the NikonMCP module card is Enabled on the MCP Server page.
- Stop and Start the MCP Server after enabling the module.
- Reconnect or refresh the client.
- Confirm the client is connected to the correct endpoint and token.
If nikon_camera_capture is rejected:
- Call
nikon_camera_get_stateand checkcanCapture. - Confirm the camera is connected.
- Confirm the camera is not busy, recording, writing, or in another workflow.
- Confirm the app can capture from the normal Shoot button.
If connection toggle is rejected or does not finish:
- Confirm the selected body matches the physical Nikon camera.
- Confirm the camera is powered on and connected by USB.
- Confirm no other app is using the Nikon camera.
- Watch the app status message and MCP Server log.
- Use the normal Body connection help if the camera cannot connect.
If live view toggle is rejected:
- Confirm the camera is connected.
- Confirm the camera model and current mode support remote live view.
- Confirm the camera is not busy capturing or saving.
- Try toggling live view from the app UI to confirm the camera state.
If contrast AF is rejected:
- Confirm live view is enabled.
- Confirm the lens and camera focus mode support autofocus.
- Confirm the camera is not already focusing, capturing, recording, or busy.
- Try Contrast AF from the app UI to confirm the camera state.
If lastCapturedImagePath does not update:
- Wait for capture transfer and final save to complete.
- Confirm the capture destination sends files to the computer when you expect a computer-side path.
- Check Path settings and the app status message.
- For multi-file captures, inspect
lastCapturedImagePaths. - Check the app Log for capture-save errors.
Related setup
Use MCP Server for endpoint, token, and module setup. Use Body Controls for normal Nikon camera connection and capture controls. Use Live View for live view setup and camera-side live view behavior. Use Path for the final folder and filename used by saved images.