KingstVIS MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KINGSTVIS_HOST | No | KingstVIS 所在主机 | 127.0.0.1 |
| KINGSTVIS_PORT | No | Socket API 端口 | 23367 |
| KINGSTVIS_TIMEOUT | No | 普通命令响应超时(秒) | 15 |
| KINGSTVIS_DATA_DIR | No | 导出文件与 npz 的保存目录 | ./data |
| KINGSTVIS_START_TIMEOUT | No | start(阻塞至采样完成)超时 | 300 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connectA | Open the TCP connection to KingstVIS and handshake (get-last-error). Leave host/port empty to use KINGSTVIS_HOST/KINGSTVIS_PORT (default 127.0.0.1:23367). The software must be running with the Socket API enabled in vis.config. |
| disconnectA | Close the TCP connection (KingstVIS keeps running). |
| get_statusB | Connection state, sample rate and supported sample rates. |
| get_last_errorB | Last error message from the software (per official semantics). |
| raw_commandA | Escape hatch: send any Socket API command verbatim, return the raw reply. e.g. 'get-sample-rate', 'set-trigger --reset --pos-edge 0'. Commands must be <=2048 characters; 'ACK ...' is returned as ok=true. |
| set_sample_rateA | Set the sample rate in Hz (e.g. 10000000 = 10M). Use get_supported_sample_rates first; unsupported values are rejected. |
| get_sample_rateA | Current sample rate in Hz. |
| get_supported_sample_ratesA | All sample rates the connected device supports, in Hz. |
| set_sample_depthB | Set sample depth in samples (e.g. 20000000 = 20M). |
| set_sample_timeA | Set capture length by time in seconds (alternative to depth). |
| set_threshold_voltageA | IO threshold voltage, -4.0 .. +4.0 V (e.g. 1.65 for 3.3V CMOS). |
| set_triggerA | Configure trigger conditions. Edge trigger accepts a single channel (device rule: last one wins); level triggers accept several channels. reset=true clears existing conditions first (recommended). Examples: pos_edge=0; high_level=[1,2]; reset=True, neg_edge=3, low_level=[4]. |
| startA | Start one acquisition. BLOCKS until the capture completes. Real capture requires hardware attached; simulate=true runs the Demo device instead (mutually exclusive — mismatch returns an error so you always know whether data is real). Returns actual depth/time afterwards. |
| stopA | Abort the current acquisition (ACK means: not sampling any more). |
| get_actual_sample_depthA | Actual depth of the last capture (may be less than configured). |
| get_actual_sample_timeA | Actual capture window [start_s, end_s], trigger point = 0. |
| export_dataA | Export the current capture; kvdat (default) is parsed to .npz. filename: bare name or absolute path; extension picks the format (.kvdat/.csv/.txt/.bin). channels: subset e.g. [0,1]; time_start_s/ time_end_s crop the export (trigger = 0, end needs start). With parse=true (kvdat/csv/txt) a .npz named ..npz is written next to the export (never overwrites a previous format's npz) and summarized here — the entry point for offline analysis. csv/txt parses use the device's current rate and actual depth automatically. |
| export_decodedA | Export a protocol analyzer's decode results (.csv/.txt). The analyzer (I2C/SPI/UART/CAN/...) must already be added in the KingstVIS GUI — the Socket API cannot add analyzers. analyzer is the 0-based index in the GUI's analyzer list. Wait after start() for decoding to finish. |
| list_analyzersA | Analyzers currently configured in vis.config (slot/plugin/settings). The official Socket API cannot add analyzers; this family of tools works by writing vis.config and restarting KingstVIS (see docs/NOTES.md §5). |
| list_analyzer_pluginsA | All built-in decoder plugins shipped with KingstVIS (46 on 3.6.6): PWM, UART, I2C, SPI, CAN(-FD), USB1.1/USB-PD, SWD, JTAG, Modbus, 1-Wire, DHT12, DMX512, LIN, MDIO, Midi, RGB-WS28xx, SMBus, Wiegand ... |
| add_analyzerA | Add a built-in decoder (script control, no GUI): writes vis.config's and optionally restarts KingstVIS to load it. plugin: 'PWM', 'UART', 'libI2C.dylib' ... (see list_analyzer_plugins). channels: one entry per channel field, in the plugin's field order — PWM/UART/CAN: [ch]; I2C: [sda, scl]; SPI: [clk, mosi, miso, cs]. Each channel must be an int 0..15. When channels is omitted the plugin's built-in default binding is used. parameters: raw SimpleArchive settings string when defaults don't fit. allow_overlap=true permits sharing channels with another analyzer; replace=true updates an existing instance of the same plugin. UNIO is known to SIGSEGV KingstVIS and is refused unless allow_crashy=true. After restart: start() -> export_decoded(analyzer=slot). |
| remove_analyzerA | Remove a configured decoder by slot index (0-based), optionally restarting KingstVIS so the change takes effect. slot is the slot number reported by list_analyzers. Removal writes the remaining entries back as-is: legal channel overlaps that were already configured never block a removal. |
| parse_fileA | Parse an exported capture (.kvdat/.bin/.csv/.txt) into .npz — fully offline, no KingstVIS connection needed. kvdat embeds its sample rate; bin needs sample_rate_hz; csv/txt REQUIRE sample_rate_hz (transition lists carry no rate info) and accept n_samples (the capture depth) for exact duty/duration. Returns the capture summary; the .npz is written next to the source as ..npz (never overwrites a different format's npz). |
| measure_channelA | Offline digital measurements for one channel of a parsed capture: edge counts, frequency (median rising period), duty cycle, high/low pulse width stats (min/max/mean/median), first/last activity. |
| list_edgesB | Paged edge listing for one channel: positions, times (s) and the level after each edge. kind: all | rising | falling. |
| captureA | One-shot: configure -> start (blocking) -> export kvdat -> parse npz. The convenient single call for grabbing data for offline analysis. Leave rate/depth/time None to keep current settings; time_s is an alternative to depth. Returns export summary + parsed capture summary. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |