Skip to main content
Glama

Python Server MCP - 암호화폐 가격 서비스

이 프로젝트는 암호화폐 가격 정보를 제공하는 MCP(Model Context Protocol) 서버를 구현합니다. 이 서버는 Python과 MCP 프레임워크를 사용하여 다양한 클라이언트에서 사용할 수 있는 API를 구축합니다.

특징

  • 실시간 암호화폐 가격 검색

  • 환경 기반 구성(개발, 프로덕션, 스테이징, 로컬)

  • CoinMarketCap API 통합

  • Docker 컨테이너 배포

Related MCP server: Coin MCP Server

요구 사항

  • 파이썬 3.12+

  • uv(패키지 및 가상 환경 관리자)

  • Docker(컨테이너 실행을 위한 선택 사항)

설치

uv 사용(권장)

지엑스피1

uv를 사용하여 가상 환경을 만들고 활성화하세요

uv venv source .venv/bin/activate

종속성 설치

uv sync

구성

  1. 프로젝트 루트에 다음 변수를 사용하여 .env 파일을 만듭니다.

ENVIRONMENT=DEV # Options: LOCAL, DEV, STAGING, PROD COINMARKETCAP_API_KEY=your_api_key_here
  1. 각 환경에 대해 특정 환경 파일을 만들 수도 있습니다.

    • .dev.env - 개발 환경용

    • .staging.env - 스테이징 환경용

    • .prod.env - 프로덕션 환경용

용법

로컬 실행

python main.py

이렇게 하면 표준 입출력(stdio)을 통해 요청을 수신하는 MCP 서버가 시작됩니다.

Docker 사용

# Build the image docker build -t test-mcp -f Dockerfile --platform linux/amd64 . # Run the container docker run -it test-mcp

프로젝트 구조

. ├── Dockerfile # Docker configuration ├── main.py # Application entry point ├── pyproject.toml # Dependencies configuration ├── start.sh # Docker startup script └── src/ # Source code ├── __init__.py # MCP server initialization └── core/ # Core modules ├── common/ # Shared schemas and models ├── config.py # Application configuration ├── services/ # Application services ├── settings/ # Environment-specific settings └── utils/ # Utilities

개발

MCP 서버에 새 도구 추가

MCP 서버에 새 도구를 추가하려면 다음 단계를 따르세요.

  1. src/__init__.py 파일에 함수를 정의합니다.

  2. main() 함수에 도구를 등록합니다.

  3. docstring으로 도구 문서화

예:

@server.add_tool def my_new_tool(parameter1: str, parameter2: int) -> str: """ Description of what the tool does. Args: parameter1: Description of parameter 1 parameter2: Description of parameter 2 Returns: Description of what is returned """ # Tool implementation return result
-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

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/stevearagonsite/PythonServerMcp'

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