Skip to content

Commit 4f7b3d1

Browse files
committed
feat(mcp): skip validation if MCP server is disabled #330
Add a check to skip MCP server validation when the server is disabled in the project settings. This prevents unnecessary validation steps when the feature is not enabled.
1 parent b19fb43 commit 4f7b3d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/233/main/kotlin/cc/unitmesh/devti/mcp/MCPServerStartupValidator.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ internal class MCPServerStartupValidator : ProjectActivity {
135135

136136
override suspend fun execute(project: Project) {
137137
val notificationGroup = NotificationGroupManager.getInstance().getNotificationGroup(GROUP_ID)
138+
if (!project.coderSetting.state.enableMcpServer) {
139+
logger.info("MCP Server is disabled, skipping validation")
140+
return
141+
}
142+
138143
if (SystemInfo.isLinux) {
139144
logger.info("No Claude Client on Linux, skipping validation")
140145
return

0 commit comments

Comments
 (0)