Skip to main content
Glama

EPICS MCP Server

by Jacky1-Jiang
Integrations
  • Enables integration with LangChain, allowing the EPICS MCP Server to be used as part of LangChain workflows for controlling and monitoring EPICS Process Variables.

  • Built as a Python-based server, allowing users to leverage Python's ecosystem for EPICS control system integration and automation.

EPICS-MCP-сервер

Обзор

  • EPICS MCP Server — это сервер на основе Python, разработанный для взаимодействия с переменными процесса (PV) EPICS (Experimental Physics and Industrial Control System). Он предоставляет набор инструментов для извлечения значений PV, установки значений PV и получения подробной информации о PV. Сервер создан с использованием фреймворка mcp и взаимодействует через stdio, что делает его пригодным для интеграции в более крупные системы управления или рабочие процессы.
  • Этот инструмент особенно полезен в средах, где фотоэлектрические модули EPICS используются для мониторинга и управления параметрами оборудования или программного обеспечения.

Функции

  • Сервер EPICS MCP предоставляет следующие инструменты:
  1. получить_pv_value
    • Создать или обновить отдельный файл в репозитории
    • Входные данные:
      • pv_name (строка): Имя переменной PV.
    • Возвращает: объект JSON, содержащий статус ( success или error ) и полученное значение или сообщение об ошибке.
  2. set_pv_value
    • Установите новое значение для указанного PV.
    • Входные данные:
      • pv_name (строка): Имя переменной PV.
      • pv_value (строка): новое значение, которое будет установлено для PV.
    • Возвращает: объект JSON, содержащий статус ( success или error ), а также сообщение с подтверждением или сообщение об ошибке.
  3. получить_pv_info
    • Получает подробную информацию об указанном PV.
    • Входные данные:
      • pv_name (строка): Имя переменной PV.
    • Возвращает: объект JSON, содержащий статус ( success или error ) и подробную информацию о PV или сообщение об ошибке.

Использование с Langchain

  • Чтобы использовать его с Langchain, необходимо установить зависимости, необходимые для проекта.
pip install -r requirements.txt
  • Langchain

server_params = StdioServerParameters( command="python", # Make sure to update to the full absolute path to your math_server.py file args=["/path/server.py"], )
  • ЭПИКИ

  • Перед использованием сервера EPCIS mcp необходимо успешно установить EPCIS на локальной машине, убедиться, что IOC может нормально запуститься, и проверить, что такие функции, как caget , caput и cainfo работают правильно. Подробные инструкции по установке см. на сайте https://epics-controls.org/resources-and-support/base/ .
jiangyan@DESKTOP-84CO9VB:~$ softIoc -d ~/EPICS/DB/test.db Starting iocInit ############################################################################ ## EPICS R7.0.8 ## Rev. 2025-02-13T14:29+0800 ## Rev. Date build date/time: ############################################################################ iocRun: All initialization complete epics>
jiangyan@DESKTOP-84CO9VB:~$ caget temperature:water temperature:water 88 jiangyan@DESKTOP-84CO9VB:~$ caput temperature:water 100 Old : temperature:water 88 New : temperature:water 100 jiangyan@DESKTOP-84CO9VB:~$ cainfo temperature:water temperature:water State: connected Host: 127.0.0.1:5056 Access: read, write Native data type: DBF_DOUBLE Request type: DBR_DOUBLE Element count: 1

Результат теста

  • Клиент MCР:
async def run(): async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: # Initialize the connection await session.initialize() # Get tools tools = await load_mcp_tools(session) # Create and run the agent agent = create_react_agent(model, tools) agent_response = await agent.ainvoke({"messages": "To query the value of a PV (Process Variable) named temperature:water"}) return agent_response )
  • Результат:
================================ Human Message ================================= To query the value of a PV (Process Variable) named temperature:water ================================== Ai Message ================================== Tool Calls: get_pv_value (call_vvbXwi51CyYUxEM0hcyvCFCY) Call ID: call_vvbXwi51CyYUxEM0hcyvCFCY Args: pv_name: temperature:water ================================= Tool Message ================================= Name: get_pv_value { "status": "success", "value": 88.0 } ================================== Ai Message ================================== The current value of the PV named `temperature:water` is 88.0.
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Сервер на базе Python, который взаимодействует с переменными процесса EPICS, позволяя пользователям извлекать значения PV, устанавливать значения PV и получать подробную информацию о PV через стандартизированный интерфейс.

  1. Обзор
    1. Функции
      1. Использование с Langchain
        1. Результат теста

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.
            Last updated -
            2
            39
            Python
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            This is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.
            Last updated -
            Python
          • -
            security
            A
            license
            -
            quality
            A Python server implementation that enables integration with the PeakMojo API, providing access to various resources like users, personas, scenarios, and tools for managing PeakMojo functionality.
            Last updated -
            Python
            MIT License
            • Linux
          • A
            security
            A
            license
            A
            quality
            A server that provides a persistent Python REPL environment through the MCP protocol, allowing execution of Python code, variable management, and package installation.
            Last updated -
            3
            3
            Python
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jacky1-Jiang/EPICS-MCP-Server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server