HUSKYLENS 2 MCP Server

HUSKYLENS 2 MCP lets Gemini in Cherry Studio remotely manage vision apps, read recognition, schedule tasks and trigger photos, like turning the camera into a smart assistant

MCP Server

Note: To use the HUSKYLENS 2 MCP Server, please make sure to update the HUSKYLENS 2 firmware to the latest version. For the firmware update tutorial, please refer to: Click here to view

Ensure that the WiFi module is properly inserted and connected to a WiFi network. For instructions on connecting to WiFi, see the System Settings – WiFi section.

Swipe the screen to find MCP Service, tap to enter, and turn on the switch.
Once enabled, a URL such as "http://192.168.xx.xx:3000/sse" will appear — this is used for client connection.

Interface Diagram

1.Get the LLM API Key

Here, Google Gemini is used as an example.

Register, Login and Create API: Google AI Studio

Interface Diagram

Record this API Key

2.Cherry Studio Configuration

  1. Download and install Cherry Studio Click to download.

  2. Cherry Studio offers two default layouts. All tutorials use the following layout: Go to 'Setting - Display Setting', set the navbar position as left.

    Interface Diagram

  3. Find Model Provider , search for Gemini in the search box, switch it on.

    Interface Diagram

  4. Input the API key you get from above step , API host is https://generativelanguage.googleapis.com.

    Interface Diagram

  5. Scroll down to the bottom of this page, click + Add.

    Interface Diagram

  6. Type in gemini-2.5-flash for model ID, click on Add model.

    Interface Diagram

  7. Scroll back to the top, click check and choose gemini-2.5-flash in the search box.

    Interface Diagram

  8. Click OK and wait for the verification to pass. If verification fails, please check your API key and API host address.

    Interface Diagram

  9. Enter MCP setting, click Add -Quick Create.

    Interface Diagram

  10. You can enter any name. The URL is the one displayed on the HUSKYLENS 2 screen (located at the very beginning of the MCP tutorial section). Click Save.

    Interface Diagram

  11. Ensure the HUSKYLENS 2 and computer are connected to the same WiFi network, then click to turn it on. After successful activation, you will see four tools displayed in the toolbar. If no tools appear in the toolbar, this indicates startup failure. Check the network connection and verify that the HUSKYLENS 2 has enabled the MCP service, then restart both Cherry Studio and the HUSKYLENS 2.

    Interface Diagram

  12. Return to the chat mode and click the model selection.

    Interface Diagram

  13. Search and choose gemini-2.5-flash

    Interface Diagram

  14. Find the small hammer icon below the chat box and select the HUSKYLENS 2 tool.

    Interface Diagram

  15. You can now chat normally and interact with HUSKYLENS.

    Interface Diagram

    Interface Diagram

    Interface Diagram

    Interface Diagram

3.HUSKYLENS 2 MCP Tool List

Model Management

No. Tool Description Usage Notes Example Prompt
1 List Models Lists the built-in models and installed custom-trained models available on HUSKYLENS 2 No additional details are required. Use this tool when you do not know the model name or before switching models Show me the models available on this device
2 Switch Model Switches to a specified built-in model or installed custom-trained model You must specify the target model. If you are unsure of its name, use “List Models” first Switch to Face Recognition
3 Run Multiple Models Loads and runs multiple models on the device at the same time Must specify 2 or 3 models. Run Face Recognition and Object Recognition together
4 Get Current Model Shows the model currently running on HUSKYLENS 2 No additional details are required Which model is currently running

Multimedia

No. Tool Description Usage Notes Example Prompt
5 Take Photo Takes a photo with HUSKYLENS 2 You may specify 1920x1080, 1280x720, or 640x480 as the resolution. The default is 1280x720 Take a photo
6 Take Screenshot Captures the current HUSKYLENS 2 screen No additional details are required Take a screenshot
7 Play Music* Plays an MP3 audio file stored on the device You must specify the filename. Playback volume is optional, ranges from 0 to 100, and defaults to 100. This is the media playback volume and does not change the system volume Play welcome.mp3 at volume 80
8 Start Audio Recording* Starts recording audio and saves it as an MP3 file You must specify the recording duration in seconds. The filename is optional and is generated automatically if omitted Record audio for 10 seconds and save it as meeting.mp3
9 Stop Audio Recording* Stops an audio recording before its set duration ends No additional details are required. Use this after audio recording has started Stop recording

