CL

calmyjane/labview_assistant

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

24 stars 8 forks Качество 30 Тренд 0

Сервер LabVIEW MCP

Обзор

Репо содержит сервер LabVIEW Assistant MCP (Model Context Protocol). Он позволяет модели большого языка, такой как ChatGPT или Claude Desktop, управлять программным обеспечением на вашем компьютере с помощью определенных команд. Чтобы запустить его, установите uv: https://docs.astral.sh/uv/ Затем установите claude desktop: https://claude.ai/download Затем откройте командную строку из этой папки и запустите: uv запустите mcp install main.py Это займет несколько секунд и покажет сообщение о том, что он успешно добавил mcp в Claude Desktop. Затем перезапустите клод (rightlick task-icon и выберите «quit»), и помощник должен появиться в вашем приложении Claude Desktop. Сервер MCP содержит набор функций (инструментов), которые LLM может выполнять с различными параметрами. В этом сервере инструменты определяются событиями запроса и ожидания ответа модуля DQMH в LabVIEW. Подробнее о DQMH здесь: https://labviewwiki.org/wiki/Delacor_Queued_Message_Handler Каждое Событие Запроса и Ожидания Ответа по существу является SubVI с некоторыми входами и выходами.

Обзор (машинный перевод)

Репо содержит сервер LabVIEW Assistant MCP (Model Context Protocol).

Он позволяет модели большого языка, такой как ChatGPT или Claude Desktop, управлять программным обеспечением на вашем компьютере с помощью определенных команд.

Начало работы:

Чтобы запустить его, установите uv: [[Т0]] Затем установите Claude desktop: [[Т1]] Затем откройте командную строку из этой папки и запустите: uv run mcp install main.py

Это займет несколько секунд и покажет сообщение о том, что он успешно добавил mcp в Claude Desktop.

Затем перезапустите клод (rightlick task-icon и выберите «quit»), и помощник должен появиться в вашем приложении Claude Desktop.

Инструменты

Сервер MCP содержит набор функций (инструментов), которые LLM может выполнять с различными параметрами. В этом сервере инструменты определяются событиями запроса и ожидания ответа модуля DQMH в LabVIEW.

Подробнее о DQMH здесь: [[Т2]]

Каждое Событие Запроса и Ожидания Ответа по существу является SubVI с некоторыми входами и выходами. Но он перенаправляет Запрос на постоянно работающий VI в фоновом режиме (серверный модуль), который затем выполняет нужную задачу, и отвечает некоторыми значениями.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Server for LabVIEW

This Repo contains a LabVIEW Assistant MCP (Model Context Protocol) Server.

It enables an Large Language Model like ChatGPT or Claude Desktop to control software on your computer through defined commands.

Getting Started:

To run it, fist install uv: https://docs.astral.sh/uv/ Then install claude desktop: https://claude.ai/download Then open command prompt from this folder and run: uv run mcp install main.py

It should take a few seconds and show a message that it successfully added mcp to Claude Desktop.

Then restart claude (rightlick task-icon and select “quit”), and the assistant should show up in your Claude Desktop app.

Tools

The MCP Server contains a set of functions (tools) that the LLM can execute with different parameters. In this Server, the tools are defined by Request-and-wait-for-reply-Events of a DQMH-Module in LabVIEW.

More about DQMH here: https://labviewwiki.org/wiki/Delacor_Queued_Message_Handler

Each Request-and-wait-for-reply-Event is essentially a SubVI with some in- and outputs. But it forwards the Request to a continuously running VI in the background (the server module), which then does the desired task, and replies with some values. When the values arrive back, the model reads them and continues. Each of these SubVIs has a description which will be included in the MCP server code, so the AI can read it. The description includes all information the AI receives about the funciton and should well explain what it does.

There is a VI in the LabVIEW Project called “Generate Python Code.vi”. It can be used to automatically generate the python code for the main.py file. So if anything on the Request VIs in-/outputs or description has changed, or one was created or removed, you can update the server that way. Make sure to run "uv run mcp isntall main.py"and restart Claude Desktop, after you made changes to the Server code.

Currently Available Tools:

start_module

  • Inputs:
  • Outputs: error out,Wait for Event Sync?,Scripting Server Broadcast Events,Module Was Already Running?,Module Name
  • Description: Call this function first if you want to interact with LabVIEW. It will start the labview server that you can use to do actions in LabVIEW. You can use “Stop Module” to stop the server again. Make sure to call thsi function before any other LabVIEW specific functions.

new_vi

  • Inputs:
  • Outputs: error out,result,vi_id
  • Description: Creates a new VI in the LabVIEW IDE. The VI Reference is stored and returned. This Reference can later be used to e.g. add modifications to the VI.

add_object

  • Inputs: object_name, vi_reference
  • Outputs: error out,result,object_id
  • Description: Adds an object to the block diagram or frontpanel of the referenced vi. Get a VI reference from “New VI”. Allowed object names are: .NET Container .NET Refnum 2D Picture 3D Picture Absolute Value Accept TLS Access Rights ActiveX Container Add Add (with error terminals) Add Array Elements Add Entropy
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →