Skip to content
Closed
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions Editor/MCPBridgeServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,17 @@ private static void HandleRequest(HttpListenerContext context)
return;
}

// ═══ Project Context endpoints (read-only, no queue needed) ═══
// ═══ Project Context endpoints (read-only file I/O, but EditorPrefs-backed
// settings must be read on the main thread) ═══
if (apiPath == "context")
{
SendJson(response, 200, MCPContextManager.GetContextResponse());
SendJson(response, 200, ExecuteOnMainThread(() => MCPContextManager.GetContextResponse()));
return;
}
if (apiPath.StartsWith("context/"))
{
string category = apiPath.Substring("context/".Length);
SendJson(response, 200, MCPContextManager.GetContextResponse(category));
SendJson(response, 200, ExecuteOnMainThread(() => MCPContextManager.GetContextResponse(category)));
return;
}

Expand Down