AI.zip
  • AI 모델
  • 방법론
  • AI 서비스
  • 가격 비교
  • 블로그

AI.zip

AI 모델, 서비스, 방법론을 큐레이션하는 에디토리얼 플랫폼

탐색

  • AI 모델
  • AI 서비스
  • 방법론
  • 블로그

커뮤니티

  • 소개
  • 디스코드 참여
  • 문의

법적고지

  • 이용약관
  • 개인정보처리방침

© 2026 ai.zip. All rights reserved.

Discord 커뮤니티
블로그MCP (Model Context Protocol) 완전 가이드: AI 에이전트의 표준 연결 방식

MCP (Model Context Protocol) 완전 가이드: AI 에이전트의 표준 연결 방식

가이드
2026년 4월 3일약 2분

핵심 포인트

  • 1.MCP(Model Context Protocol)는 Anthropic이 2024년 11월 오픈소스로 공개한 AI-도구 연결 표준입니다
  • 2.LLM이 외부 도구, 데이터소스, 서비스에 표준화된 방식으로 접근하게 해줍니다
  • 3.USB-C가 다양한 기기를 표준 포트로 연결하듯, MCP는 AI 모델과 도구를 표준 프로토콜로 연결합니다

MCP란 무엇인가?

MCP(Model Context Protocol)는 Anthropic이 2024년 11월 오픈소스로 공개한 AI-도구 연결 표준입니다. LLM이 외부 도구, 데이터소스, 서비스에 표준화된 방식으로 접근하게 해줍니다.

USB-C가 다양한 기기를 표준 포트로 연결하듯, MCP는 AI 모델과 도구를 표준 프로토콜로 연결합니다.

mermaid
flowchart LR
    subgraph Client["MCP Client (Claude Desktop, IDE)"]
        LLM[Claude LLM]
    end
    subgraph Servers["MCP Servers"]
        FS[파일시스템 서버]
        DB[데이터베이스 서버]
        API[외부 API 서버]
        Custom[커스텀 서버]
    end
    LLM <-->|MCP Protocol| FS
    LLM <-->|MCP Protocol| DB
    LLM <-->|MCP Protocol| API
    LLM <-->|MCP Protocol| Custom

핵심 개념

MCP의 3가지 기능:

  1. Tools — LLM이 호출할 수 있는 함수 (웹 검색, DB 쿼리, API 호출)
  2. Resources — LLM이 읽을 수 있는 데이터 (파일, URL, DB 레코드)
  3. Prompts — 재사용 가능한 프롬프트 템플릿

Claude Desktop에 MCP 연결하기

json
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Documents"]
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_URL": "postgresql://localhost/mydb"
      }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
      }
    }
  }
}

연결 후 Claude에게: "내 Documents 폴더의 파일 목록을 보여줘" → 자동으로 파일시스템 MCP 호출


커스텀 MCP 서버 만들기 (Python)

python
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp import types
import httpx
import json

app = Server("my-custom-server")

@app.list_tools()
async def list_tools() -> list[types.Tool]:
    return [
        types.Tool(
            name="search_products",
            description="상품 데이터베이스에서 검색합니다",
            inputSchema={
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "검색어"},
                    "category": {"type": "string", "description": "카테고리 필터"},
                    "max_results": {"type": "integer", "default": 10}
                },
                "required": ["query"]
            }
        ),
        types.Tool(
            name="get_order_status",
            description="주문 상태를 조회합니다",
            inputSchema={
                "type": "object",
                "properties": {
                    "order_id": {"type": "string"}
                },
                "required": ["order_id"]
            }
        )
    ]

@app.call_tool()
async def call_tool(name: str, arguments: dict) -> list[types.TextContent]:
    if name == "search_products":
        # 실제 DB 또는 API 호출
        async with httpx.AsyncClient() as client:
            response = await client.get(
                "https://api.myshop.com/products",
                params={"q": arguments["query"], "limit": arguments.get("max_results", 10)}
            )
            products = response.json()

        return [types.TextContent(
            type="text",
            text=json.dumps(products, ensure_ascii=False, indent=2)
        )]

    elif name == "get_order_status":
        # 주문 조회 로직
        order = await fetch_order(arguments["order_id"])
        return [types.TextContent(type="text", text=json.dumps(order, ensure_ascii=False))]

    raise ValueError(f"Unknown tool: {name}")

async def main():
    async with stdio_server() as (read_stream, write_stream):
        await app.run(read_stream, write_stream, app.create_initialization_options())

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

MCP 서버 등록

json
// Claude Desktop config에 추가
{
  "mcpServers": {
    "my-shop": {
      "command": "python",
      "args": ["/path/to/my_mcp_server.py"]
    }
  }
}

