Loading...
    • 개발자 가이드
    • API 참고자료
    • MCP
    • 리소스
    • 릴리스 노트
    Search...
    ⌘K

    첫 번째 단계

    Claude 소개빠른 시작

    모델 및 가격

    모델 개요모델 선택하기Claude 4.5의 새로운 기능Claude 4.5로 마이그레이션모델 지원 중단가격 정책

    Claude로 빌드하기

    기능 개요Messages API 작업컨텍스트 윈도우프롬프트 작성 모범 사례

    기능

    프롬프트 캐싱컨텍스트 편집확장된 사고스트리밍 메시지배치 처리인용다국어 지원토큰 카운팅임베딩비전PDF 지원Files API검색 결과Google Sheets 애드온

    도구

    개요도구 사용을 구현하는 방법토큰 효율적인 도구 사용세밀한 도구 스트리밍Bash 도구코드 실행 도구컴퓨터 사용 도구텍스트 편집기 도구웹 페치 도구웹 검색 도구메모리 도구

    에이전트 스킬

    개요빠른 시작Skill 작성 모범 사례Skills 사용하기

    Agent SDK

    개요Agent SDK 참조 - TypeScriptPython SDK

    가이드

    스트리밍 입력권한 처리세션 관리Agent SDK 호스팅시스템 프롬프트 수정하기SDK에서의 MCP사용자 정의 도구SDK의 서브에이전트SDK의 슬래시 명령어SDK의 에이전트 스킬비용 및 사용량 추적할 일 목록SDK의 플러그인

    API의 MCP

    MCP 커넥터원격 MCP 서버

    타사 플랫폼의 Claude

    Amazon BedrockVertex AI

    프롬프트 엔지니어링

    개요프롬프트 생성기프롬프트 템플릿 사용하기프롬프트 개선기명확하고 직접적으로예시(멀티샷 프롬프팅) 사용Claude가 생각하도록 하기(CoT)XML 태그 사용Claude에게 역할 부여하기 (시스템 프롬프트)Claude의 응답 미리 채우기복잡한 프롬프트 체이닝긴 컨텍스트 팁확장 사고 팁

    테스트 및 평가

    성공 기준 정의하기테스트 케이스 개발평가 도구 사용하기지연 시간 줄이기

    보안 강화

    환각 현상 줄이기출력 일관성 높이기탈옥 완화handle-streaming-refusals프롬프트 유출 감소Claude의 캐릭터 유지

    관리 및 모니터링

    Admin API 개요사용량 및 비용 APIClaude Code Analytics API
    Console
    API의 MCP

    MCP 커넥터

    Claude의 Model Context Protocol (MCP) 커넥터 기능을 사용하여 별도의 MCP 클라이언트 없이 Messages API에서 직접 원격 MCP 서버에 연결하는 방법을 알아보세요.

    Claude의 Model Context Protocol (MCP) 커넥터 기능을 사용하면 별도의 MCP 클라이언트 없이 Messages API에서 직접 원격 MCP 서버에 연결할 수 있습니다.

    이 기능을 사용하려면 베타 헤더가 필요합니다: "anthropic-beta": "mcp-client-2025-04-04"

    주요 기능

    • 직접 API 통합: MCP 클라이언트를 구현하지 않고도 MCP 서버에 연결
    • 도구 호출 지원: Messages API를 통해 MCP 도구에 액세스
    • OAuth 인증: 인증된 서버를 위한 OAuth Bearer 토큰 지원
    • 다중 서버: 단일 요청에서 여러 MCP 서버에 연결

    제한사항

    • MCP 사양의 기능 세트 중에서 현재 도구 호출만 지원됩니다.
    • 서버는 HTTP를 통해 공개적으로 노출되어야 합니다(Streamable HTTP 및 SSE 전송 모두 지원). 로컬 STDIO 서버는 직접 연결할 수 없습니다.
    • MCP 커넥터는 현재 Amazon Bedrock 및 Google Vertex에서 지원되지 않습니다.

    Messages API에서 MCP 커넥터 사용

    원격 MCP 서버에 연결하려면 Messages API 요청에 mcp_servers 매개변수를 포함하세요:

    cURL
    curl https://api.anthropic.com/v1/messages \
      -H "Content-Type: application/json" \
      -H "X-API-Key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: mcp-client-2025-04-04" \
      -d '{
        "model": "claude-sonnet-4-5",
        "max_tokens": 1000,
        "messages": [{"role": "user", "content": "What tools do you have available?"}],
        "mcp_servers": [
          {
            "type": "url",
            "url": "https://example-server.modelcontextprotocol.io/sse",
            "name": "example-mcp",
            "authorization_token": "YOUR_TOKEN"
          }
        ]
      }'
    TypeScript
    import { Anthropic } from '@anthropic-ai/sdk';
    
    const anthropic = new Anthropic();
    
    const response = await anthropic.beta.messages.create({
      model: "claude-sonnet-4-5",
      max_tokens: 1000,
      messages: [
        {
          role: "user",
          content: "What tools do you have available?",
        },
      ],
      mcp_servers: [
        {
          type: "url",
          url: "https://example-server.modelcontextprotocol.io/sse",
          name: "example-mcp",
          authorization_token: "YOUR_TOKEN",
        },
      ],
      betas: ["mcp-client-2025-04-04"],
    });
    Python
    import anthropic
    
    client = anthropic.Anthropic()
    
    response = client.beta.messages.create(
        model="claude-sonnet-4-5",
        max_tokens=1000,
        messages=[{
            "role": "user",
            "content": "What tools do you have available?"
        }],
        mcp_servers=[{
            "type": "url",
            "url": "https://mcp.example.com/sse",
            "name": "example-mcp",
            "authorization_token": "YOUR_TOKEN"
        }],
        betas=["mcp-client-2025-04-04"]
    )

    MCP 서버 구성

    mcp_servers 배열의 각 MCP 서버는 다음 구성을 지원합니다:

    {
      "type": "url",
      "url": "https://example-server.modelcontextprotocol.io/sse",
      "name": "example-mcp",
      "tool_configuration": {
        "enabled": true,
        "allowed_tools": ["example_tool_1", "example_tool_2"]
      },
      "authorization_token": "YOUR_TOKEN"
    }

    필드 설명

    속성타입필수설명
    typestring예현재 "url"만 지원됩니다
    urlstring예MCP 서버의 URL. https://로 시작해야 합니다
    namestring예이 MCP 서버의 고유 식별자. mcp_tool_call 블록에서 서버를 식별하고 모델에 도구를 구분하는 데 사용됩니다.
    tool_configurationobject아니오도구 사용 구성
    tool_configuration.enabledboolean아니오이 서버의 도구를 활성화할지 여부 (기본값: true)
    tool_configuration.allowed_toolsarray아니오허용할 도구를 제한하는 목록 (기본적으로 모든 도구가 허용됨)
    authorization_tokenstring아니오MCP 서버에서 필요한 경우 OAuth 인증 토큰. MCP 사양을 참조하세요.

    응답 콘텐츠 타입

    Claude가 MCP 도구를 사용할 때 응답에는 두 가지 새로운 콘텐츠 블록 타입이 포함됩니다:

    MCP 도구 사용 블록

    {
      "type": "mcp_tool_use",
      "id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
      "name": "echo",
      "server_name": "example-mcp",
      "input": { "param1": "value1", "param2": "value2" }
    }

    MCP 도구 결과 블록

    {
      "type": "mcp_tool_result",
      "tool_use_id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
      "is_error": false,
      "content": [
        {
          "type": "text",
          "text": "Hello"
        }
      ]
    }

    다중 MCP 서버

    mcp_servers 배열에 여러 객체를 포함하여 여러 MCP 서버에 연결할 수 있습니다:

    {
      "model": "claude-sonnet-4-5",
      "max_tokens": 1000,
      "messages": [
        {
          "role": "user",
          "content": "Use tools from both mcp-server-1 and mcp-server-2 to complete this task"
        }
      ],
      "mcp_servers": [
        {
          "type": "url",
          "url": "https://mcp.example1.com/sse",
          "name": "mcp-server-1",
          "authorization_token": "TOKEN1"
        },
        {
          "type": "url",
          "url": "https://mcp.example2.com/sse",
          "name": "mcp-server-2",
          "authorization_token": "TOKEN2"
        }
      ]
    }

    인증

    OAuth 인증이 필요한 MCP 서버의 경우 액세스 토큰을 얻어야 합니다. MCP 커넥터 베타는 MCP 서버 정의에서 authorization_token 매개변수 전달을 지원합니다. API 소비자는 API 호출을 하기 전에 OAuth 플로우를 처리하고 액세스 토큰을 얻을 뿐만 아니라 필요에 따라 토큰을 새로 고칠 것으로 예상됩니다.

    테스트용 액세스 토큰 얻기

    MCP 인스펙터는 테스트 목적으로 액세스 토큰을 얻는 과정을 안내할 수 있습니다.

    1. 다음 명령으로 인스펙터를 실행합니다. 컴퓨터에 Node.js가 설치되어 있어야 합니다.

      npx @modelcontextprotocol/inspector
    2. 왼쪽 사이드바에서 "Transport type"에 대해 "SSE" 또는 "Streamable HTTP"를 선택합니다.

    3. MCP 서버의 URL을 입력합니다.

    4. 오른쪽 영역에서 "Need to configure authentication?" 다음에 있는 "Open Auth Settings" 버튼을 클릭합니다.

    5. "Quick OAuth Flow"를 클릭하고 OAuth 화면에서 인증합니다.

    6. 인스펙터의 "OAuth Flow Progress" 섹션의 단계를 따르고 "Authentication complete"에 도달할 때까지 "Continue"를 클릭합니다.

    7. access_token 값을 복사합니다.

    8. MCP 서버 구성의 authorization_token 필드에 붙여넣습니다.

    액세스 토큰 사용

    위의 OAuth 플로우 중 하나를 사용하여 액세스 토큰을 얻은 후 MCP 서버 구성에서 사용할 수 있습니다:

    {
      "mcp_servers": [
        {
          "type": "url",
          "url": "https://example-server.modelcontextprotocol.io/sse",
          "name": "authenticated-server",
          "authorization_token": "YOUR_ACCESS_TOKEN_HERE"
        }
      ]
    }

    OAuth 플로우에 대한 자세한 설명은 MCP 사양의 인증 섹션을 참조하세요.

    • Messages API에서 MCP 커넥터 사용
    • MCP 서버 구성
    • MCP 도구 사용 블록
    • MCP 도구 결과 블록
    • 다중 MCP 서버
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC