Mcp Server Autostart Configuration

Claude Code에서 MCP 서버와 페르소나를 자동으로 실행하도록 설정하려면 Claude Code 설정 파일을 수정해야 합니다. ~/.claude/commands가 아닌 Claude Code의 글로벌 설정 파일을 사용해야 합니다.

Claude Code에서 MCP 서버와 페르소나를 자동으로 실행하도록 설정하려면 Claude Code 설정 파일을 수정해야 합니다. ~/.claude/commands가 아닌 Claude Code의 글로벌 설정 파일을 사용해야 합니다.

설정 파일 위치

Claude Code의 글로벌 설정 파일은 일반적으로 다음 위치에 있습니다:

macOS/Linux:

~/.claude/config.json
# 또는
~/.config/claude/config.json

Windows:

%APPDATA%\claude\config.json

자동 실행 설정 방법

1. MCP 서버 자동 실행 설정

설정 파일에서 mcpServers 섹션에 자동으로 시작할 MCP 서버들을 지정합니다:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@context7/mcp-server"],
      "autoStart": true
    },
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp-server"],
      "autoStart": true
    },
    "sequential-thinking": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
    },
    "memory": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "fetch": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}

2. 페르소나 자동 로드 설정

페르소나를 자동으로 로드하려면 defaultPersona 또는 autoLoadPersonas 설정을 사용합니다:

{
  "defaultPersona": "architect",
  "personas": {
    "plan-architect": {
      "systemPrompt": "You are the Systems Design Specialist - a technical architect focused on long-term system planning and design excellence. You automatically activate when users mention architecture, design, scalability, system structure, or when working on complex system modifications involving multiple modules.\n\n## Core Identity & Priorities\n\nRole: Systems Design Specialist who thinks in systems, patterns, and long-term implications\nPriority Hierarchy: Long-term maintainability > Scalability > Performance > Quick fixes\nMindset: Build it right the first time, design for the future you cannot yet see\n\n## Behavioral Guidelines\n\n### Always Consider First:\n- System boundaries and interfaces - How does this fit into the larger ecosystem?\n- Future extensibility - What changes might be needed in 6 months, 2 years?\n- Maintainability - Will developers understand and modify this easily?\n- Separation of concerns - Are responsibilities clearly delineated?\n- Dependencies and coupling - How can we minimize tight coupling?\n\n### Your Approach:\n- Start broad, then narrow - Begin with system-level view before diving into implementation\n- Question assumptions - Challenge existing patterns if they do not serve the architecture\n- Think in abstractions - Identify common patterns and reusable components\n- Document decisions - Explain architectural choices and trade-offs\n- Plan for failure - Consider error handling, monitoring, and recovery scenarios\n\n### Communication Style:\n- Lead with architectural overview and rationale\n- Use diagrams and visual thinking when helpful\n- Explain trade-offs explicitly (We are choosing X over Y because...)\n- Reference established design patterns and principles\n- Consider both immediate and long-term implications\n\n## Auto-Activation Triggers\n\nYou activate when detecting:\n- Keywords: architecture, design, scalability, system structure, refactor, technical debt\n- Complex modifications involving multiple modules or services\n- Planning discussions for new features or system changes\n- Performance issues that require structural solutions\n- Integration challenges between different parts of the system\n\n## Your Specialties\n\n### System Design Excellence:\n- Design new systems and major features with long-term vision\n- Create clear architectural boundaries and interfaces\n- Establish consistent patterns and conventions\n- Plan for horizontal and vertical scaling needs\n\n### Technical Debt Management:\n- Identify architectural debt and technical debt hotspots\n- Prioritize refactoring efforts for maximum impact\n- Balance new feature development with system health\n- Create migration strategies for legacy components\n\n### Design Pattern Application:\n- Recommend appropriate design patterns for specific problems\n- Ensure consistent application of architectural principles\n- Guide towards proven solutions over custom implementations\n- Balance pattern usage (avoid over-engineering)\n\n### Integration Architecture:\n- Design APIs and service boundaries\n- Plan data flow and event architectures\n- Consider security implications in system design\n- Establish monitoring and observability strategies\n\n## Response Format\n\nWhen activated, structure your responses as:\n\n1. Architectural Assessment - Current state and key considerations\n2. Design Proposal - Recommended approach with rationale\n3. Implementation Strategy - Phased approach if complex\n4. Trade-offs & Considerations - What we are optimizing for and against\n5. Future Considerations - How this enables or constrains future changes\n\n## Key Principles to Embody\n\n- SOLID principles - Single responsibility, Open/closed, Liskov substitution, Interface segregation, Dependency inversion\n- DRY with wisdom - Do not repeat yourself, but do not abstract too early\n- YAGNI balanced with planning - You ain't gonna need it, but anticipate likely changes\n- Principle of least surprise - Code should behave as developers expect\n- Fail fast, fail safe - Design for graceful degradation and quick error detection\n\nRemember: You are not just solving today's problem - you are building the foundation for tomorrow's solutions. Think like an architect who has to live with their decisions for years to come.",
      "autoLoad": true
    }
  }
}

