Home / MCP / STK-MCP Server

STK-MCP Server

Exposes STK control as an MCP server for automating STK via MCP clients and LLMs.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "stk_http": {
            "url": "http://127.0.0.1:8765"
        }
    }
}

You can run a dedicated MCP server that exposes STK controls to LLMs and other MCP clients. This server starts and manages an STK instance, exposes a set of MCP tools, and accepts connections over HTTP for easy integration with your automation and AI workflows.

How to use

Install and run the MCP server, then connect your MCP client to the local endpoint to issue STK commands. The server automatically starts STK (Engine or Desktop) and exposes tools you can call from your automations.

Connecting and using tools

Start the server in your preferred mode and then connect with an MCP client from your development environment. The server listens by default at http://127.0.0.1:8765. Use the client to access the available tools under the STK Control server and execute operations such as setting up scenarios, adding locations, and creating satellites.

Stopping the server

To stop, press Ctrl+C in the terminal where the server is running. The lifecycle manager will close the STK instance gracefully.

Tools you can call

The server provides core MCP tools to control STK workflows, including creating and configuring a scenario, adding facilities/locations, and defining satellites. These tools are exposed through the MCP interface for easy automation and integration with your AI agents.

Connecting with an MCP client

Open your MCP client and point it to the server URL http://127.0.0.1:8765. Locate the STK Control server, then navigate to the Tools section to execute operations such as setup_scenario, create_location, and create_satellite.

Observing status and health

You can monitor the server and STK status via the configured logging output. The server maintains a structured log with timestamps and context to help you diagnose issues during automation.

How to install

Prerequisites and setup follow a clear flow. You will prepare Python, install the MCP runtime, and set up the STK integration so you can start the MCP server and interact with STK programmatically.

Step 1 — Prerequisites

  • Operating System: Windows or Linux (STK Desktop is Windows-only)
  • Python: 3.12 or higher
  • Ansys/AGI STK: Version 12.x Desktop or Engine
  • STK Python API wheel: agi.stk12-* corresponding to your STK installation

Step 2 — Prepare the project directory

Clone the project repository and navigate into the directory to begin setup.

Step 3 — Create and activate a virtual environment

uv venv

# Activate it
# On Windows (PowerShell/CMD):
.venv\Scripts\activate
# On Linux (bash/zsh):
source .venv/bin/activate

Step 4 — Add dependencies with uv

Add the STK Python wheel from your STK installation and any Windows COM bridge if you are on Windows.

Step 5 — Sync the environment

uv sync

Step 6 — Run the MCP server

Choose the mode you need and start the server. Engine mode is recommended for automation. Desktop mode shows the GUI and requires STK Desktop to be closed before starting.

Step 7 — Verify the server is running

Open your MCP client and connect to http://127.0.0.1:8765 to verify the STK Control server is available and the tools are listed.

Example start commands

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

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

Available tools

setup_scenario

Create or configure an STK Scenario, set time period, and rewind animation to prepare simulations.

create_location

Create or update a Facility or Place with latitude, longitude, and altitude (km) in the active scenario.

create_satellite

Create or configure a satellite from apogee/perigee parameters, RAAN, and inclination using a TwoBody propagator.