stk mcp
An MCP server that enables Large Language Models or other MCP clients to interact with Ansys/AGI STK (Systems Tool Kit), allowing users to control STK Desktop simulations programmatically or via natural language.
An MCP server that enables Large Language Models or other MCP clients to interact with Ansys/AGI STK (Systems Tool Kit), allowing users to control STK Desktop simulations programmatically or via natural language.
STK-MCP is an MCP (Model Context Protocol) server designed to enable Large Language Models (LLMs) or other MCP clients to interact with Ansys/AGI STK (Systems Tool Kit) - the leading Digital Mission Engineering software.
This project allows controlling STK Desktop via MCP tools, leveraging the STK Python API. It utilizes FastMCP from the official MCP Python SDK. The server logic resides within the src/stk_mcp package.
The primary goal of this project is to bridge the gap between programmatic or natural language interaction (via LLMs) and the powerful simulation capabilities of STK. By exposing STK functionalities through an MCP server, users can command STK simulations using MCP clients or potentially LLM-driven applications.
The MCP server, defined in src/stk_mcp/server.py, manages STK interaction and exposes functionality, showcasing how to:
* Connect to a running STK Desktop instance or launch a new one via the server's lifecycle management (src/stk_mcp/stk_logic/core.py).
* Expose STK operations as MCP tools (defined in src/stk_mcp/tools/).
* Create and configure STK scenarios using the setup_scenario tool.
* Programmatically add and configure Satellite objects using the create_satellite tool.
* Define satellite orbits using common orbital parameters.
* Utilize the TwoBody propagator for orbit simulation within the tools.
FastMCP within src/stk_mcp/server.py.server.py), STK interaction logic (stk_logic/), and MCP tools (tools/).setup_scenario): Creates new scenarios, sets analysis time periods, and closes any pre-existing scenario.create_satellite): Adds Satellite objects to the currently active scenario.win32com dependency).agi.stk12 Python wheel corresponding to your STK installation must be installed. This typically involves:agi.stk12-py3-none-any.whl) within your STK installation directory (often under CodeSamplesAutomationPython).uv pip install path/to/agi.stk12-py3-none-any.whlmcp library (installed via uv sync).git clone <repository-url>
cd stk-mcp# Install dependencies defined in pyproject.toml (includes mcp[cli])
uv syncThe MCP server logic is now structured within the src/stk_mcp directory. You interact with it using an MCP client or development tools.
python scripts/run_dev.pymcp command from the project root):
mcp dev src/stk_mcp/server.pyhttp://127.0.0.1:8765).setup_scenario and create_satellite as before.Ctrl+C in the terminal where the server is running. The lifespan manager will attempt to close STK.setup_scenario: (Defined in src/stk_mcp/tools/scenario.py)scenario_name (str, default: "MCP_STK_Scenario"), start_time (str, default: "20 Jan 2020 17:00:00.000"), duration_hours (float, default: 48.0).create_satellite: (Defined in src/stk_mcp/tools/satellite.py)name (str), apogee_alt_km (float), perigee_alt_km (float), raan_deg (float), inclination_deg (float).Planned enhancements include:
get_scenario_details, list_objects) to query STK state.agi.stk12: For interacting with STK Desktop (Requires manual installation from STK).mcp[cli]>=1.6.0: Model Context Protocol library.pywin32: Automatically installed on Windows; used for COM interactions via win32com.client.setup_scenario tool.Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines.