unreal-engine-mcp-server 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.production CHANGED
@@ -19,7 +19,7 @@ LOG_LEVEL=info
19
19
 
20
20
  # Server Settings
21
21
  SERVER_NAME=unreal-engine-mcp
22
- SERVER_VERSION=0.4.4
22
+ SERVER_VERSION=0.4.5
23
23
 
24
24
  # Connection Settings
25
25
  MAX_RETRY_ATTEMPTS=3
@@ -0,0 +1,29 @@
1
+ name: Smithery Build
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Setup Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '18'
20
+ cache: 'npm'
21
+
22
+ - name: Install dependencies
23
+ run: npm ci
24
+
25
+ - name: Type-check
26
+ run: npm run type-check
27
+
28
+ - name: Smithery build
29
+ run: npm run smithery:ci
package/CHANGELOG.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.4.5] - 2025-10-03
6
+ ### Added
7
+ - Expose `UE_PROJECT_PATH` environment variable across runtime config, Smithery manifest, and client example configs. This allows tools that need an absolute .uproject path (e.g., engine_start) to work without additional manual configuration.
8
+ - Added `projectPath` to the runtime `configSchema` so Smithery's session UI can inject a project path into the server environment.
9
+
10
+ ### Changed
11
+ - Make `createServer` a synchronous factory (removed `async`) and updated `createServerDefault` and `startStdioServer` to use the synchronous factory. This aligns the exported default with Smithery’s expectations and prevents auto-start mismatches in the bundled output.
12
+ - Provide a default for `ueHost` in the exported `configSchema` so the Smithery configuration dialog pre-fills the host input.
13
+
14
+ ### Documentation
15
+ - Updated `README.md`, `claude_desktop_config_example.json`, and `mcp-config-example.json` to include `UE_PROJECT_PATH` and usage notes.
16
+ - Updated `smithery.yaml` and `server.json` manifest to declare `UE_PROJECT_PATH` and default values.
17
+
18
+ ### Build
19
+ - Rebuilt the Smithery bundle and TypeScript output to ensure schema and defaults are exported in the distributed artifact.
20
+
21
+ ### Fixes
22
+ - Fixes Smithery UI blank ueHost field by defining a default in the runtime schema.
23
+
24
+
25
+ ## [0.4.4] - 2025-09-30
26
+ - Previous release notes retained in upstream repo.
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-TypeScript-blue)](https://github.com/modelcontextprotocol/sdk)
6
6
  [![Unreal Engine](https://img.shields.io/badge/Unreal%20Engine-5.0--5.6-orange)](https://www.unrealengine.com/)
7
7
  [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-Published-green)](https://registry.modelcontextprotocol.io/)
8
+ [![smithery badge](https://smithery.ai/badge/@ChiR24/unreal_mcp_server)](https://smithery.ai/server/@ChiR24/unreal_mcp_server)
8
9
 
9
10
  A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Engine via Remote Control API. Built with TypeScript and designed for game development automation.
10
11
 
@@ -105,7 +106,8 @@ Then enable Python execution in: Edit > Project Settings > Plugins > Remote Cont
105
106
  "env": {
106
107
  "UE_HOST": "127.0.0.1",
107
108
  "UE_RC_HTTP_PORT": "30010",
108
- "UE_RC_WS_PORT": "30020"
109
+ "UE_RC_WS_PORT": "30020",
110
+ "UE_PROJECT_PATH": "C:/Users/YourName/Documents/Unreal Projects/YourProject"
109
111
  }
110
112
  }
111
113
  }
@@ -123,7 +125,8 @@ Then enable Python execution in: Edit > Project Settings > Plugins > Remote Cont
123
125
  "env": {
124
126
  "UE_HOST": "127.0.0.1",
125
127
  "UE_RC_HTTP_PORT": "30010",
126
- "UE_RC_WS_PORT": "30020"
128
+ "UE_RC_WS_PORT": "30020",
129
+ "UE_PROJECT_PATH": "C:/Users/YourName/Documents/Unreal Projects/YourProject"
127
130
  }
128
131
  }
129
132
  }
@@ -177,6 +180,7 @@ Blueprints, Materials, Textures, Static/Skeletal Meshes, Levels, Sounds, Particl
177
180
  UE_HOST=127.0.0.1 # Unreal Engine host
178
181
  UE_RC_HTTP_PORT=30010 # Remote Control HTTP port
179
182
  UE_RC_WS_PORT=30020 # Remote Control WebSocket port
183
+ UE_PROJECT_PATH="C:/Users/YourName/Documents/Unreal Projects/YourProject" # Absolute path to your .uproject file
180
184
  LOG_LEVEL=info # debug | info | warn | error
181
185
  ```
182
186
 
@@ -187,6 +191,13 @@ docker build -t unreal-mcp .
187
191
  docker run -it --rm unreal-mcp
188
192
  ```
189
193
 
194
+ Pull from Docker Hub
195
+
196
+ ```bash
197
+ docker pull mcp/server/unreal-engine-mcp-server:latest
198
+ docker run --rm -it mcp/server/unreal-engine-mcp-server:latest
199
+ ```
200
+
190
201
  ## Development
191
202
 
192
203
  ```bash
@@ -6,7 +6,8 @@
6
6
  "env": {
7
7
  "UE_HOST": "127.0.0.1",
8
8
  "UE_RC_WS_PORT": "30020",
9
- "UE_RC_HTTP_PORT": "30010"
9
+ "UE_RC_HTTP_PORT": "30010",
10
+ "UE_PROJECT_PATH": "C:/Users/YourName/Documents/Unreal Projects/YourProject"
10
11
  }
11
12
  }
12
13
  }
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import 'dotenv/config';
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { UnrealBridge } from './unreal-bridge.js';
4
- export declare function createServer(): Promise<{
4
+ import { z } from 'zod';
5
+ export declare function createServer(): {
5
6
  server: Server<{
6
7
  method: string;
7
8
  params?: {
@@ -26,6 +27,50 @@ export declare function createServer(): Promise<{
26
27
  } | undefined;
27
28
  }>;
28
29
  bridge: UnrealBridge;
30
+ };
31
+ export declare const configSchema: z.ZodObject<{
32
+ ueHost: z.ZodDefault<z.ZodOptional<z.ZodString>>;
33
+ ueHttpPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
+ ueWsPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error"]>>>;
36
+ projectPath: z.ZodDefault<z.ZodOptional<z.ZodString>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ projectPath: string;
39
+ ueHost: string;
40
+ ueHttpPort: number;
41
+ ueWsPort: number;
42
+ logLevel: "debug" | "info" | "warn" | "error";
43
+ }, {
44
+ projectPath?: string | undefined;
45
+ ueHost?: string | undefined;
46
+ ueHttpPort?: number | undefined;
47
+ ueWsPort?: number | undefined;
48
+ logLevel?: "debug" | "info" | "warn" | "error" | undefined;
49
+ }>;
50
+ export default function createServerDefault({ config }?: {
51
+ config?: any;
52
+ }): Server<{
53
+ method: string;
54
+ params?: {
55
+ [x: string]: unknown;
56
+ _meta?: {
57
+ [x: string]: unknown;
58
+ progressToken?: string | number | undefined;
59
+ } | undefined;
60
+ } | undefined;
61
+ }, {
62
+ method: string;
63
+ params?: {
64
+ [x: string]: unknown;
65
+ _meta?: {
66
+ [x: string]: unknown;
67
+ } | undefined;
68
+ } | undefined;
69
+ }, {
70
+ [x: string]: unknown;
71
+ _meta?: {
72
+ [x: string]: unknown;
73
+ } | undefined;
29
74
  }>;
30
75
  export declare function startStdioServer(): Promise<void>;
31
76
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -33,10 +33,11 @@ import { handleConsolidatedToolCall } from './tools/consolidated-tool-handlers.j
33
33
  import { prompts } from './prompts/index.js';
34
34
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js';
35
35
  import { responseValidator } from './utils/response-validator.js';
36
- import { ErrorHandler } from './utils/error-handler.js';
36
+ import { z } from 'zod';
37
37
  import { routeStdoutLogsToStderr } from './utils/stdio-redirect.js';
38
- import { cleanObject } from './utils/safe-json.js';
39
38
  import { createElicitationHelper } from './utils/elicitation.js';
39
+ import { cleanObject } from './utils/safe-json.js';
40
+ import { ErrorHandler } from './utils/error-handler.js';
40
41
  const log = new Logger('UE-MCP');
41
42
  // Ensure stdout remains JSON-only for MCP by routing logs to stderr unless opted out.
42
43
  routeStdoutLogsToStderr();
@@ -62,7 +63,7 @@ const CONFIG = {
62
63
  RETRY_DELAY_MS: 2000,
63
64
  // Server info
64
65
  SERVER_NAME: 'unreal-engine-mcp',
65
- SERVER_VERSION: '0.4.4',
66
+ SERVER_VERSION: '0.4.5',
66
67
  // Monitoring
67
68
  HEALTH_CHECK_INTERVAL_MS: 30000 // 30 seconds
68
69
  };
@@ -116,7 +117,7 @@ async function performHealthCheck(bridge) {
116
117
  }
117
118
  }
118
119
  }
119
- export async function createServer() {
120
+ export function createServer() {
120
121
  const bridge = new UnrealBridge();
121
122
  // Disable auto-reconnect loops; connect only on-demand
122
123
  bridge.setAutoReconnectEnabled(false);
@@ -215,8 +216,7 @@ export async function createServer() {
215
216
  prompts: {
216
217
  listChanged: false
217
218
  },
218
- logging: {},
219
- elicitation: {}
219
+ logging: {}
220
220
  }
221
221
  });
222
222
  // Optional elicitation helper – used only if client supports it.
@@ -618,8 +618,40 @@ export async function createServer() {
618
618
  });
619
619
  return { server, bridge };
620
620
  }
621
+ // Export configuration schema for Smithery session UI and validation
622
+ export const configSchema = z.object({
623
+ ueHost: z.string().optional().default('127.0.0.1').describe('Unreal Engine host (e.g. 127.0.0.1)'),
624
+ ueHttpPort: z.number().int().optional().default(30010).describe('Remote Control HTTP port'),
625
+ ueWsPort: z.number().int().optional().default(30020).describe('Remote Control WebSocket port'),
626
+ logLevel: z.enum(['debug', 'info', 'warn', 'error']).optional().default('info').describe('Runtime log level'),
627
+ projectPath: z.string().optional().default('C:/Users/YourName/Documents/Unreal Projects/YourProject').describe('Absolute path to your Unreal .uproject file')
628
+ });
629
+ // Default export expected by Smithery TypeScript runtime. Accepts an optional config object
630
+ // and injects values into the environment before creating the server.
631
+ export default function createServerDefault({ config } = {}) {
632
+ try {
633
+ if (config) {
634
+ if (typeof config.ueHost === 'string' && config.ueHost.trim())
635
+ process.env.UE_HOST = config.ueHost;
636
+ if (config.ueHttpPort !== undefined)
637
+ process.env.UE_RC_HTTP_PORT = String(config.ueHttpPort);
638
+ if (config.ueWsPort !== undefined)
639
+ process.env.UE_RC_WS_PORT = String(config.ueWsPort);
640
+ if (typeof config.logLevel === 'string')
641
+ process.env.LOG_LEVEL = config.logLevel;
642
+ if (typeof config.projectPath === 'string' && config.projectPath.trim())
643
+ process.env.UE_PROJECT_PATH = config.projectPath;
644
+ }
645
+ }
646
+ catch (e) {
647
+ // Non-fatal: log and continue (console to avoid circular logger dependencies at top-level)
648
+ console.debug('[createServerDefault] Failed to apply config to environment:', e?.message || e);
649
+ }
650
+ const { server } = createServer();
651
+ return server;
652
+ }
621
653
  export async function startStdioServer() {
622
- const { server } = await createServer();
654
+ const { server } = createServer();
623
655
  const transport = new StdioServerTransport();
624
656
  // Add debugging for transport messages
625
657
  const originalWrite = process.stdout.write;
@@ -633,11 +665,5 @@ export async function startStdioServer() {
633
665
  await server.connect(transport);
634
666
  log.info('Unreal Engine MCP Server started on stdio');
635
667
  }
636
- // Start the server when run directly
637
- if (import.meta.url === `file://${process.argv[1].replace(/\\/g, '/')}`) {
638
- startStdioServer().catch(error => {
639
- console.error('Failed to start server:', error);
640
- process.exit(1);
641
- });
642
- }
668
+ // Direct execution is handled via src/cli.ts to keep this module side-effect free.
643
669
  //# sourceMappingURL=index.js.map
