2025-03-20 19:24:31 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
2025-04-08 18:14:13 +08:00
|
|
|
using UnityMcpBridge.Editor.Models;
|
2025-03-20 19:24:31 +08:00
|
|
|
|
2025-04-08 18:14:13 +08:00
|
|
|
namespace UnityMcpBridge.Editor.Data
|
2025-03-20 19:24:31 +08:00
|
|
|
{
|
|
|
|
|
public class McpClients
|
|
|
|
|
{
|
2025-04-08 18:14:13 +08:00
|
|
|
public List<McpClient> clients = new()
|
|
|
|
|
{
|
2025-08-09 02:23:45 +08:00
|
|
|
// 1) Cursor
|
2025-04-08 18:14:13 +08:00
|
|
|
new()
|
|
|
|
|
{
|
2025-08-09 02:23:45 +08:00
|
|
|
name = "Cursor",
|
2025-03-20 19:24:31 +08:00
|
|
|
windowsConfigPath = Path.Combine(
|
2025-08-09 02:23:45 +08:00
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
".cursor",
|
|
|
|
|
"mcp.json"
|
2025-03-20 19:24:31 +08:00
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
2025-08-09 02:23:45 +08:00
|
|
|
".cursor",
|
|
|
|
|
"mcp.json"
|
2025-03-20 19:24:31 +08:00
|
|
|
),
|
2025-08-09 02:23:45 +08:00
|
|
|
mcpType = McpTypes.Cursor,
|
2025-04-08 18:14:13 +08:00
|
|
|
configStatus = "Not Configured",
|
2025-03-20 19:24:31 +08:00
|
|
|
},
|
2025-08-09 02:23:45 +08:00
|
|
|
// 2) Claude Code
|
2025-04-08 18:14:13 +08:00
|
|
|
new()
|
2025-07-29 06:30:33 +08:00
|
|
|
{
|
|
|
|
|
name = "Claude Code",
|
|
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
".claude.json"
|
|
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
".claude.json"
|
|
|
|
|
),
|
|
|
|
|
mcpType = McpTypes.ClaudeCode,
|
|
|
|
|
configStatus = "Not Configured",
|
|
|
|
|
},
|
2025-08-09 02:23:45 +08:00
|
|
|
// 3) Windsurf
|
2025-07-29 06:30:33 +08:00
|
|
|
new()
|
2025-04-08 18:14:13 +08:00
|
|
|
{
|
2025-08-09 02:23:45 +08:00
|
|
|
name = "Windsurf",
|
2025-03-20 19:24:31 +08:00
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
2025-08-09 02:23:45 +08:00
|
|
|
".codeium",
|
|
|
|
|
"windsurf",
|
|
|
|
|
"mcp_config.json"
|
2025-03-20 19:24:31 +08:00
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
2025-08-09 02:23:45 +08:00
|
|
|
".codeium",
|
|
|
|
|
"windsurf",
|
|
|
|
|
"mcp_config.json"
|
2025-03-20 19:24:31 +08:00
|
|
|
),
|
2025-08-09 02:23:45 +08:00
|
|
|
mcpType = McpTypes.Windsurf,
|
2025-04-08 18:14:13 +08:00
|
|
|
configStatus = "Not Configured",
|
|
|
|
|
},
|
2025-08-09 02:23:45 +08:00
|
|
|
// 4) Claude Desktop
|
2025-05-12 09:25:21 +08:00
|
|
|
new()
|
|
|
|
|
{
|
2025-08-09 02:23:45 +08:00
|
|
|
name = "Claude Desktop",
|
2025-05-12 09:25:21 +08:00
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
2025-08-09 02:23:45 +08:00
|
|
|
"Claude",
|
|
|
|
|
"claude_desktop_config.json"
|
2025-05-12 09:25:21 +08:00
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
"Library",
|
|
|
|
|
"Application Support",
|
2025-08-09 02:23:45 +08:00
|
|
|
"Claude",
|
|
|
|
|
"claude_desktop_config.json"
|
2025-05-12 09:25:21 +08:00
|
|
|
),
|
2025-08-09 02:23:45 +08:00
|
|
|
mcpType = McpTypes.ClaudeDesktop,
|
2025-05-12 09:25:21 +08:00
|
|
|
configStatus = "Not Configured",
|
|
|
|
|
},
|
2025-08-09 02:23:45 +08:00
|
|
|
// 5) VSCode GitHub Copilot
|
2025-08-01 20:12:07 +08:00
|
|
|
new()
|
|
|
|
|
{
|
2025-08-09 02:23:45 +08:00
|
|
|
name = "VSCode GitHub Copilot",
|
2025-08-01 20:12:07 +08:00
|
|
|
windowsConfigPath = Path.Combine(
|
2025-08-09 02:23:45 +08:00
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
|
|
|
|
"Code",
|
|
|
|
|
"User",
|
2025-08-13 11:56:22 +08:00
|
|
|
"mcp.json"
|
2025-08-01 20:12:07 +08:00
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
2025-08-09 02:23:45 +08:00
|
|
|
"Library",
|
|
|
|
|
"Application Support",
|
|
|
|
|
"Code",
|
|
|
|
|
"User",
|
2025-08-13 11:56:22 +08:00
|
|
|
"mcp.json"
|
2025-08-01 20:12:07 +08:00
|
|
|
),
|
2025-08-09 02:23:45 +08:00
|
|
|
mcpType = McpTypes.VSCode,
|
2025-08-01 20:12:07 +08:00
|
|
|
configStatus = "Not Configured",
|
|
|
|
|
},
|
2025-03-20 19:24:31 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Initialize status enums after construction
|
|
|
|
|
public McpClients()
|
|
|
|
|
{
|
|
|
|
|
foreach (var client in clients)
|
|
|
|
|
{
|
|
|
|
|
if (client.configStatus == "Not Configured")
|
|
|
|
|
{
|
|
|
|
|
client.status = McpStatus.NotConfigured;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-08 18:14:13 +08:00
|
|
|
}
|
|
|
|
|
|