Logo de ABAQUS MCP Server for GUI Scripting

ABAQUS MCP Server for GUI Scripting

Comunidade
jianzhichun

An MCP (Model Context Protocol) server designed to interact with an already running Abaqus/CAE Graphical User Interface (GUI). It allows for the execution of Python scripts within the Abaqus environment and retrieval of messages from the Abaqus message log/area, all through MCP tools.

Publicado porjianzhichun
Repositórioabaqus-mcp-server
IdiomaPython
Forks
14
Estrelas
105
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    ABAQUS MCP Server for GUI Scripting disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    105 estrelas e 14 forks no repositório vinculado.

English | 中文

ABAQUS MCP Server for GUI Scripting

An MCP (Model Context Protocol) server designed to interact with an already running Abaqus/CAE Graphical User Interface (GUI). It allows for the execution of Python scripts within the Abaqus environment and retrieval of messages from the Abaqus message log/area, all through MCP tools.

This server uses GUI automation techniques (pywinauto) to control the Abaqus/CAE application.

Features

  • Script Execution in GUI: Executes Python scripts by automating the "File -> Run Script..." menu in an active Abaqus/CAE session.
  • Message Log Retrieval: Attempts to scrape text content from the Abaqus/CAE message/log display area.
  • MCP Interface: Exposes functionalities as standard MCP tools and prompts for easy integration with LLM agents and other MCP-compatible clients.
  • Operates on Existing GUI: Does not start or stop Abaqus/CAE; it requires an Abaqus/CAE session to be already open and running.

System Requirements

  • Operating System: Windows (due to pywinauto and Abaqus GUI interaction).
  • Python: Python 3.7+.
  • Abaqus/CAE: A compatible version of Abaqus/CAE must be installed and already running with its GUI open when using this server.

Python Dependencies

Install the required Python packages using pip:

bash
pip install -r requirements.txt

(See requirements.txt for the list of dependencies, primarily mcp[cli], pywinauto, pygetwindow, psutil, pywin32.)

Configuration

  1. Ensure Abaqus/CAE is Running: Before starting this MCP server, make sure the Abaqus/CAE application is open on your desktop, with the GUI loaded and responsive.
  2. Accessibility: Ensure no other modal dialogs are blocking the Abaqus/CAE interface when the server attempts to interact with it.

Usage

Starting the MCP Server

Navigate to the server's directory and run:

bash
python mcp_server.py

The server will start and be ready to accept MCP requests.

MCP Tools Provided

  1. execute_script_in_abaqus_gui

    • Description: Executes a given Python code string within the active Abaqus/CAE GUI session. It automates the 'File -> Run Script...' menu process.
    • Argument:
      • python_code (str): The Python script content (Abaqus Scripting Interface commands) to be executed.
    • Returns: str - A message indicating the outcome of the script submission attempt (e.g., "Script submitted for execution...").
    • Important: This tool does not return the direct output or error messages from the script's execution within Abaqus. To see the script's actual outcome, you must use the get_abaqus_gui_message_log tool after allowing time for the script to run.
  2. get_abaqus_gui_message_log

    • Description: Attempts to retrieve the text content from the Abaqus/CAE message/log area (usually found at the bottom of the main GUI window).
    • Arguments: None.
    • Returns: str - The extracted text from the message area, or an error/status message if retrieval fails.
    • Note: The reliability of this tool depends on accurately identifying the message area UI element. The current implementation uses heuristics. For robust operation in a specific Abaqus environment, you might need to update the server code with specific UI element identifiers (e.g., AutomationId, Name, ClassName) obtained using an inspect tool (see Development/Troubleshooting).

MCP Prompts Provided

  1. abaqus_scripting_strategy
    • Description: This prompt provides comprehensive guidance on how to best use the server's tools (execute_script_in_abaqus_gui and get_abaqus_gui_message_log) together effectively. It explains the workflow for script execution and result verification, tool assumptions, and troubleshooting tips. It is highly recommended that LLM agents consult this prompt before attempting to use the tools.

Important Considerations & Limitations

  • Requires Running Abaqus GUI: This server only interacts with an Abaqus/CAE session that is already open and has its GUI active and responsive. It cannot start or manage the Abaqus application itself.
  • GUI Automation Sensitivity: GUI automation can be sensitive to the Abaqus version, screen resolution, window themes, and minor UI layout changes. While pywinauto provides a good level of abstraction, issues can still arise.
  • Focus and Window State: The Abaqus window should ideally be the active, non-minimized window for the most reliable interaction, although the server attempts to manage focus.
  • Modal Dialogs: Unexpected modal dialogs in Abaqus (e.g., save reminders, warnings) can block the automation tools.
  • Error Reporting: Differentiate between errors from the MCP tools (e.g., "Abaqus window not found") and errors reported within the Abaqus message log (which originate from your script running inside Abaqus).

Development / Troubleshooting

  • Inspecting UI Elements: If the get_abaqus_gui_message_log tool fails to retrieve messages accurately, or if execute_script_in_abaqus_gui has trouble with the "Run Script" dialog, you may need to use a UI inspection tool (e.g., pywinauto.inspect module's InspectDialog or py_inspect.py script, FlaUInspect for UIA backend) to identify the correct properties (AutomationId, Name, ClassName, ControlType) of the target UI elements in your Abaqus version. These properties can then be used to refine the search logic in mcp_server.py.
  • Timeouts: The server includes some time.sleep() calls and uses pywinauto's Timings.slow() to better handle Abaqus's potentially slow UI response times. These might need adjustment in some environments.

Project Structure

abaqus-mcp-gui-server/
├── mcp_server.py         # The main MCP server script
├── requirements.txt      # Python dependencies
└── README.md             # This documentation file

License

This project is intended for learning, research, and specific automation tasks. When using Abaqus software, always adhere to the licensing terms provided by Dassault Systèmes.

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

{
  "mcpServers": {
    "abaqus-mcp-gui": {
      "command": "uvx",
      "args": [
        "abaqus-mcp-gui"
      ],
      "env": {
        "PLATFORM": "windows",
        "ABAQUS_GUI_REQUIRED": "true"
      }
    }
  }
}

Use o MCP de ABAQUS MCP Server for GUI Scripting com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar ABAQUS MCP Server for GUI Scripting, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione ABAQUS MCP Server for GUI Scripting como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de ABAQUS MCP Server for GUI Scripting.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "abaqus-mcp-server-for-gui-scripting": {
      "command": "npx",
      "args": [
        "-y",
        "abaqus-mcp-gui"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de ABAQUS MCP Server for GUI Scripting, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de ABAQUS MCP Server for GUI Scripting.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar ABAQUS MCP Server for GUI Scripting para me ajudar nesta tarefa?
ABAQUS MCP Server for GUI Scripting
Claro. Já li.
Veja o que encontrei usando ABAQUS MCP Server for GUI Scripting.

Perguntas frequentes

Para que serve o servidor MCP ABAQUS MCP Server for GUI Scripting?

ABAQUS MCP Server for GUI Scripting é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP ABAQUS MCP Server for GUI Scripting com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar ABAQUS MCP Server for GUI Scripting com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP ABAQUS MCP Server for GUI Scripting com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com ABAQUS MCP Server for GUI Scripting conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP ABAQUS MCP Server for GUI Scripting ao TypingMind?

ABAQUS MCP Server for GUI Scripting funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP ABAQUS MCP Server for GUI Scripting oferece no TypingMind?

ABAQUS MCP Server for GUI Scripting disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP ABAQUS MCP Server for GUI Scripting?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se ABAQUS MCP Server for GUI Scripting exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