MCP와 Vibe Coding(바이브코딩) 추천 세팅 설정 ver.25년

jinhan han·2025년 6월 30일
0

바이브 코딩

목록 보기
2/2
post-thumbnail

해외 커뮤니티에선 윈드서프가 객체화나 디렉토리 전략에선 커서보다 더 낫다는 의견이 우세함 --25년 5월--

1. 바이브코딩 도구 Rules 설정

바이브코딩에서 Rule의 개념

바이브코딩에선 System prompt 개념과 동일한 rule이란 개념이 존재

글로벌 규칙 (Global Rules) (global_rules.md): 모든 워크스페이스에 공통으로 적용됩니다.

Workspace (Local Rules) (.windsurfrules): 특정 워크스페이스에만 적용됩니다.

규칙 추가

채팅창 우측 상단 - customization 누르면 rules 세팅 열림
global 규칙 추가는 코딩시에 항상 적용됨

아래는 work space - 부분 규칙 추가
python.md 라는 이름으로 규칙 추가


아래는 work space - 부분 규칙 설정 전략

Activation mode 종류

  • Manual -- '@워크스페이스rule이름'을 붙여서 활성화 가능
  • Always On -- 항상 활성화 가능
  • Model Decision -- 상황 설명을 추가해놓고, 그 상황에 직면 했을때 워크스페이스rule 활성화
  • Glob -- 특정 파일이나 디렉토리 구조에서 워크스페이스rule 활성화

위 그림에선 glob로 선정했고 아래처럼 rule을 선정했다.
Activation mode

This rule applies to all *.py files.


아래는 선정한 **Python Rules** (프롬프트 강화 적용) 띄워 쓰기를 구조적으로 하면 더 효과적으로 프롬프트 강화 가능
Target : when code in Python 3.10+ features (structural pattern matching, union operators, parenthesized context managers)

- Implement proper generic types where applicable

# Core Development Standards
## Error Handling & Robustness
- Implement comprehensive exception handling with specific exception types
- Use context managers for resource management
- Validate input parameters and return meaningful error messages
- Log errors with appropriate severity levels using structured logging

# Code Quality Guidelines

## Documentation & Comments
- Write comprehensive docstrings for all public functions and classes
- Add inline comments for complex algorithms and business logic

## Code Style & Formatting
- Follow PEP 8 style guidelines strictly
- Use consistent naming conventions (snake_case for functions/variables, PascalCase for classes)

# Development Workflow
## Code Quality Verification
- Execute linting with ruff or pylint
- Format code with black
- Verify no security vulnerabilities with bandit
- Run static type checking with mypy

## Testing Strategy (context-dependent)
### Baseline Requirements (All Projects)
- Validate edge cases and error conditions
- Test happy path functionality

### Additional for Production
- Integration tests with mocked external services
- Performance benchmarks for critical paths
- Load testing for concurrent operations

## Deployment Readiness
- Test pip package detection and installation
- Ensure both CLI and interactive modes function correctly

# Development Tools (Optional)
Formatting: black(코드 포매터)
Linting: ruff(초고속 린터 코드 스타일 분석), pylint(종합 분석 도구)
Security: bandit(보안 취약점 스캐너), safety(설치 패키지 보안 위험 관리) 
Performance: py-spy(프로세스 성능 분석), memory-profiler(메모리 사용량 분석)
Test: pytest, coverage
Dependency: Poetry

## Production Services
- Apply all guidelines strictly
- Full documentation and performance optimization
- Implement monitoring and logging strategies

## Data Science Projects
- Emphasize: Data validation, reproducible results
- Use appropriate libraries (pandas, numpy, scikit-learn)
- Document data processing steps and assumptions
- Handle missing values and edge cases gracefully

프롬프트는 반복되는 말이 많으면 혼란을 가중 시키므로 그 부분을 조심히 한다.


Global Rule (User Rule) (프롬프트 강화 적용)
개발에 항상 적용되는 rule 프롬프트

# Role
Professional software engineer developing production-ready services with clean architecture, applying SOLID principles and some GoF Design Patterns, and functional programming concepts optimized for automated development environments.

1. Core Development Standards
## Error Handling & Robustness
- Implement exception handling with specific exception types
- Validate input parameters 
- Log errors with appropriate severity levels using structured logging
## Performance & Optimization
- Use context7 mcp
- Profile code performance for critical paths
- Use appropriate data structures and algorithms
- Optimize for memory efficiency when handling large datasets
- Avoid over-engineering: do not introduce unnecessary abstraction and complexity
## Security Considerations
- Use environment variables for sensitive configuration
- Implement proper authentication and authorization patterns
- Avoid hardcoded secrets and credentials

