본문 바로가기
C.W.K.
Stream
Lesson 09 of 13 · published

MCP 연동 — 서버, 전송 방식, 적용 범위

~18 min · mcp, model-context-protocol, integrations

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

MCP로 Claude를 실제 서비스와 연결해

MCP(Model Context Protocol)는 Claude에게 기본 도구 밖의 기능을 붙이는 개방형 표준이야. 서버가 함수 목록을 내놓으면 Claude는 그 함수를 다른 도구처럼 호출해. Sentry의 실제 오류를 찾고, Slack에 글을 쓰고, Notion이나 Postgres를 조회하는 일이 같은 방식으로 이어져.

로컬 프로그램은 보통 stdio로 띄우고, 원격 서비스는 Streamable HTTP로 연결해. 오래된 설정에는 SSE가 남아 있을 수 있지만 새 원격 연결은 HTTP가 기준이야. 설정 범위도 현재 프로젝트만 쓰는 local, 팀과 나누는 project, 모든 프로젝트에 적용하는 user로 나뉘어.

어느 범위를 고를지는 누가 이 연결을 필요로 하는지로 정하면 돼. 개인 실험은 local, 팀 모두가 써야 하면 .mcp.json으로 project 설정을 커밋하고, 비밀값은 파일에 적지 말고 환경변수로 주입해.

공개 MCP 서버만 1,800+개야. 원격 연결은 2025-06-18 명세부터 Streamable HTTP가 기준이고 SSE는 이전 방식으로 남아 있어.

직접 확인할 항목: ~/.claude.json.

Code

유용한 MCP 서버 세 개 추가하기·bash
# Sentry (read your live errors during a debugging session)
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp

# GitHub (PR reviews, issue creation, code search)
claude mcp add --transport http github https://api.githubcopilot.com/mcp/

# Local Postgres (read-only analytics)
claude mcp add --transport stdio analytics-db -- \
  npx -y @bytebase/dbhub --dsn "postgresql://readonly:pw@localhost:5432/analytics"

# After adding, authenticate OAuth ones from inside Claude Code:
/mcp
프로젝트용 .mcp.json 만들고 커밋하기·json
{
  "mcpServers": {
    "sentry":  { "type": "http", "url": "https://mcp.sentry.dev/mcp" },
    "github":  { "type": "http", "url": "https://api.githubcopilot.com/mcp/" },
    "linear":  { "type": "http", "url": "https://mcp.linear.app/mcp" },
    "local-db": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@bytebase/dbhub", "--dsn", "${DATABASE_URL}"],
      "env": {}
    }
  }
}

External links

Exercise

실제 프로젝트에 MCP 서버를 2개 이상 추가해. 하나는 Sentry, GitHub, Linear 같은 외부 서비스로, 다른 하나는 데이터베이스나 파일 시스템을 다루는 로컬 stdio 서버로 골라. .mcp.json을 커밋하고, 한 작업에서 두 연결을 모두 쓰도록 Claude에 요청해 봐.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.