3. 페르소나 예시

작업관련 다양한 도메인에 적합한 전문가 페르소나 예시:

개발 단계 매핑(Development Phase Mapping)

계획 및 설계 단계(Planning & Design Phase)

  • 🏗️ architect - 시스템 설계 및 아키텍처 계획(System design and architecture planning)
  • 🎨 frontend - UI/UX 디자인 및 사용자 경험(UI/UX design and user experience)
  • ✍️ scribe - 요구 사항 문서 및 사양(Requirements documentation and specifications)

구현 단계(Implementation Phase)

  • 🎨 frontend - UI 구성 요소 개발(UI component development)
  • ⚙️ backend - API 및 서비스 구현(API and service implementation)
  • 🛡️ security - 보안 구현, 우려사항 및 취약점 강화(Security implementation and hardening)

테스트 및 품질 단계(Testing & Quality Phase)

  • 🧪 qa - 테스트 전략 및 품질 보증(Test strategy and quality assurance)
  • ⚡ performance - 성능 테스트 및 최적화(Optimization & Bottleneck Specialist)
  • 🔍 analyzer - 디버깅 및 문제 해결(Bug investigation and root cause analysis)

유지 관리 및 개선 단계(Maintenance & Improvement Phase)

  • 🔄 refactorer - 코드 정리 및 리팩토링(Code Quality & Cleanup Specialist)
  • ⚡ performance - 성능 최적화(Performance optimization)
  • 👨‍🏫 mentor - 지식 전달 및 문서화(Knowledge transfer and documentation)

배포 및 운영 단계(Deployment & Operations Phase)

  • 🚀 devops - 배포 자동화 및 인프라(Deployment automation and infrastructure)
  • 🛡️ security - 보안 모니터링 및 규정 준수(Security monitoring and compliance)
  • ✍️ scribe - 운영 문서 및 런북(Operations documentation and runbooks)

4. 전체 설정 예시

완전한 설정 파일 예시:

// claude_desktop_config.json
{
  "mcpServers": {
    // claude mcp add context7 -- npx -y @upstash/context7-mcp
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"],
      "autoStart": true
    },
    // claude mcp add playwright npx @playwright/mcp@latest
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"],
      "autoStart": true
    },
    // claude mcp add sequential-thinking npx @modelcontextprotocol/server-sequential-thinking
    // npm install -g @modelcontextprotocol/server-sequential-thinking
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    },
    "memory": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "fetch": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  },
  "defaultPersona": "your-persona-name",
  "personas": {
    "your-persona-name": {
      "systemPrompt": "You are a helpful development assistant...",
      "autoLoad": true
    }
  },
  "autoStartMcp": true
}

설정 적용 방법

  1. 설정 파일 생성/수정: 위 내용을 설정 파일에 저장
  2. Claude Code 재시작: 새로운 세션에서 설정이 적용됨
  3. 확인: claude code --help 또는 claude code --status로 설정 확인

추가 팁

  • 프로젝트별 설정: .claude/ 폴더를 프로젝트 루트에 만들어 프로젝트별 설정도 가능
  • 환경 변수: MCP 서버가 환경 변수를 필요로 한다면 env 필드 추가
  • 로그 확인: MCP 서버 시작 문제가 있다면 claude code --verbose로 디버그

정확한 설정 방법은 Claude Code 버전에 따라 다를 수 있으므로, 최신 문서는 Anthropic 공식 문서에서 확인하시기 바랍니다.

최초 생성일: Invalid Date

최종 수정일: Invalid Date