Skip to main content
Glama

MCP-YNU FastMCP Server

Official
by ynu

MCP-YNU - FastMCP 서버

각 디렉토리에서 도구, 리소스 및 프롬프트를 자동으로 로드하는 FastMCP를 사용한 동적 MCP 서버 구현입니다.

특징

  • tools/ , resources/prompts/ 디렉토리에서 모듈의 동적 로딩
  • 모듈 자동 검색 및 등록
  • 간단한 구성 및 확장성
  • 더 나은 코드 명확성과 정적 분석을 위한 유형 힌트
  • 서버 활동 모니터링을 위한 포괄적인 로깅

최근 업데이트

  • 코드베이스 전체에 유형 힌트가 추가되었습니다.
  • 개선된 MCP 인스턴스 처리
  • 로깅 기능 추가
  • MIT 라이센스 추가
  • 참조 링크가 포함된 업데이트된 문서

디렉토리 구조

지엑스피1

용법

  1. 적절한 디렉토리에 모듈을 생성합니다.
  2. from mcp_server import mcp
  3. 서버를 실행합니다:
python main.py

예제 모듈

도구 모듈 예제(tools/example.py)

from mcp_server import mcp import httpx @mcp.tool() def calculate_bmi(weight_kg: float, height_m: float) -> float: """Calculate BMI given weight in kg and height in meters""" return weight_kg / (height_m**2) @mcp.tool() async def fetch_weather(city: str) -> str: """Fetch current weather for a city""" async with httpx.AsyncClient() as client: response = await client.get(f"https://api.weather.com/{city}") return response.text

리소스 모듈 예제(resources/example.py)

from mcp_server import mcp @mcp.resource("config://app") def get_config() -> str: """Static configuration data""" return "App configuration here" @mcp.resource("users://{user_id}/profile") def get_user_profile(user_id: str) -> str: """Dynamic user data""" return f"Profile data for user {user_id}"

프롬프트 모듈 예제(prompts/example.py)

from mcp_server import mcp from mcp.server.fastmcp.prompts import base @mcp.prompt() def review_code(code: str) -> str: return f"Please review this code:\n\n{code}" @mcp.prompt() def debug_error(error: str) -> list[base.Message]: return [ base.UserMessage("I'm seeing this error:"), base.UserMessage(error), base.AssistantMessage("I'll help debug that. What have you tried so far?"), ]

디버깅

  1. .env 에서 MCP_TRANSPORT_TYPE 업데이트하고 python main.py 실행하여 mcp 서버를 시작합니다.
  2. npx @modelcontextprotocol/inspector 실행하여 inspect를 엽니다.
  3. URL http://localhost:<mcp_server_port>/sse 사용하여 SSE 전송 유형을 선택하거나 명령 python 및 인수 /path/to/main.py 사용하여 STDIO 전송 유형을 선택합니다.

@modelcontextprotocol/inspector

요구 사항

  • 파이썬 >= 3.10
  • 패스트MCP

참조 링크

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

도구, 리소스 및 프롬프트를 해당 디렉토리에서 자동으로 로드하여 쉽게 확장하고 구성할 수 있는 동적 MCP 서버 구현입니다.

  1. 특징
    1. 최근 업데이트
      1. 디렉토리 구조
        1. 용법
          1. 예제 모듈
            1. 도구 모듈 예제(tools/example.py)
            2. 리소스 모듈 예제(resources/example.py)
            3. 프롬프트 모듈 예제(prompts/example.py)
          2. 디버깅
            1. 요구 사항
              1. 참조 링크
                1. 특허

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    An MCP server to run commands.
                    Last updated -
                    2
                    933
                    160
                    TypeScript
                    MIT License
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    MCP server that builds itself by creating new tools as needed based on user requests (Requires restart of Claude Desktop to use newly created tools).
                    Last updated -
                    4
                    13
                    Python
                    The Unlicense
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.
                    Last updated -
                    839
                    4
                    TypeScript
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A tool that dynamically generates and configures MCP servers by automatically creating necessary directories and files according to user specifications.
                    Last updated -
                    1
                    9
                    9
                    JavaScript
                    MIT License

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/ynu/mcp-ynu'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server