3.7 KiB
3.7 KiB
GPT-Edit MCP Connector 설정 가이드
📍 Claude Desktop 설정 파일 위치
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
⚙️ MCP Connector 설정
기본 설정 (Python 직접 실행)
{
"mcpServers": {
"gpt-edit": {
"command": "python",
"args": ["D:\\Project\\gpt-edit\\main.py"],
"env": {
"PYTHONPATH": "D:\\Project\\gpt-edit"
}
}
}
}
가상환경 사용 시
{
"mcpServers": {
"gpt-edit": {
"command": "D:\\Project\\gpt-edit\\venv\\Scripts\\python.exe",
"args": ["D:\\Project\\gpt-edit\\main.py"],
"env": {
"PYTHONPATH": "D:\\Project\\gpt-edit"
}
}
}
}
배치 파일 사용 시
{
"mcpServers": {
"gpt-edit": {
"command": "cmd",
"args": ["/c", "D:\\Project\\gpt-edit\\run.bat"]
}
}
}
🔧 환경 변수 설정 (선택사항)
MCP connector에서 직접 환경 변수를 설정할 수도 있습니다:
{
"mcpServers": {
"gpt-edit": {
"command": "python",
"args": ["D:\\Project\\gpt-edit\\main.py"],
"env": {
"PYTHONPATH": "D:\\Project\\gpt-edit",
"OPENAI_API_KEY": "sk-xxxxx",
"OUTPUT_FILENAME_PREFIX": "gptimage1",
"GENERATED_IMAGES_PATH": "D:\\Project\\gpt-edit\\generated_images",
"LOG_LEVEL": "INFO",
"MAX_IMAGE_SIZE_MB": "4",
"DEFAULT_TIMEOUT": "30",
"ENABLE_AUTO_OPTIMIZE": "true",
"SAVE_ORIGINALS": "true",
"SAVE_PARAMETERS": "true"
}
}
}
}
📝 다중 MCP 서버 설정
여러 MCP 서버를 함께 사용하는 경우:
{
"mcpServers": {
"gpt-edit": {
"command": "python",
"args": ["D:\\Project\\gpt-edit\\main.py"]
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "D:\\Project"]
},
"imagen4": {
"command": "python",
"args": ["D:\\Project\\imagen4\\main.py"]
}
}
}
🚨 주의사항
- 경로 구분자: Windows에서는
\\또는/모두 사용 가능 - Python 경로: 시스템 Python 또는 가상환경 Python 경로 확인
- 권한: 스크립트 실행 권한 확인
- 로그 확인: 문제 발생 시
gptedit.log파일 확인
🔍 연결 테스트
Claude Desktop에서 다음 명령으로 연결 확인:
-
도구 목록 확인:
- Claude에게 "What tools are available?" 물어보기
edit_image,edit_with_mask,batch_edit등이 나타나야 함
-
간단한 테스트:
"Validate the image at D:/test.png" -
로그 확인:
D:\Project\gpt-edit\gpt-edit.log파일에서 연결 로그 확인
🔄 서버 재시작
설정 변경 후:
- Claude Desktop 완전 종료 (시스템 트레이 확인)
- Claude Desktop 재시작
- 새 대화 시작
📋 체크리스트
.env파일에 OPENAI_API_KEY 설정됨generated_images/디렉토리 존재- Python 및 필요 패키지 설치됨
claude_desktop_config.json파일 설정됨- Claude Desktop 재시작됨
🐛 문제 해결
"Server disconnected" 에러
- Python 경로 확인
- 의존성 설치 확인:
pip install -r requirements.txt .env파일 확인
"Method not found" 에러
- 최신 코드인지 확인
list_prompts,list_resources메서드 구현 확인
파일을 찾을 수 없음
generated_images/디렉토리 생성 확인- 파일 권한 확인
이 가이드를 따라 Claude Desktop과 GPT-Edit MCP 서버를 연결하세요.