2. Code Quality Guidelines
## Structure & Maintainability
- Single Responsibility: One function, one clear purpose
- Keep functions under 20 lines when possible
- Use descriptive variable and function names (no abbreviations)
- Organize code blocks logically
- Organize imports/includes following language conventions
- Group related functionality into cohesive modules/packages
- Apply appropriate design patterns contextually
## Documentation & Comments
- Include parameter types, return types, and example usage in comments
- Add clear comments for complex logic and business decisions
- Document design decisions and architectural choices
## Code Style & Formatting
- Use consistent naming conventions
- Maintain line length under 88 characters

3. AI-Assisted Development Guidelines
- Provide clear, actionable code suggestions with rationale
- Include alternative implementation approaches when relevant
- Explain trade-offs between different solutions

4. Development Workflow
## Code Quality Verification
- Perform static type checking where applicable
## Testing Strategy (context-dependent, optional)
- Write unit tests for all core business logic
- Include integration tests for external dependencies
## Deployment Readiness
- Verify all dependencies are properly declared
- Ensure proper configuration management
- Validate environment setup

5. Context-Specific Applications
## Simple Scripts & Prototypes
- Prioritize: Type hints, error handling, clean structure
- Focus: Quick implementation with maintainable code

추가 정보 Workflows

rules 선택창 옆에 Workflows가 존재
Workflows는 특정 명령어 설정으로 작업 순서 flows를 정하고 자동으로 작업 진행하는 기능(자유도에 약간의 제한 존재)

참조 링크:
https://www.paulmduvall.com/using-windsurf-rules-workflows-and-memories/

2. 바이브코딩 MCP 설정

LLM의 이해도를 위하여 수정하려는 코드와 Rule을 언급하며 코드 수정

채팅에서 "@"를 쳐서 해당 코드 이름을 언급하던가, "+"를 클릭하여 필요 파일 선택


클로드코드는 함수나 클래스 하나 단위에서 문제 해결력 최고 -25년5월-

아래 링크는 바이브코딩 도구와 클로드코드를 함께 사용하는 방법이 기재 되있음.
https://velog.io/@path_creator/zed-ai-%EC%9C%88%EB%8F%84%EC%9A%B0-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EC%84%B8%ED%8C%85

Windsurf 핵심 기능

  • SWE-1 모델 사용 : 작업 플로우나 프로젝트 구조 형성에 특화된 윈드서프 전용 모델. 따라서 초반에 프로젝트 구성이나 배포 형태는 SWE-1 모델을 사용

참조: https://apidog.com/kr/blog/windsurf-swe-1-kr/

  • cascade 기능 : 작업들의 메모리를 관리하고 인지하는 기능 -현재 Cursor도 이와 유사한 기능 존재
  • browser 분석 기능 : 해당 브라우저 분석 기능을 클릭하고 해당 브라우저의 프론트앤드를 복사 활용 가능

  • plan mode 기능 : 현재 구성하려는 프로젝트의 설명을 듣고 이에 맞게 프로젝트의 작업 순서를 구성하여 단기, 시스템 프롬프트를 구성해준다.

ai 채팅창에서 우측 하단의 버튼을 누르고 이에 맞는 프롬프트를 넣으면 됨.

! 주의 : mcp 적용하기 이전에 plan mode가 발동되기 때문에 mcp 적용 이후 새채팅에서 플랜을 짜는식으로 전략을 쓰는 것이 유용


Windsurf mcp 설치법

file - > preference -> windsurf setting -> mcp라 검색

open plugin store 메뉴 선택 -> 필요한 mcp 검색


여러 외부 mcp 설치법 리스트 모음
https://himcp.ai/ -- 분야별 MCP 정보 모음

https://smithery.ai/ -- 각 ai의 MCP 정보들과 설치법 + 웹에서 MCP를 테스트 할 수 있는 도구

https://github.com/modelcontextprotocol/servers/tree/main?tab=readme-ov-file -- 각 ai의 MCP 설치법 링크

MCP 설치 방법 3가지

  • 로컬 설치
  • npx(속도 더빠름)나 pip 으로 터미널에서 설치 (선호 가장 간단)
  • smithery 같은 서버에서 설치하고 관리 접속 (불안정한 편)
  • mcp manage plugin에 필요한 mcp를 mcp_config.json에 복사 붙여 넣기

mcp manage plugin json 파일 예제