TypeScript로 MCP 서버 만들기

typescript
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
  CallToolRequestSchema,
  ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";

const server = new Server(
  { name: "weather-server", version: "1.0.0" },
  { capabilities: { tools: {} } }
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [{
    name: "get_weather",
    description: "현재 날씨를 가져옵니다",
    inputSchema: {
      type: "object",
      properties: {
        city: { type: "string", description: "도시명" }
      },
      required: ["city"]
    }
  }]
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "get_weather") {
    const { city } = request.params.arguments as { city: string };
    const weather = await fetchWeather(city);
    return {
      content: [{ type: "text", text: JSON.stringify(weather) }]
    };
  }
  throw new Error(`Unknown tool: ${request.params.name}`);
});

const transport = new StdioServerTransport();
await server.connect(transport);

MCP 활용 사례

mermaid
mindmap
  root((MCP 활용))
    개발 도구
      GitHub 연동
      Jira 티켓 조회
      CI/CD 모니터링
    데이터 분석
      PostgreSQL 쿼리
      BigQuery 분석
      Notion 문서 검색
    비즈니스
      Slack 메시지 전송
      CRM 고객 조회
      ERP 재고 확인
    AI 파이프라인
      벡터 DB 검색
      임베딩 생성
      외부 API 호출

현재 사용 가능한 공식 MCP 서버

  • @modelcontextprotocol/server-filesystem — 파일시스템 읽기/쓰기
  • @modelcontextprotocol/server-github — GitHub API
  • @modelcontextprotocol/server-postgres — PostgreSQL 쿼리
  • @modelcontextprotocol/server-google-drive — Google Drive
  • @modelcontextprotocol/server-slack — Slack 메시지
  • @modelcontextprotocol/server-brave-search — Brave 웹 검색
  • @modelcontextprotocol/server-puppeteer — 브라우저 자동화

MCP는 AI 에이전트 생태계의 USB 포트가 되고 있습니다. 지금 공식 MCP 서버 목록(github.com/modelcontextprotocol/servers)을 확인하고 Claude Desktop에 연결해보세요.

이 글에서 다루는 AI

Anthropic: Claude Sonnet 4.6

Anthropic · 모델

Anthropic: Claude Opus 4.6

Anthropic · 모델

Anthropic: Claude Sonnet 4.5

Anthropic · 모델

관련 글 더 보기

가이드2026년 4월 6일

AI 재귀적 자기 개선 완전 가이드: 특이점 논쟁부터 실전 활용까지

비교2026년 4월 6일

Cursor vs GitHub Copilot vs Windsurf: AI 코딩 어시스턴트 비교 (2026)

비교2026년 4월 6일

GPT-5.4 vs Claude Opus 4.6 vs Gemini 2.5 Pro: 2026 플래그십 AI 비교

비교2026년 4월 6일

Auto Research vs AutoML: LLM 자율 연구와 자동 ML의 핵심 차이

ai.zip 커뮤니티에 참여하세요

AI 소식·유용한 링크 공유, 새 모델/서비스 토론까지 -- Discord에서 함께해요.

Discord 참여하기

이전글

이번 주 AI 모델 위클리 — 2026-04-03: Google Gemma 4 완전 분석

다음글

Harness Engineering: AI 에이전트를 프로덕션에서 안전하게 운영하는 5가지 원칙

댓글

0개

댓글을 작성하려면

로그인

해주세요

글 정보

가이드
2026년 4월 3일2분

관련 글

AI 재귀적 자기 개선 완전 가이드: 특이점 논쟁부터 실전 활용까지

가이드

Cursor vs GitHub Copilot vs Windsurf: AI 코딩 어시스턴트 비교 (2026)

비교

GPT-5.4 vs Claude Opus 4.6 vs Gemini 2.5 Pro: 2026 플래그십 AI 비교

Anthropic: Claude 3.5 Sonnet

Anthropic · 모델

Claude

서비스

Claude API

서비스

Cursor

서비스

Claude Code

서비스

MCP (Model Context Protocol)

방법론

Agentic Workflow

방법론

Foundation Model API Strategy

방법론

Context Window Management

방법론

비교

Auto Research vs AutoML: LLM 자율 연구와 자동 ML의 핵심 차이

비교

Cursor vs Claude Code vs Copilot: 2026 AI 코딩 어시스턴트 최종 비교

비교

관련 모델

Anthropic: Claude Sonnet 4.6

Anthropic

Anthropic: Claude Opus 4.6

Anthropic

Anthropic: Claude Sonnet 4.5

Anthropic

관련 서비스

Claude

Claude API

Cursor

관련 방법론

MCP (Model Context Protocol)

Agentic Workflow

Foundation Model API Strategy