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()
|
|
|
|
|
{
|
|
|
|
|
new()
|
|
|
|
|
{
|
2025-03-20 19:24:31 +08:00
|
|
|
name = "Claude Desktop",
|
|
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
|
|
|
|
"Claude",
|
|
|
|
|
"claude_desktop_config.json"
|
|
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
"Library",
|
|
|
|
|
"Application Support",
|
|
|
|
|
"Claude",
|
|
|
|
|
"claude_desktop_config.json"
|
|
|
|
|
),
|
|
|
|
|
mcpType = McpTypes.ClaudeDesktop,
|
2025-04-08 18:14:13 +08:00
|
|
|
configStatus = "Not Configured",
|
2025-03-20 19:24:31 +08:00
|
|
|
},
|
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",
|
|
|
|
|
},
|
|
|
|
|
new()
|
2025-04-08 18:14:13 +08:00
|
|
|
{
|
2025-03-20 19:24:31 +08:00
|
|
|
name = "Cursor",
|
|
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
".cursor",
|
|
|
|
|
"mcp.json"
|
|
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
".cursor",
|
|
|
|
|
"mcp.json"
|
|
|
|
|
),
|
|
|
|
|
mcpType = McpTypes.Cursor,
|
2025-04-08 18:14:13 +08:00
|
|
|
configStatus = "Not Configured",
|
|
|
|
|
},
|
2025-05-12 09:25:21 +08:00
|
|
|
new()
|
|
|
|
|
{
|
|
|
|
|
name = "VSCode GitHub Copilot",
|
|
|
|
|
windowsConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
|
|
|
|
"Code",
|
|
|
|
|
"User",
|
|
|
|
|
"settings.json"
|
|
|
|
|
),
|
|
|
|
|
linuxConfigPath = Path.Combine(
|
|
|
|
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
|
|
|
|
"Library",
|
|
|
|
|
"Application Support",
|
|
|
|
|
"Code",
|
|
|
|
|
"User",
|
|
|
|
|
"settings.json"
|
|
|
|
|
),
|
|
|
|
|
mcpType = McpTypes.VSCode,
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|