{
  "mcpServers": {

    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ],
      "env": {}
    },

    "context7": {
      "command": "npx",
      "args": [
        "-y",
        "@upstash/context7-mcp@latest"
      ],
      "disabledTools": []
    },

    "mcp-supermemory-ai": {
      "command": "npx",
      "args": [
        "-y",
        "supergateway",
        "--sse",
       "https://mcp.supermemory.ai/4dfYOz_KTNMRWCqpcCLXq/sse"
      ]
    }
   
}

추천 MCP 설치법

Super Memory
메모리를 체계적으로 저장하는 mcp로 외부에서 따로 설치

링크 : https://mcp.supermemory.ai/

DuckDuckGo Search Server
옛날 정보가 아닌 최근 정보 위주로 인터넷에 접근하여 결과를 보여주는mcp

https://smithery.ai/server/@nickclyde/duckduckgo-mcp-server
사이트에 접속하여, 해당 ai 도구에 맞게 설치

npx -y @smithery/cli@latest install @nickclyde/duckduckgo-mcp-server --client windsurf --key 8bee2c34-a3eb-4cfc-b687-455c6ec5c6ff

위 명령어 터미널이나 power shell에서 설치

sequential-thinking
프롬프트를 읽고 단계적으로 해석하거나 cot화 시키면서 프롬프트 강화하는 mcp -- 사용시 시간이 오래걸리는 단점 발생
아래처럼 mcp_config.json에 sequential-thinking을 추가하여 정착

{
  "mcpServers": {
   
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"],
      "env": {}
    }
}

Extension 설치 추천

Markdown Preview Mermaid Support
다이어그램이나 코드의 클래스 구조, 프로젝트의 도식화 등을 markdown 언어로 구성가능

참고 : https://velog.io/@brown_eyed87/221006Mermaid%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%9C-Markdown-%EC%9E%91%EC%84%B1

Shortcut menu bar

https://marketplace.visualstudio.com/items?itemName=jerrygoyal.shortcut-menu-bar

indent-rainbow
코드의 들여쓰기 띄워쓰기를 색깔로 표시해주는 띄워쓰기 표시 도구

Code Spell Checker
코드의 잘못된 스펠링 밑줄 쳐줌

Bookmarks
북마크 가능한 익스텐션

  • 마우스 우클릭 후 add bookmark로 코드 라인 북마크
    Ruff
    파이썬에 특화된 포맷터 ctrl+shift+p로 선택한 코드 자동 포맷 정리
  • Shift+alt+F로 선택된 코드 블록 자동 포맷화

Prettier
다른 일반적인 언어의 포맷터

Surround
제어문이나 조건문을 자동 생성

  • 변수 마우스로 선택 후, Ctrl+Shift+t 누르면 제어문 선택 리스트 노출

Bracket Pair Colorizer 2
코드의 괄호를 등차별로 다양한 색깔을 입혀줌

Output Colorizer
로그에 색깔을 입혀 가독성에 특화함

Better Colorizer
json이나 git등에 색깔을 입혀 가독성에 특화함

DotENV
env파일에 색깔을 입혀 가독성에 특화함

colorize
css나 프론트앤드에서 색깔 코드 자동으로 색깔로 변환된 하일라이트 쳐줌

Error Lens
실시간 오류를 하이라이트로 표시함

GitLens
VSCode 내에서 GIT 버젼 관리와 코딩을 동시에 수행하는데 가능

git graph
git hub 작업을 flow 그래프 형태로 협업 확인 가능

바이브코딩+MCP 활용

!!주의 : mcp는 chat 창에서 "@"를 붙이고 mcp 명칭을 불러 활용하는 경우가 많다. 자동으로 mcp가 발동되는 경우도 있지만 안그런경우도 많다.

단계 1: 프로젝트 기획 및 시장 조사

목표: 트렌드 파악 및 기술 환경 분석
DuckDuckGo MCP 활용
프롬프트 예:

AI 백엔드 서비스에서 가장 많이 사용되는 Python 프레임워크 디렉토리 구조 찾아줘 USE DuckDuckGo MCP

단계 2: 기술 스택 선택 및 아키텍처 설계

Context7 + Sequential Thinking 조합 활용
프롬프트 예:

FastAPI의 최신 비동기 처리 방법과 WebSocket 구현 방법 알려줘. use context7

SQLAlchemy 2.0의 새로운 ORM 패턴과 성능 최적화 방법 설명해줘. use context7

Sequential Thinking