Recognition and Learning

No. Tool Description Usage Notes Example Prompt
10 Get Recognition Results Gets real-time recognition results from the current model, including image data, target positions, and recognition labels A model must currently be running What do you see
11 Forget Learned IDs Forgets the IDs learned by the current or specified model You may specify a model. If omitted, the learned IDs of the currently running model are forgotten Forget the learned IDs
12 Learn a Specific Object Teaches the model a target object in the current image You may describe the target's approximate position using directions such as top, bottom, left, or right Learn the face in the image.
Learn the leftmost person in the image
13 Name a Learned Object Assigns a name to an object that has already been learned You must specify the object ID and name Name the face with ID 1 Alex

Automated Tasks

No. Tool Description Usage Notes Example Prompt
14 Create an Automated Task* Creates a task that runs automatically when a specified condition is met You must specify both the trigger condition and the action to perform When you see Alex, take a photo

On-Screen Drawing

No. Tool Description Usage Notes Example Prompt
15 Draw Text* Draws text at a specified position on the HUSKYLENS 2 screen The text is required. Coordinates, font size, and color are optional. Supported font sizes are 20, 24, 26, 27, 28, 32, 36, 40, and 48 Write Hello World in the top-left corner of the screen
16 Draw Rectangle* Draws a rectangle at a specified position on the screen You may specify the coordinates, width, height, line width, and color Draw a rectangle at (40, 40) with a size of 200 × 120
17 Draw a Single Highlight Rectangle* Draws a single highlight rectangle on the screen You may specify the coordinates, width, height, line width, and color. Use this when only one highlight rectangle should remain on the screen Draw a single highlight rectangle at (40, 40) with a size of 200 × 120 and a line width of 4
18 Clear Text* Clears all text added through the drawing tools No additional details are required Clear all drawn text from the screen
19 Clear Rectangles* Clears all rectangles added through the drawing tools No additional details are required Clear all drawn rectangles from the screen

Model Import and Export

No. Tool Description Usage Notes Example Prompt
20 Export Model Exports the current configuration and learned data of a specified model to the knowledge base You must specify the model and target knowledge base ID Export the current Face Recognition configuration to Knowledge Base 1
21 Import Model Imports a model configuration from the knowledge base and loads it into the current workspace You must specify the knowledge base ID to load Load Knowledge Base 1

Model Parameters

No. Tool Description Usage Notes Example Prompt
22 View Model Parameters Shows the available parameters and current values for a specified model You may specify a model. If omitted, the parameters of the current model are shown. Use this tool before changing model parameters Show the parameters of the current model
23 Set Model Parameters Changes the parameters of a specified model You must specify the parameters and their values. The target model is optional; if omitted, the current model is used. Parameter names and value types must match the results from “View Model Parameters” For Face Recognition, set the recognition threshold to 0.5, the detection threshold to 0.6, and enable multi-face acceleration

Device Controls

No. Tool Description Usage Notes Example Prompt
24 Set Screen Brightness Adjusts the device screen brightness You must specify a value from 0 to 100 Set the screen brightness to 70
25 View Screen Brightness Shows the current device screen brightness No additional details are required What is the current screen brightness
26 Set System Volume Adjusts the device system volume You must specify a value from 0 to 100 in increments of 10 Set the system volume to 60
27 View System Volume Shows the current device system volume No additional details are required What is the current system volume
28 Set Fill Light Brightness Adjusts the brightness of the device's fill light You must specify a value from 0 to 100 Set the fill light brightness to 80
29 View Fill Light Status Shows the current brightness and on/off state of the fill light No additional details are required Show the current fill light brightness and on/off state

* Tools marked with an asterisk are disabled in Xiaozhi AI

Was this article helpful?

TOP