mcp-dd-simulation
MCP Server for DD Unity 6-DOF ballistic simulation.
通过 MCP 协议调用 DD_Unity.exe 弹道仿真引擎,支持 Claude Code、Claude Desktop 等任何兼容 MCP 的 AI 客户端。
服务提供三个工具:
get_sim_spec:返回参数规范、经验规则和示例请求。preview_sim:校验仿真设计并补全默认参数,不启动仿真。run_sim:读取指定 JSON 文件,校验参数并执行弹道仿真。
前置条件
- 将
DD_Unity.exe放在本地(需包含--run-once模式) - 设置环境变量
DD_UNITY_EXE_PATH指向 EXE 路径
安装
uv sync
uv run mcp-dd-simulation
默认使用 stdio。如需独立 HTTP 服务:
uv run mcp-dd-simulation --transport streamable-http
默认地址为 http://127.0.0.1:8000/mcp。可用环境变量:
MCP_HOST、MCP_PORT、MCP_TRANSPORT
Claude Code 配置
在 .claude.json 或项目的 .mcp.json 中添加:
{
"mcpServers": {
"dd-simulation": {
"command": "uvx",
"args": ["--from", "yudeshi1314520-mcp-dd-simulation", "mcp-dd-simulation"],
"env": {
"DD_UNITY_EXE_PATH": "D:\\弹道联合Unity仿真\\Unity\\DD_UnityQ\\DD_app\\DD_Unity.exe"
}
}
}
}
使用流程
建议先调用 get_sim_spec 获取参数规范;preview_sim 和 run_sim 只需传入 json_path,其值为仿真请求 JSON 文件路径。校验通过后再执行仿真。
仿真请求 JSON 示例
{
"schema_version": "1.0",
"design_conditions": {
"scenario": "intercept",
"description": "高空拦截"
},
"parameters": {
"Target": {
"target_position": [80000.0, 80000.0, -20000.0],
"target_vel": [-200.0, -200.0, 0.0]
},
"Initial": {
"Xme0": [0.0, 0.0, -7000.0],
"Vme0": [400.0, 0.0, 0.0]
}
}
}
只填必填参数即可,其余参数由默认值自动补全。
参数分组
| 分组 | 说明 |
|---|---|
| Missile | 质量、参考面积/长度、重心、惯性张量 |
| Initial | 初始位置、初始速度 |
| Target | 目标位置、目标速度(必填) |
| Guidance | 导航指令类型、导航增益、高度/速度指令 |
| Controller | P/I 控制器增益(15 个参数) |
| Simulation | 仿真时长、速度倍率、命中距离、CSV 导出 |
坐标系:NED(北-东-地),X=北,Y=东,Z=下(-Z=高度)。
Metadata
Release files for yudeshi1314520-mcp-dd-simulation 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yudeshi1314520_mcp_dd_simulation-0.2.3.tar.gz | 69.5 kB | Without provenance | Details for yudeshi1314520_mcp_dd_simulation-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yudeshi1314520_mcp_dd_simulation-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for yudeshi1314520_mcp_dd_simulation-0.2.3-py3-none-any.whl |
Total release size: 84.0 kB
Release files / yudeshi1314520_mcp_dd_simulation-0.2.3.tar.gz
| Download URL | yudeshi1314520_mcp_dd_simulation-0.2.3.tar.gz |
|---|---|
| Size | 69.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd0794dd341a4370e997f097f16e10dee28b4f955187570e844e9bd3091201ca
|
|
BLAKE2b-256 checksum How to use checksums |
d82f7cc7e2848f8dc9640e31df7949d931e68ad401de8e0c296608bb12a7b120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / yudeshi1314520_mcp_dd_simulation-0.2.3-py3-none-any.whl
| Download URL | yudeshi1314520_mcp_dd_simulation-0.2.3-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
122243feb1cc632ffb3025f03168f6f1971b451ff9f681a9319f6cb25dccfc34
|
|
BLAKE2b-256 checksum How to use checksums |
e5220157cc11cd38758f2b5eef210177ce63de464a8e17d62438e0be9562ddc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for yudeshi1314520-mcp-dd-simulation 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.