AA

alejandro-ao/mcp-server-example

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

162 stars 63 forks 품질 58 트렌드 16MIT

alejandro-ao/mcp-server-example은 https://github.com/alejandro-ao/mcp-server-example.에서 가져온 MCP 서버 후보입니다.

개요

alejandro-ao/mcp-server-example은 https://github.com/alejandro-ao/mcp-server-example.에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

이 저장소는 교육 목적을 위한 모델 컨텍스트 프로토콜(MCP) 서버 구현체를 포함하고 있습니다. 이 코드는 다양한 LLM 클라이언트와 통합할 수 있는 기능적인 MCP 서버를 구축하는 방법을 보여줍니다.

전체 튜토리얼을 따라가시려면 유튜브 영상 튜토리얼을 참고해 주세요.

MCP란 무엇인가?

MCP(Model Context Protocol)는 애플리케이션이 LLM에 컨텍스트를 제공하는 방식을 표준화하는 오픈 프로토콜입니다. MCP를 AI 애플리케이션용 USB-C 포트처럼 생각해 보세요 - AI 모델을 다양한 데이터 소스와 도구에 연결하는 표준화된 방법을 제공합니다.

주요 이점

  • LLM이 직접 연결할 수 있는 사전 구축된 통합 목록이 점점 늘어납니다
  • LLM 제공자와 벤더 간 전환의 유연성
  • 인프라 내에서 데이터를 보호하기 위한 모범 사례

건축 개요

MCP는 호스트 애플리케이션이 여러 서버에 연결할 수 있는 클라이언트-서버 아키텍처를 따릅니다:

  • MCP 호스트: Claude Desktop, IDE, 또는 MCP를 통해 데이터에 접근하려는 AI 도구와 같은 프로그램들
  • MCP 클라이언트: 서버와 1:1 연결을 유지하는 프로토콜 클라이언트

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

MCP Server Example

This repository contains an implementation of a Model Context Protocol (MCP) server for educational purposes. This code demonstrates how to build a functional MCP server that can integrate with various LLM clients.

To follow the complete tutorial, please refer to the YouTube video tutorial.

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications - it provides a standardized way to connect AI models to different data sources and tools.

Key Benefits

  • A growing list of pre-built integrations that your LLM can directly plug into
  • Flexibility to switch between LLM providers and vendors
  • Best practices for securing your data within your infrastructure

Architecture Overview

MCP follows a client-server architecture where a host application can connect to multiple servers:

  • MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP
  • MCP Clients: Protocol clients that maintain 1:1 connections with servers
  • MCP Servers: Lightweight programs that expose specific capabilities through the standardized Model Context Protocol
  • Data Sources: Both local (files, databases) and remote services (APIs) that MCP servers can access

Core MCP Concepts

MCP servers can provide three main types of capabilities:

  • Resources: File-like data that can be read by clients (like API responses or file contents)
  • Tools: Functions that can be called by the LLM (with user approval)
  • Prompts: Pre-written templates that help users accomplish specific tasks

System Requirements

  • Python 3.10 or higher
  • MCP SDK 1.2.0 or higher
  • uv package manager

Getting Started

Installing uv Package Manager

On MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Make sure to restart your terminal afterwards to ensure that the uv command gets picked up.

Project Setup

  1. Create and initialize the project:
# Create a new directory for our project
uv init mcp-server
cd mcp-server

# Create virtual environment and activate it
uv venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate

# Install dependencies
uv add "mcp[cli]" httpx
  1. Create the server implementation file:
touch main.py

Running the Server

  1. Start the MCP server:
uv run main.py
  1. The server will start and be ready to accept connections

Connecting to Claude Desktop

  1. Install Claude Desktop from the official website
  2. Configure Claude Desktop to use your MCP server:

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
    "mcpServers": {
        "mcp-server": {
            "command": "uv",  # It's better to use the absolute path to the uv command
            "args": [
                "--directory",
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "mcp-server": { "command": "uv", # It's better to use the absolute path to the uv command "args": [ "--directory", "/ABSOLUTE/PATH/TO/YOUR/mcp-server", "run", "main.py" ] } } }