STK-MCP provides a bridge between Large Language Models (or other MCP clients) and Ansys/AGI STK (Systems Tool Kit), enabling programmatic control of this powerful Digital Mission Engineering software. It supports both STK Desktop (Windows) and STK Engine (Windows & Linux) through a Model Context Protocol server.
agi.stk12
Python wheel from your STK installation (typically found in CodeSamples\Automation\Python
)git clone <repository-url>
cd stk-mcp
# Create the virtual environment
uv venv
# Activate it on Windows (PowerShell/CMD)
# .venv\Scripts\activate
# Activate it on Linux (bash/zsh)
source .venv/bin/activate
# Add the STK Python wheel from your STK installation
uv add ./agi.stk12-12.10.0-py3-none-any.whl
# or: uv add path/to/your/STK/CodeSamples/Automation/Python/agi.stk12-*.whl
# Windows only: Add COM bridge for Desktop automation
uv add "pywin32; platform_system == 'Windows'"
uv sync
To see all available tools in the MCP server:
uv run -m stk_mcp.cli list-tools
uv run -m stk_mcp.cli run --mode engine
Make sure STK Desktop is closed first:
uv run -m stk_mcp.cli run --mode desktop
The server will start, initialize STK, and listen for MCP connections on http://127.0.0.1:8765
by default.
View all available options:
uv run -m stk_mcp.cli run --help
Once the server is running, you can connect to it using any MCP client:
http://127.0.0.1:8765
)setup_scenario
, create_location
, and create_satellite
Press Ctrl+C
in the terminal where the server is running. The server will automatically close the STK Engine or Desktop instance.
The server provides the following tools:
setup_scenario
Creates and configures an STK Scenario with specified time period.
create_location
Creates or updates a ground location (Facility
or Place
) at specified latitude/longitude/altitude.
create_satellite
Creates or configures a satellite using orbital parameters like apogee/perigee, RAAN, and inclination.
The server provides several resource endpoints:
resource://stk/objects
- Lists all objects in the active scenarioresource://stk/objects/{type}
- Lists objects filtered by type (e.g., satellite, facility)resource://stk/health
- Reports basic state information including mode and object countsresource://stk/analysis/access/{object1}/{object2}
- Computes access intervals between two objectsresource://stk/reports/lla/{satellite}
- Returns satellite LLA (Latitude, Longitude, Altitude) ephemeris dataConfiguration can be adjusted using environment variables:
STK_MCP_DEFAULT_HOST
(default: 127.0.0.1
)STK_MCP_DEFAULT_PORT
(default: 8765
)STK_MCP_LOG_LEVEL
(default: INFO
)STK_MCP_DEFAULT_SCENARIO_NAME
(default: MCP_STK_Scenario
)STK_MCP_DEFAULT_START_TIME
(default: 20 Jan 2020 17:00:00.000
)STK_MCP_DEFAULT_DURATION_HOURS
(default: 48.0
)To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "stk-control" '{"command":"python","args":["scripts/run_dev.py"],"workingDir":"${workspaceFolder}"}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"stk-control": {
"command": "python",
"args": [
"scripts/run_dev.py"
],
"workingDir": "${workspaceFolder}"
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"stk-control": {
"command": "python",
"args": [
"scripts/run_dev.py"
],
"workingDir": "${workspaceFolder}"
}
}
}
3. Restart Claude Desktop for the changes to take effect