Skip to content

Commit b6d815f

Browse files
committed
Offer the desktop entry as the common mcpServers JSON (#43)
Agent: Claude Code (runtime model unverified) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7NX2yks21D5Tau2tYG
1 parent bbcb811 commit b6d815f

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎Sources/Core/AgentMCPConfiguration.swift‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ struct AgentMCPConfiguration {
4848
return "claude mcp add-json \(serverName) \(quoted) --scope user"
4949
}
5050

51-
/// The `mcpServers` entry for the Claude desktop app's
52-
/// claude_desktop_config.json (#43). Copied only: the user merges it into
53-
/// the file through the desktop app's settings and restarts the app.
54-
var claudeDesktopJSON: String? {
51+
/// The common `mcpServers` JSON entry that the Claude desktop app
52+
/// (claude_desktop_config.json) and most other stdio MCP clients read (#43).
53+
/// Copied only: the user merges it into the client's file and restarts it.
54+
var mcpServersJSON: String? {
5555
guard let json = try? JSONSerialization.data(
5656
withJSONObject: ["mcpServers": [serverName: ["command": command, "args": [String]()]]],
5757
options: [.sortedKeys, .withoutEscapingSlashes, .prettyPrinted]),

‎Sources/UI/ExplainWorkspace.swift‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,14 +575,14 @@ struct ExplainWorkspace: View {
575575
copyMCP(command, client: "Claude Code")
576576
}
577577
}
578-
if let desktop = setup.claudeDesktopJSON {
579-
Button("Claude 데스크톱 앱 · claude_desktop_config.json") {
580-
copyMCP(desktop, client: "Claude 데스크톱 앱")
578+
if let desktop = setup.mcpServersJSON {
579+
Button("JSON · mcpServers (Claude 데스크톱 앱 등)") {
580+
copyMCP(desktop, client: "JSON")
581581
}
582582
}
583583
}
584584
.accessibilityLabel("MCP 설정 복사")
585-
.accessibilityHint("Codex, Claude Code 또는 Claude 데스크톱 앱 설정을 클립보드에 복사합니다.")
585+
.accessibilityHint("Codex, Claude Code 또는 mcpServers JSON 형식(Claude 데스크톱 앱 등) 설정을 클립보드에 복사합니다.")
586586
if let copiedMCPClient {
587587
Text("\(copiedMCPClient) 설정 복사됨").font(.caption).foregroundStyle(.secondary)
588588
}
@@ -601,8 +601,8 @@ struct ExplainWorkspace: View {
601601
private static func pasteHint(for client: String) -> String {
602602
switch client {
603603
case "Codex": return "config.toml에 붙여넣으세요."
604-
case "Claude 데스크톱 앱":
605-
return "Claude 앱의 설정 › 개발자 › 구성 편집으로 연 claude_desktop_config.json의 mcpServers에 이 항목을 합쳐 넣고, Claude 앱을 완전히 종료한 뒤 다시 여세요."
604+
case "JSON":
605+
return "클라이언트 설정 파일의 mcpServers에 이 항목을 합쳐 넣고 그 앱을 완전히 종료한 뒤 다시 여세요. Claude 데스크톱 앱은 설정 › 개발자 › 구성 편집으로 claude_desktop_config.json을 엽니다."
606606
default: return "터미널에 붙여넣고 실행하세요."
607607
}
608608
}

‎Tests/AgentMCPConfigurationTests.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Foundation
1414
precondition(config.codexTOML.contains("O'Brian"))
1515
precondition(config.claudeCodeCommand!.contains("O'\\''Brian"))
1616
// The desktop entry is JSON that parses back to the exact path (#43).
17-
let desktop = try JSONSerialization.jsonObject(with: Data(config.claudeDesktopJSON!.utf8)) as! [String: Any]
17+
let desktop = try JSONSerialization.jsonObject(with: Data(config.mcpServersJSON!.utf8)) as! [String: Any]
1818
let servers = desktop["mcpServers"] as! [String: Any]
1919
let entry = servers["codebasic_tts_agent"] as! [String: Any]
2020
precondition(servers.count == 1 && entry["command"] as? String == path && (entry["args"] as? [String]) == [])

‎docs/mcp-explanation-drafts.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
command = "/absolute/path/to/Codebasic TTS.app/Contents/Helpers/CodebasicAgentMCP"
1919
```
2020

21-
앱의 **MCP 설정 복사** 메뉴로 현재 번들 경로가 포함된 Codex 설정, Claude Code 사용자 범위 등록 명령, Claude 데스크톱 앱의 `claude_desktop_config.json` 항목을 복사할 수 있습니다. 데스크톱 앱은 설정 › 개발자 › 구성 편집(Edit Config)으로 연 파일(`~/Library/Application Support/Claude/claude_desktop_config.json`)의 `mcpServers`에 복사한 항목을 합쳐 넣고 앱을 완전히 종료한 뒤 다시 열면 됩니다. 데스크톱 앱도 터미널과 같은 방식으로 실행 주체의 서명으로 식별되어 별도의 앱으로 한 번 승인하며, 식별할 수 없으면 실행마다 승인합니다. 복사만으로 설정 파일을 바꾸거나 명령을 실행하지 않습니다. 다른 stdio MCP 클라이언트에도 같은 절대 경로를 실행 명령으로 지정하면 됩니다. 앱을 옮기거나 이름을 바꾸면 이 명령 경로만 수정하세요. 전역 에이전트 설정은 앱이 변경하지 않습니다.
21+
앱의 **MCP 설정 복사** 메뉴로 현재 번들 경로가 포함된 Codex 설정, Claude Code 사용자 범위 등록 명령, 여러 클라이언트가 공통으로 읽는 `mcpServers` JSON 항목(Claude 데스크톱 앱의 `claude_desktop_config.json` 등)을 복사할 수 있습니다. 연결·승인·철회 후 재승인은 클라이언트와 상관없이 도우미와 앱 사이의 같은 경로에서 처리됩니다. 데스크톱 앱은 설정 › 개발자 › 구성 편집(Edit Config)으로 연 파일(`~/Library/Application Support/Claude/claude_desktop_config.json`)의 `mcpServers`에 복사한 항목을 합쳐 넣고 앱을 완전히 종료한 뒤 다시 열면 됩니다. 데스크톱 앱도 터미널과 같은 방식으로 실행 주체의 서명으로 식별되어 별도의 앱으로 한 번 승인하며, 식별할 수 없으면 실행마다 승인합니다. 복사만으로 설정 파일을 바꾸거나 명령을 실행하지 않습니다. 다른 stdio MCP 클라이언트에도 같은 절대 경로를 실행 명령으로 지정하면 됩니다. 앱을 옮기거나 이름을 바꾸면 이 명령 경로만 수정하세요. 전역 에이전트 설정은 앱이 변경하지 않습니다.
2222

2323
- `tts_agent_status`: 앱 연결과 두 권한의 상태를 확인합니다. 지시나 대본은 읽지 않습니다.
2424
- `get_tts_submission_guide`: 제출 형식을 돌려주는 읽기 전용 도구입니다. 어느 도구를 언제 쓰는지, 각 필드의 뜻과 한도, 예시, 결과 코드별 대처를 담습니다. 앱이 꺼져 있거나 허용 전이어도 읽을 수 있고, 지시·대본·승인 정보는 담지 않으며 아무 상태도 바꾸지 않습니다. 도구 스키마와 이 안내는 도우미 안의 한 필드 정의에서 만들어집니다.

0 commit comments

Comments
 (0)