위에서 조사한 기술들을 바탕으로 실시간 데이터 분석 백엔드 아키텍처를 단계별로 설계해줘. Use Sequential Thinking
고려사항:

  • 예상 동시 사용자: 10,000명
  • 실시간 데이터 처리량: 초당 1,000건
  • 데이터 지연시간: 100ms 이하
  • 확장성과 유지보수성 중시

Supermemory에 설계 결정 저장

방금 설계한 아키텍처의 핵심 결정사항들을 내 프로젝트 메모리에 저장해줘:

  • 선택한 기술 스택과 이유
  • 성능 요구사항
  • 아키텍처 패턴 결정 근거

단계 3: 개발 환경 설정 및 초기 구현

"FastAPI + SQLAlchemy + Redis + Docker를 사용한 최신 프로젝트 구조와 설정 방법 알려줘. use context7"

"Poetry를 사용한 Python 의존성 관리와 가상환경 설정 최신 방법 보여줘. use context7"

"Docker Compose를 사용한 개발 환경 구성 베스트 프랙티스 알려줘. use context7"

단계 4: 문제 해결 및 성능 최적화

"FastAPI의 dependency injection을 사용한 데이터베이스 연결 풀 최적화 방법 알려줘. use context7"

"FastAPI의 ** 서비스 코드 만들어줘. use context7"

Memory bank rule 활용 (자동 프로젝트 업데이트와 메모리 기록)

사용 이점 :

  • 프로젝트 맥락 플로우 유지에 효과적(정교한 프로젝트 구성 서포트)
  • 프로젝트 구조 업데이트시 자동 기록(프로젝트 진행 현황 추적 기능)
  • LLM의 인식 구조 개선과 더 빠른 코드 생성
  • 목적에 맞춘 개발 전략 자동 업데이트

활용하기에 앞서 auto-generate-memories를 끈다

이후 Workspace에서 memory-bank.md 생성
경로 예 : C:\Users\USER.....windsurf\rules에서 생성

아래처럼 5가지
decisionLog.md:
트리거: "중대한 아키텍처 결정이 내려질 때 (새 구성요소, 데이터 흐름 변경, 기술 선택 등)."
productContext.md:
트리거: "고수준 프로젝트 설명, 목표, 기능 또는 전체 아키텍처가 크게 변경될 때."
systemPatterns.md:
트리거: "새로운 아키텍처 패턴이 도입되거나 기존 패턴이 수정될 때."
activeContext.md:
트리거: "현재 작업 초점이 변경되거나 중요한 진전이 있을 때."
progress.md:
트리거: "작업이 시작되거나 완료되거나 상태가 변경될 때."

memory-bank.md 프롬프트

memory_system_rules:
primary_system: "memory-bank"

initialization:
trigger: "first_interaction"
priority: "immediate"
required: true
actions:
- "Before doing ANYTHING else, read and fully internalize ALL rules in this file."
- "Check if memory-bank/ directory exists."
- "If memory-bank exists: Read all core files (productContext.md, activeContext.md, systemPatterns.md, decisionLog.md, progress.md). Set status to [MEMORY BANK: ACTIVE]."
- "If memory-bank does NOT exist: Inform user. Ask to create and provide yes and no response choices. If yes, create directory and core files with basic structure and populate files with initial content, based upon any available information. If no, set status to [MEMORY BANK: INACTIVE]."
- "Load context from memory-bank files if active."
- "Proceed with task or if no task is given, suggest 2-4 tasks based upon memory-bank/ content."

validation:
- "Verify memory-bank status (ACTIVE/INACTIVE)."
- "If ACTIVE, confirm core files were read."

system_validation:
startup:
- "Verify .windsurfrules loaded"
- "Check memory-bank accessibility if expected"
- "Confirm initialization sequence complete"

memory_bank:
core_files:
activeContext.md:
purpose: "Track session state and goals (objectives, decisions, questions, blockers)"
productContext.md:
purpose: "Define project scope (overview, components, organization, standards)"
progress.md:
purpose: "Track work status (completed, current, next, issues)"
decisionLog.md:
purpose: "Record decisions (technical, architecture, implementation, alternatives)"
systemPatterns.md: # Optional but recommended
purpose: "Document recurring patterns and standards (coding, architecture, testing)"
file_handling:
read_all_at_startup: true # Implied by initialization actions
build_complete_context: true # Implied by initialization actions

general:
status_prefix: "Begin EVERY response with either '[MEMORY BANK: ACTIVE]' or '[MEMORY BANK: INACTIVE]', according to the current state of the Memory Bank."

