
kayyagaribmcd/pscad_mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
A professional, robust Model Context Protocol (MCP) server for . This server enables AI assistants (like Claude and Gemini) to automate PSCAD simulations, manage projects, and analyze results...
概要
A professional, robust Model Context Protocol (MCP) server for . This server enables AI assistants (like Claude and Gemini) to automate PSCAD simulations, manage projects, and analyze results directly on a local Windows machine. - : Optimized for local Windows automation using mhi.pscad.application(). - : Uses AST (Abstract Syntax Tree) analysis to extract decorators (like @rmi and @requires) and type hints directly from the mhi-pscad library, providing the AI with deep API awareness. - : A 30-second timeout layer prevents AI tools from hanging if PSCAD is frozen or showing a modal dialog. - : OS-level detection of PSCAD.exe crashes or closures. - : Ensures sequential execution, critical for PSCAD's single-threaded COM/RMI interface. - : Required for local PSCAD automation (RMI). - : Ensure PSCAD and its Python libraries are available on your system. - : Recommended for best compatibility.
README
以下は原文 README の抜粋です。原文を見る。
PSCAD Enterprise MCP Server
A professional, robust Model Context Protocol (MCP) server for Power System Computer Aided Design (PSCAD). This server enables AI assistants (like Claude and Gemini) to automate PSCAD simulations, manage projects, and analyze results directly on a local Windows machine.
🚀 Key Features
- Local-First Approach: Optimized for local Windows automation using
mhi.pscad.application(). - Source-Enriched Documentation: Uses AST (Abstract Syntax Tree) analysis to extract decorators (like
@rmiand@requires) and type hints directly from themhi-pscadlibrary, providing the AI with deep API awareness. - Execution Watchdog: A 30-second timeout layer prevents AI tools from hanging if PSCAD is frozen or showing a modal dialog.
- Process Monitoring: OS-level detection of
PSCAD.execrashes or closures. - Thread-Safe Command Queue: Ensures sequential execution, critical for PSCAD’s single-threaded COM/RMI interface.
🛠 Installation
1. Prerequisites
- Windows OS: Required for local PSCAD automation (RMI).
- PSCAD Installed: Ensure PSCAD and its Python libraries are available on your system.
- Python 3.10+: Recommended for best compatibility.
2. Automated Setup
The easiest way to get started is by running the automated installer:
# Clone the repository
git clone https://github.com/LL0pez20/pscad-mcp.git
cd pscad-mcp
# Run the installer
python mcp_installer.py
The installer will:
- Install the
pscad-mcppackage and all dependencies. - Synchronize your local PSCAD API documentation (Markdown + Raw).
- Generate the exact configuration commands for your AI tools.
🤖 AI Tool Integration
Once the server is installed, you can add it to your favorite AI assistant using the following commands:
Gemini CLI
Connect the PSCAD MCP server to your Gemini CLI:
gemini mcp add pscad-mcp python pscad_mcp/main.py
Claude Code
If you are using Anthropic’s Claude Code (the agentic CLI), add it with:
claude mcp add pscad-mcp python pscad_mcp/main.py
Claude Desktop
For the Claude Desktop app, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"pscad": {
"command": "python",
"args": ["/path/to/pscad-mcp/pscad_mcp/main.py"]
}
}
}
Note: The mcp_installer.py will print the absolute path for you.
🏗 Implementation Details
Architecture (SOLID Principles)
The server is built using a modular package structure to ensure maintainability and testability:
core/connection_manager.py: A Singleton that manages the lifecycle of the PSCAD instance and monitors OS-level process health.core/executor.py: Implements the Command/Proxy Pattern. All calls to PSCAD are proxied through a single-worker thread pool with anasynciowatchdog.
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"pscad": {
"command": "python",
"args": ["/path/to/pscad-mcp/pscad_mcp/main.py"]
}
}
}