
SimConnect MCP
io.github.robin24由 GitHub 帳號 robin24 發布v1.0.2更新於 Oct 24, 2026
MCP server for MSFS SimConnect - full read/write access to SimVars, L-vars and events
概覽
透過 SimConnect 將 AI 助理連接到 Microsoft Flight Simulator,用來讀取與寫入 SimVar、L-var、事件和飛機狀態,以支援外掛開發。
- 可以做什麼
- 提供 32 個以 msfs_ 開頭的工具,可讀寫 SimVar 與飛機 L-var、觸發 SimConnect 事件與自訂事件、執行 RPN 計算器程式碼,並搜尋內建變數目錄。另外還支援飛機狀態快照、機場與導航台查詢、PMDG 777 與 737 NG3 SDK 存取(含 CDU 螢幕讀取)、飛行與情境檔案操作,以及 HubHop 預設集搜尋。內建 SimConnect 文件以 MCP 資源形式提供。
- 適用情境
- 適合在開發或偵錯 MSFS 飛機外掛時使用,讓助理檢查並修改模擬器變數、建立測試情境,或查找變數與事件名稱。僅限桌面端,且需要 MSFS 在同一台機器上執行。
- 執行需求
- 需要同一台機器上執行 Microsoft Flight Simulator 2020 或 2024,並安裝 uv,讓 uvx 可透過 stdio 取得並執行 PyPI 套件 simconnect-mcp。L-var 支援需要選用的 MobiFlight WASM 模組,安裝在 MSFS Community 資料夾中。PMDG 工具需要在飛機 options.ini 中設定 EnableDataBroadcast 與 EnableCDUBroadcast。HubHop 工具需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 SimConnect MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
SimConnect MCP Server
An MCP (Model Context Protocol) server that connects AI coding agents to Microsoft Flight Simulator via SimConnect. This server is built for add-on development — full read/write access to SimVars, L-vars, events, calculator code execution, and embedded documentation.
What It Does
- Read/write any SimVar — altitude, heading, speed, autopilot settings, engine parameters, and 1,080+ more from a comprehensive built-in catalog, with unit selection and honest failures on a rejected write
- Read/write L-vars — aircraft-specific local variables used by add-on developers (Fenix A320, FlyByWire A32NX, PMDG, etc.), including live enumeration of what the loaded aircraft has actually registered
- PMDG 777 and 737 NG3 native SDK support — direct access to all aircraft data fields and control events via the PMDG SDK Client Data Areas, plus CDU screen reading with colors/formatting
- Trigger events — toggle switches, set autopilot modes, control lights, fire custom MobiFlight events
- Execute RPN calculator code — run arbitrary Reverse Polish Notation code directly in the sim
- Search and discover variables — searchable catalogs of SimVars, events, and aircraft-specific L-vars with human-readable names and valid values
- Facilities lookup — nearby airports sorted by distance and detail lookup for a specific airport, waypoint, NDB or VOR by ICAO identifier, read directly from SimConnect's facility subscription
- Flight and scenario tools — load and save
.FLTflights, load a.PLNflight plan, and spawn an AI aircraft or object, for scripting test scenarios instead of setting them up by hand - Embedded documentation — SimConnect reference docs served as MCP resources, available offline
- Aircraft-specific catalogs — pre-built variable databases with panel groupings, display names, and value descriptions. Ships with 1,607 PMDG 777 variables (777-200LR/200F/300ER/F) and 1,861 PMDG 737 NG3 variables (-600/700/800/900 incl. BBJ/BDSF/BCF).
- HubHop integration — search the MobiFlight HubHop community preset database directly as an MCP tool, or use the built-in client to generate and extend L-var catalogs for any supported aircraft
Prerequisites
- Microsoft Flight Simulator (MSFS 2020 or 2024) running on the same machine
- uv — provides
uvx, which fetches the server and its Python runtime for you - MobiFlight WASM Module (optional, for L-var support) — install in your MSFS Community folder. Download from MobiFlight
Installation
Published on PyPI as simconnect-mcp,
and listed in the MCP Registry as
io.github.robin24/simconnect-mcp.
Once uv is installed, no separate install step is
needed — uvx fetches and runs the server on demand:
That starts the server on stdio, which is what an MCP client does for you. Run it by hand only to check that it starts; press Ctrl+C to stop.
To pin a version, use uvx [email protected].
From source (for development)
Configuring as an MCP Server
Claude Code
Via CLI:
Or to make it available across all projects:
Via JSON (~/.claude/settings.json or project-level .claude/settings.json):
OpenAI Codex CLI
Via CLI:
Via JSON:
Gemini CLI
Via CLI:
Via JSON (~/.gemini/settings.json):
MCP Inspector (Interactive Testing)
Note: To run a local checkout instead of the published package, replace
uvx simconnect-mcpwithuv run --directory /path/to/simconnect-mcp simconnect-mcp, using the absolute path to your clone.
Tools (32)
Every tool is prefixed msfs_, carries explicit readOnlyHint/destructiveHint annotations, and returns a typed result or a structured error — never a fabricated success. The tables below are generated from the live server (name, kind, and title come straight from each tool's ToolAnnotations); descriptions are the one-line summary from the tool's own docstring:
Connection (3)
SimVar Operations (6)
Units: msfs_get_simvar (and msfs_set_simvar) accept an optional unit argument and always report the unit actually used in the result. Omit unit and the bundled SimVar catalog supplies a sensible default for that variable; for a variable the catalog doesn't know, the default is "number".
Event Operations (3)
L-Var Operations (6)
msfs_list_lvars asks the MobiFlight WASM module to enumerate what the aircraft has actually registered, live — but the module caps its reply at 1000 names and still reports the list as complete when it truncates. A busy add-on setup (GSX and similar) can crowd the aircraft's own variables out of the response entirely; watch for truncated: true. Treat the catalogs and the live listing as a starting point, not a guaranteed inventory — msfs_get_lvar reads any name you supply, whether or not it surfaced in either one.
Aircraft State (1)
Facilities (2)
Airports are world-wide (SimConnect returns the full 85,249-airport list, cached after the first collection). Waypoints, NDBs and VORs are scoped to wherever the aircraft currently is, so they are re-collected on every call rather than cached — a cached navaid list would keep answering for the aircraft's previous position after a reposition or a flight.
Utilities (2)
PMDG 777 / 737 NG3 (3)
These tools use the PMDG SDK Client Data Areas for direct binary access to the aircraft state — bypassing the MobiFlight L-var bridge. The right SDK (777 or 737 NG3) is auto-detected from the loaded aircraft, or can be forced with the variant argument. Requires EnableDataBroadcast=1 and EnableCDUBroadcast.N=1 in the aircraft's options.ini (777_Options.ini or 737NG3_Options.ini). The 777 has three CDUs (Capt/Center/F-O); the 737 NG3 has two (Capt/F-O). See PMDG 777 SDK Reference and PMDG 737 NG3 SDK Reference for details.
HubHop (2)
Unlike every other tool, these two reach HubHop's HTTP API rather than the simulator, so they work with MSFS closed. The first call downloads and caches the full preset database (~17 MB); later calls in the same server process are served from that in-memory cache, which both tools share and which re-fetches on its own every 6 hours. Either tool accepts refresh=true to force an immediate re-fetch.
Flight and Scenario (4)
These wrap the underlying SimConnect flight/scenario file operations for scripting test setups (e.g. "load this approach", "save the current state", "spawn traffic nearby") rather than driving them by hand in the sim's own UI. msfs_create_ai_object is confirmed live end-to-end — spawned, verified to answer a targeted SimVar request, then removed again — by tests/live/test_live_flight.py. msfs_save_flight was also confirmed live, including the multi-second post-save SimConnect stall documented in CLAUDE.md's Known Sim Behaviours; its own live tests were retired in the 2026-08-29 live-suite trim once that finding was captured there, since what remained (the overwrite-guard logic) is pure Python already covered by tests/test_flight.py's mocks. msfs_load_flight and msfs_load_flight_plan are mock-only by design — see tests/live/test_live_flight.py's module docstring for why. See Running the live tests below.
Variable Catalogs
The server ships with comprehensive variable catalogs for search and discovery, so that AI agents can find the right variable names without guessing.
SimVar Catalog (1,080+ variables)
The built-in SimVar catalog covers all documented MSFS simulation variables across 25 categories:
The catalog is sourced from both the SimConnect Python package and the official MSFS SDK documentation, ensuring complete coverage including camera controls, ground services, circuit breakers, GPS/NAV/COM radios, and flight model variables.
Aircraft L-Var Catalogs
L-var catalogs provide searchable, human-readable databases for specific aircraft add-ons. The server picks one in three steps, and tells you in the result message which step answered — the three carry very different confidence:
- Probe the PMDG SDK client data area. Authoritative, and independent of what the aircraft calls itself. This is the step that matters, because PMDG airframes do not identify themselves as PMDG: a real PMDG 737-800 reports
TITLEas737-800 PAX SSW TC, with no vendor name anywhere in it. Matching titles alone never worked for them. - Match
title_patternagainstTITLE/ATC_MODEL. The fallback, and the only mechanism available to a catalog you supply yourself. - Search every catalog and say so. Results then carry a
Catalogcolumn so you can see which aircraft each row belongs to, rather than reading another aircraft's variables as if they were yours.
Pass catalog=<key> to scope a search explicitly, or call msfs_browse_lvar_catalog with no arguments to list the available keys.
The obvious shortcut — broadening
title_patternto737— is deliberately not taken. It would match the iFly 737 MAX and Asobo's own 737 just as happily, and hand their users a PMDG catalog for an aircraft that isn't a PMDG. An honest "no catalog detected" beats a confidently wrong one.
Included catalogs:
Each variable includes a display name, category, writability flag, and (where applicable) a map of valid values.
No Fenix catalog ships — a prior fenix_a320.json (1,433 plain L-vars) was removed in favor of HubHop's own broader, community-maintained FenixSim coverage (2,273 presets, current the moment Fenix ships an update, where a bundled snapshot would only go stale). Search it live with msfs_search_hubhop(vendor="FenixSim"), or regenerate a local catalog file with the HubHop client below and drop it into src/simconnect_mcp/data/ — every *.json there is auto-discovered on startup, so it works immediately with no code change.
Adding New Aircraft Catalogs
The fastest way to add a new aircraft is via the built-in HubHop client:
Or update an existing one:
You can also use the Python API:
Or create catalogs manually by placing a JSON file in src/simconnect_mcp/data/. All *.json files are auto-discovered on startup. See docs/extending-catalogs.md for the full guide, JSON schema, and best practices.
Resources
Prompts
Project Structure
The PMDG catalogs are regenerated from the SDK headers via scripts/parse_pmdg_sdk.py — it auto-detects the struct name and CDU count, so the same script handles both 777 and 737 NG3.
Development
Tests mock SimConnect so the suite above runs without MSFS. tests/conftest.py provides a mock SimConnect with realistic SimVar values.
Running the Live Tests
A second suite under tests/live/ exercises the real SimConnect DLL and is marked @pytest.mark.live. pyproject.toml deselects it by default (addopts = "-m 'not live'"), so it never runs on a machine without MSFS — including CI.
This suite is deliberately small and stays that way on purpose: a test belongs here only if a self-consistent mock could agree with itself regardless of whether the code is right — for example, a round trip that writes and reads back a single L-var name proves nothing about encoding, because a mangled datum name would make the write and the read-back agree with each other on the wrong variable (see test_two_distinct_lvars_do_not_collide in tests/live/test_live_lvars.py). What's left after that filter is real DLL/DLL-adjacent behaviour a mock can only assume rather than verify: unit conversion against the physical constant, wire-decode of structs whose third-party bindings this project has already caught wrong once, which real SimVars/events actually accept a write versus reject or silently ignore it, undocumented MobiFlight/WASM protocol quirks, and whether a real PMDG's binary client-data area answers a probe the way its struct decode expects.
Where a live finding can instead be frozen into a committed fixture and replayed offline, that's preferred over a live test: tests/fixtures/facilities/ holds real SimConnect wire bytes captured once, replayed by the mocked tests/test_facilities_parsing.py on every run, with no simulator and no flakiness — it pins the same discovery deterministically instead of depending on whatever aircraft happens to be loaded that day.
Requires MSFS running with an aircraft loaded; a test whose connection attempt fails is skipped rather than failed (see tests/live/conftest.py's live_manager fixture). tests/live/test_live_pmdg.py's tests need a real PMDG 737/777 loaded and skip — rather than fail — when the loaded aircraft doesn't look like one (see that file's gate in tests/live/conftest.py).
License
Copyright (C) 2025-2026 Robin Kipp
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.txt for the full text.
This project is AGPL-3.0 because it depends on Python-SimConnect, which is itself AGPL-3.0 licensed.
The vendored MobiFlight bridge in src/simconnect_mcp/vendor/ is a separate
work, MIT licensed by Koseng — see
src/simconnect_mcp/vendor/MOBIFLIGHT_LICENSE.
來源:README.md,提交 87ab9e1
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分