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
구성
프로젝트 루트에 다음 변수를 사용하여
.env파일을 만듭니다.
ENVIRONMENT=DEV # Options: LOCAL, DEV, STAGING, PROD
COINMARKETCAP_API_KEY=your_api_key_here각 환경에 대해 특정 환경 파일을 만들 수도 있습니다.
.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 서버에 새 도구를 추가하려면 다음 단계를 따르세요.
src/__init__.py파일에 함수를 정의합니다.main()함수에 도구를 등록합니다.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 resultThis server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.