STK (Ansys/AGI Systems Tool Kit) MCP server

Enables natural language control of Ansys/AGI STK for space mission planning, satellite configuration, and orbit analysis through a Python-based bridge to the simulation software.
Back to servers
Setup instructions
Provider
alti3
Release date
Apr 04, 2025
Language
Python
Stats
18 stars

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.

Prerequisites

  • Operating System: Windows or Linux (STK Desktop mode requires Windows)
  • Python: Version 3.12 or higher
  • Ansys/AGI STK: Version 12.x Desktop or Engine installed
  • STK Python API: The agi.stk12 Python wheel from your STK installation (typically found in CodeSamples\Automation\Python)

Installation

Step 1: Clone the repository

git clone <repository-url>
cd stk-mcp

Step 2: Create and activate a virtual environment

# 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

Step 3: Add the STK Python wheel

# 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'"

Step 4: Sync the environment

uv sync

Usage

Listing Available Tools

To see all available tools in the MCP server:

uv run -m stk_mcp.cli list-tools

Running the MCP Server

STK Engine mode (recommended for automation, works on Windows/Linux):

uv run -m stk_mcp.cli run --mode engine

STK Desktop mode (Windows only, shows GUI):

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.

Command Options

View all available options:

uv run -m stk_mcp.cli run --help

Interacting with the Server

Once the server is running, you can connect to it using any MCP client:

  1. Open the MCP Inspector URL shown in the console (typically http://127.0.0.1:8765)
  2. Find the "STK Control" server in the list
  3. Use the "Tools" section to execute commands like setup_scenario, create_location, and create_satellite

Stopping the Server

Press Ctrl+C in the terminal where the server is running. The server will automatically close the STK Engine or Desktop instance.

Available MCP Tools

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.

Available MCP Resources

The server provides several resource endpoints:

List Objects

  • resource://stk/objects - Lists all objects in the active scenario
  • resource://stk/objects/{type} - Lists objects filtered by type (e.g., satellite, facility)

System Status

  • resource://stk/health - Reports basic state information including mode and object counts

Analysis

  • resource://stk/analysis/access/{object1}/{object2} - Computes access intervals between two objects
  • resource://stk/reports/lla/{satellite} - Returns satellite LLA (Latitude, Longitude, Altitude) ephemeris data

Configuration

Configuration 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)

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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}"
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later