서드파티 MCP 서버

Model Context Protocol (MCP) 입문

James Chapman

AI Curriculum Manager, DataCamp

서드파티 MCP 서버를 사용하는 이유

 

  • 속도: 서버를 직접 작성하지 않고 파일시스템 및 데이터베이스에 접근

mcp-archive.png

Model Context Protocol (MCP) 입문

서드파티 MCP 서버를 사용하는 이유

 

  • 속도: 서버를 직접 작성하지 않고 파일시스템 및 데이터베이스에 접근
  • 유지 관리 위임: 클라이언트와 애플리케이션 개발에 집중 가능
  • 통합성: 클라이언트 코드를 다양한 MCP 서버에서 공유 및 재사용 가능

snowflake-mcp.png

1 https://www.snowflake.com/en/developers/guides/getting-started-with-snowflake-mcp-server/
Model Context Protocol (MCP) 입문

서드파티 서버 사용 전 고려 사항

 

  • 신뢰: 서버가 코드를 실행하고 외부 API를 호출할 수 있음 → 출처를 확인하세요
  • 보안: 개인 데이터 및 자격 증명의 신중한 관리 필요
  • 노출 범위: 도구가 많을수록 LLM의 작업 범위가 넓어짐; 각 서버의 노출 범위를 파악하세요

considerations.png

Model Context Protocol (MCP) 입문

Open Library MCP

open-library.png

 

  • mcp-open-library: Internet Archive Open Library API용 MCP 서버
  • 도구: get_book_by_title, get_authors_by_name, get_book_cover, get_book_by_id, ...
  • API 키 불필요
1 https://github.com/8enSmith/mcp-open-library
Model Context Protocol (MCP) 입문

Open Library MCP 접근하기

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

params = StdioServerParameters(
    command="open-library-server",
    args=[]
)
1 https://github.com/8enSmith/mcp-open-library?tab=readme-ov-file#installation
Model Context Protocol (MCP) 입문

Open Library MCP 사용하기

params = StdioServerParameters(command="open-library-server", args=[])


async with stdio_client(params) as (reader, writer): async with ClientSession(reader, writer) as session: await session.initialize()
response = await session.list_tools() print("Tools:", [t.name for t in response.tools]) result = await session.call_tool("get_book_by_title", {"title": "Dune"}) text = result.content[0].text print("Tool Call Result:", text)
Model Context Protocol (MCP) 입문
Tools: ['get_book_by_title', 'get_authors_by_name', 'get_author_info',
'get_author_photo', 'get_book_cover', 'get_book_by_id']

Tool Call Result: [ { "title": "Dune", "authors": [ "Frank Herbert" ], "first_publish_year": 1965, ... }, ...
Model Context Protocol (MCP) 입문

연습해 봅시다!

Model Context Protocol (MCP) 입문

Preparing Video For Download...