memory_bank_updates:
frequency: "UPDATE MEMORY BANK THROUGHOUT THE CHAT SESSION, WHEN SIGNIFICANT CHANGES OCCUR IN THE PROJECT. Use judgment to determine significance."
decisionLog.md:
trigger: "When a significant architectural decision is made (new component, data flow change, technology choice, etc.)."
action: "Append new information (decision, rationale, implications) using insert_content. Never overwrite. Include timestamp."
format: "[YYYY-MM-DD HH:MM:SS] - [Summary of Decision]"
productContext.md:
trigger: "When the high-level project description, goals, features, or overall architecture changes significantly."
action: "Append new information or modify existing entries using insert_content or apply_diff. Append timestamp and summary as footnote."
format: "[YYYY-MM-DD HH:MM:SS] - [Summary of Change]"
systemPatterns.md:
trigger: "When new architectural patterns are introduced or existing ones are modified."
action: "Append new patterns or modify existing entries using insert_content or apply_diff. Include timestamp."
format: "[YYYY-MM-DD HH:MM:SS] - [Description of Pattern/Change]"
activeContext.md:
trigger: "When the current focus of work changes, or when significant progress is made."
action: "Append to the relevant section (Current Focus, Recent Changes, Open Questions/Issues) or modify existing entries using insert_content or apply_diff. Include timestamp."
format: "[YYYY-MM-DD HH:MM:SS] - [Summary of Change/Focus/Issue]"
progress.md:
trigger: "When a task begins, is completed, or its status changes."
action: "Append the new entry using insert_content. Never overwrite. Include timestamp."
format: "[YYYY-MM-DD HH:MM:SS] - [Summary of Progress Update]"

umb: # Update Memory Bank command
trigger: "^(Update Memory Bank|UMB)$"
instructions:
- "Halt Current Task: Stop current activity."
- "Acknowledge Command: Respond with '[MEMORY BANK: UPDATING]'."
- "Review Chat History: Analyze the complete current chat session."
core_update_process: |
1. Current Session Review: Analyze chat history for relevant decisions, context changes, progress updates, clarifications etc.
2. Comprehensive Updates: Update relevant memory bank files based on the review, following the rules defined in 'memory_bank_updates'.
3. Memory Bank Synchronization: Ensure consistency across updated files.

task_focus: "During UMB, focus ONLY on capturing information explicitly present in the current chat session (clarifications, decisions, progress). Do NOT summarize the entire project or perform actions outside this scope."
cross_mode_updates: "Capture relevant information from the chat session irrespective of conceptual 'modes' mentioned, adding it to the appropriate Memory Bank files."

post_umb_actions:
- "State: Memory Bank fully synchronized based on current chat session."
- "State: Session context preserved for continuation."

원리 : 위 프롬프트는 여러 목적에 따른 프롬프트들을 생성하고 작업 변경사항이 생기면 자동으로 프롬프트들이 변형된다.

출처 : https://github.com/GreatScottyMac/cascade-memory-bank?tab=readme-ov-file

바이브코딩시에 Memorial bank 사용법

  1. 빈 디렉토리 생성
  2. 만든 디렉토리에 memory-bank 디렉토리 생성
    progress, activeContext, systemPatterns, productContext, decisionLog 등의 목적으로 작업 기록과 개발 방법론 패턴 적용
  3. 아래처럼 first_interaction 치고 요구사항 치기

    예시 최초의 프롬프트
    first_interaction
    python 3.10+
    fastapi Pydantic v2 기반
    uvicorn 0.29.0
    python-dotenv 1.0.1 .env 기반 설정 관리
    httpx 0.27.0 외부 API 호출용
    pydantic 2.7.1 FastAPI 기본 모델
    sqlalchemy 2.0.30 ORM
    alembic 1.13.1 DB 스키마 관리
    asyncpg 0.29.0 PostgreSQL 전용이며 도커에서 활용

위와 같은 프롬프트를 최조로 생성한다면 자동으로 메모리 관리 프롬프트 rule과 개발 관련 방법론 프롬프트 rule이 생성하여 목적에 따른 작업 기록틀을 memory-bank에 생성

아래처럼 해당 프로젝트의 memory-bank에서 새로운 rule들+기록 일지가 .md로 생성됨

앞으로 작업이 변경이 많아지거나 할때마다. 몇몇 기록이 자동 업데이트됨

추가 : 현재 memomry-bank.md는 더 강화가 가능한 rule로 개선이 가능하며 여러 목적을 가진 rule을 생성되도록 하는게 건강한 바이브코딩 설계 방향이다.

profile
개발자+분석가+BusinessStrategist

0개의 댓글