Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
4ad7ec3
fix(unity): make HTTP server concurrent, thread-safe, and window-inde…
Anzeit Jun 8, 2026
a9fca82
feat(unity): add UnityCompat + McpEditorHelpers cross-version utilities
isekream Jun 8, 2026
100ed4b
refactor(unity): adopt shared helpers + fix instanceId serialization
isekream Jun 8, 2026
4c403b7
refactor(unity): static window-independent tool registry + action/cat…
isekream Jun 8, 2026
e5cab93
refactor(server): align Node MCP bridge tool schemas + logging/env ha…
isekream Jun 8, 2026
18e86d8
test: update end-to-end bridge smoke script
isekream Jun 8, 2026
dec2f15
merge: reconcile threading (PR #8) with static registry + add domain-…
isekream Jun 8, 2026
9ba661c
fix(unity): compile on Unity 6 (PhysicMaterial, loadedSceneCount, sym…
isekream Jun 8, 2026
d886adf
feat(unity): add scene primitives and edit-mode component properties
isekream Jun 8, 2026
8f9940a
fix(unity): accept snake_case playmode actions from Node bridge
isekream Jun 8, 2026
6527010
feat(server): add scene.createPrimitive and primitive on createGameOb…
isekream Jun 8, 2026
e747b69
test: add scene-building smoke script for primitive + modifyComponent…
isekream Jun 8, 2026
34b4a9a
fix(unity): Unity 6 compile errors in helpers and asset copy
isekream Jun 8, 2026
4285e8c
fix(unity): use valid GUIDs in McpEditorHelpers and UnityCompat meta …
isekream Jun 8, 2026
ea592d5
fix(unity): use GetInstanceID for object refs on Unity 6
isekream Jun 8, 2026
ad78a29
fix(unity): reliable main-thread dispatch for scene tools on Unity 6
isekream Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Server/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"@typescript-eslint/recommended",
"@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
Expand Down
14 changes: 10 additions & 4 deletions Server/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node

import { fileURLToPath } from 'node:url';
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
Expand Down Expand Up @@ -164,8 +165,9 @@ class UnityMCPServer {
try {
await this.unityClient.connect();
logger.info('Connected to Unity Editor successfully');
} catch (err: any) {
logger.warn('Could not connect to Unity Editor (running in standalone/test mode without Unity):', err?.message || err);
} catch (err: unknown) {
const message = err instanceof Error ? err.message : String(err);
logger.warn('Could not connect to Unity Editor (running in standalone/test mode without Unity):', message);
// Continue to start the MCP transport anyway so tools can be listed/tested via inspector or clients.
// Actual tool calls will fail until Unity is available.
}
Expand Down Expand Up @@ -224,7 +226,11 @@ process.on('uncaughtException', (error: Error) => {
process.exit(1);
});

// Start the server
if (import.meta.url === `file://${process.argv[1]}`) {
// Start the server when executed directly (not when imported as a module).
const isMainModule =
process.argv[1] !== undefined &&
fileURLToPath(import.meta.url) === fileURLToPath(process.argv[1]);

if (isMainModule) {
void main();
}
Loading
Loading