@@ -227,43 +227,55 @@ export declare const consolidatedToolDefinitions: ({
227
227
  };
228
228
  location: {
229
229
  type: string;
230
+ description: string;
230
231
  properties: {
231
232
  x: {
232
233
  type: string;
234
+ description: string;
233
235
  };
234
236
  y: {
235
237
  type: string;
238
+ description: string;
236
239
  };
237
240
  z: {
238
241
  type: string;
242
+ description: string;
239
243
  };
240
244
  };
241
245
  };
242
246
  rotation: {
243
247
  type: string;
248
+ description: string;
244
249
  properties: {
245
250
  pitch: {
246
251
  type: string;
252
+ description: string;
247
253
  };
248
254
  yaw: {
249
255
  type: string;
256
+ description: string;
250
257
  };
251
258
  roll: {
252
259
  type: string;
260
+ description: string;
253
261
  };
254
262
  };
255
263
  };
256
264
  force: {
257
265
  type: string;
266
+ description: string;
258
267
  properties: {
259
268
  x: {
260
269
  type: string;
270
+ description: string;
261
271
  };
262
272
  y: {
263
273
  type: string;
274
+ description: string;
264
275
  };
265
276
  z: {
266
277
  type: string;
278
+ description: string;
267
279
  };
268
280
  };
269
281
  };
@@ -437,29 +449,37 @@ export declare const consolidatedToolDefinitions: ({
437
449
  };
438
450
  location: {
439
451
  type: string;
452
+ description: string;
440
453
  properties: {
441
454
  x: {
442
455
  type: string;
456
+ description: string;
443
457
  };
444
458
  y: {
445
459
  type: string;
460
+ description: string;
446
461
  };
447
462
  z: {
448
463
  type: string;
464
+ description: string;
449
465
  };
450
466
  };
451
467
  };
452
468
  rotation: {
453
469
  type: string;
470
+ description: string;
454
471
  properties: {
455
472
  pitch: {
456
473
  type: string;
474
+ description: string;
457
475
  };
458
476
  yaw: {
459
477
  type: string;
478
+ description: string;
460
479
  };
461
480
  roll: {
462
481
  type: string;
482
+ description: string;
463
483
  };
464
484
  };
465
485
  };
@@ -674,15 +694,19 @@ export declare const consolidatedToolDefinitions: ({
674
694
  };
675
695
  location: {
676
696
  type: string;
697
+ description: string;
677
698
  properties: {
678
699
  x: {
679
700
  type: string;
701
+ description: string;
680
702
  };
681
703
  y: {
682
704
  type: string;
705
+ description: string;
683
706
  };
684
707
  z: {
685
708
  type: string;
709
+ description: string;
686
710
  };
687
711
  };
688
712
  };
@@ -1067,15 +1091,19 @@ export declare const consolidatedToolDefinitions: ({
1067
1091
  };
1068
1092
  location: {
1069
1093
  type: string;
1094
+ description: string;
1070
1095
  properties: {
1071
1096
  x: {
1072
1097
  type: string;
1098
+ description: string;
1073
1099
  };
1074
1100
  y: {
1075
1101
  type: string;
1102
+ description: string;
1076
1103
  };
1077
1104
  z: {
1078
1105
  type: string;
1106
+ description: string;
1079
1107
  };
1080
1108
  };
1081
1109
  };
@@ -1480,26 +1508,33 @@ export declare const consolidatedToolDefinitions: ({
1480
1508
  };
1481
1509
  location: {
1482
1510
  type: string;
1511
+ description: string;
1483
1512
  properties: {
1484
1513
  x: {
1485
1514
  type: string;
1515
+ description: string;
1486
1516
  };
1487
1517
  y: {
1488
1518
  type: string;
1519
+ description: string;
1489
1520
  };
1490
1521
  z: {
1491
1522
  type: string;
1523
+ description: string;
1492
1524
  };
1493
1525
  };
1494
1526
  };
1495
1527
  subdivisions: {
1496
1528
  type: string;
1529
+ description: string;
1497
1530
  };
1498
1531
  heightFunction: {
1499
1532
  type: string;
1533
+ description: string;
1500
1534
  };
1501
1535
  materialPath: {
1502
1536
  type: string;
1537
+ description: string;
1503
1538
  };
1504
1539
  bounds: {
1505
1540
  type: string;
@@ -1626,15 +1661,19 @@ export declare const consolidatedToolDefinitions: ({
1626
1661
  };
1627
1662
  position: {
1628
1663
  type: string;
1664
+ description: string;
1629
1665
  properties: {
1630
1666
  x: {
1631
1667
  type: string;
1668
+ description: string;
1632
1669
  };
1633
1670
  y: {
1634
1671
  type: string;
1672
+ description: string;
1635
1673
  };
1636
1674
  z: {
1637
1675
  type: string;
1676
+ description: string;
1638
1677
  };
1639
1678
  };
1640
1679
  };
@@ -1824,15 +1863,19 @@ export declare const consolidatedToolDefinitions: ({
1824
1863
  };
1825
1864
  location: {
1826
1865
  type: string;
1866
+ description: string;
1827
1867
  properties: {
1828
1868
  x: {
1829
1869
  type: string;
1870
+ description: string;
1830
1871
  };
1831
1872
  y: {
1832
1873
  type: string;
1874
+ description: string;
1833
1875
  };
1834
1876
  z: {
1835
1877
  type: string;
1878
+ description: string;
1836
1879
  };
1837
1880
  };
1838
1881
  };