Discover Awesome MCP Servers

Extend your agent with 16,638 capabilities via MCP servers.

All16,638
Database Analyzer MCP Server

Database Analyzer MCP Server

Mcp Servers Collection

Mcp Servers Collection

검증된 MCP 서버 및 통합 모음

Servidor MCP do Supabase

Servidor MCP do Supabase

Servidor MCP do Supabase com funcionalidades de consulta e inserção de dados

Eka MCP Server

Eka MCP Server

에카 MCP 서버

@enemyrr/mcp-mysql-server

@enemyrr/mcp-mysql-server

거울

MCP Actions Adapter

MCP Actions Adapter

A simple adapter to convert a MCP server to a GPT actions compatible API

worker17

worker17

An MCP server to monitor workers productivity and fire them as needed.

xtrace-mcp

xtrace-mcp

Alpaca MCP Server

Alpaca MCP Server

거울

Playcanvas_editor Mcp Server

Playcanvas_editor Mcp Server

거울

mcp-tools-cli

mcp-tools-cli

command-line client for interacting with Model Context Protocol (MCP) servers.

IACR Cryptology ePrint Archive MCP Server

IACR Cryptology ePrint Archive MCP Server

거울

Weather App

Weather App

## 날씨 데이터용 예제 MCP 서버 구현 (테스트 및 프리커밋 설정 포함) 다음은 날씨 데이터를 제공하는 예제 MCP (Minimal Control Protocol) 서버 구현과 함께 테스트 및 프리커밋 설정에 대한 설명입니다. Python과 `fastapi`를 사용하여 구현하고, 테스트는 `pytest`를 사용하며, 프리커밋은 `pre-commit`을 사용합니다. **1. 프로젝트 구조:** ``` weather_mcp/ ├── app/ │ ├── __init__.py │ ├── main.py # FastAPI 애플리케이션 │ ├── models.py # 데이터 모델 │ └── weather_service.py # 날씨 데이터 로직 ├── tests/ │ ├── __init__.py │ └── test_main.py # FastAPI 엔드포인트 테스트 ├── .pre-commit-config.yaml # 프리커밋 설정 ├── requirements.txt # 의존성 목록 └── README.md ``` **2. `requirements.txt`:** ``` fastapi uvicorn[standard] pydantic pytest requests pre-commit flake8 black isort ``` **3. `app/models.py`:** ```python from pydantic import BaseModel class WeatherData(BaseModel): city: str temperature: float humidity: int description: str ``` **4. `app/weather_service.py`:** ```python import requests class WeatherService: def __init__(self, api_key: str): self.api_key = api_key self.base_url = "https://api.openweathermap.org/data/2.5/weather" # 예시 API def get_weather(self, city: str) -> dict: """ OpenWeatherMap API에서 날씨 데이터를 가져옵니다. """ url = f"{self.base_url}?q={city}&appid={self.api_key}&units=metric" response = requests.get(url) response.raise_for_status() # 에러 발생 시 예외 처리 return response.json() def parse_weather_data(self, data: dict) -> dict: """ API 응답에서 필요한 데이터만 추출합니다. """ return { "city": data["name"], "temperature": data["main"]["temp"], "humidity": data["main"]["humidity"], "description": data["weather"][0]["description"], } ``` **5. `app/main.py`:** ```python from fastapi import FastAPI, HTTPException, Depends from app.models import WeatherData from app.weather_service import WeatherService from typing import Annotated app = FastAPI() # API 키는 환경 변수에서 가져오는 것이 좋습니다. API_KEY = "YOUR_OPENWEATHERMAP_API_KEY" # 실제 API 키로 변경 weather_service = WeatherService(API_KEY) def get_weather_service(): return weather_service @app.get("/weather/{city}", response_model=WeatherData) async def get_weather_endpoint(city: str, weather_service: Annotated[WeatherService, Depends(get_weather_service)]): """ 특정 도시의 날씨 정보를 반환합니다. """ try: weather_data = weather_service.get_weather(city) parsed_data = weather_service.parse_weather_data(weather_data) return WeatherData(**parsed_data) except requests.exceptions.HTTPError as e: raise HTTPException(status_code=e.response.status_code, detail=str(e)) except Exception as e: raise HTTPException(status_code=500, detail=str(e)) @app.get("/health") async def health_check(): """ 서버 상태를 확인합니다. """ return {"status": "ok"} ``` **6. `tests/test_main.py`:** ```python from fastapi.testclient import TestClient from app.main import app from unittest.mock import patch client = TestClient(app) @patch("app.weather_service.WeatherService.get_weather") def test_get_weather_endpoint(mock_get_weather): """ /weather/{city} 엔드포인트 테스트 """ mock_get_weather.return_value = { "name": "Seoul", "main": {"temp": 25.0, "humidity": 70}, "weather": [{"description": "clear sky"}], } response = client.get("/weather/Seoul") assert response.status_code == 200 data = response.json() assert data["city"] == "Seoul" assert data["temperature"] == 25.0 assert data["humidity"] == 70 assert data["description"] == "clear sky" def test_health_check(): """ /health 엔드포인트 테스트 """ response = client.get("/health") assert response.status_code == 200 assert response.json() == {"status": "ok"} ``` **7. `.pre-commit-config.yaml`:** ```yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/psf/black rev: 24.2.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 rev: 7.0.0 hooks: - id: flake8 - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] ``` **설명:** * **`app/models.py`**: 날씨 데이터를 표현하는 Pydantic 모델을 정의합니다. * **`app/weather_service.py`**: OpenWeatherMap API를 사용하여 날씨 데이터를 가져오고 파싱하는 로직을 포함합니다. **주의:** `YOUR_OPENWEATHERMAP_API_KEY`를 실제 API 키로 바꿔야 합니다. API 키는 환경 변수에 저장하는 것이 좋습니다. * **`app/main.py`**: FastAPI 애플리케이션을 정의하고, 날씨 데이터를 제공하는 엔드포인트를 구현합니다. `Depends`를 사용하여 `WeatherService` 인스턴스를 엔드포인트에 주입합니다. * **`tests/test_main.py`**: FastAPI 엔드포인트를 테스트합니다. `unittest.mock.patch`를 사용하여 외부 API 호출을 모의(mock)합니다. * **`.pre-commit-config.yaml`**: 프리커밋 설정을 정의합니다. `trailing-whitespace`, `end-of-file-fixer`, `check-yaml`, `check-added-large-files`, `black`, `flake8`, `isort` 등의 훅을 사용하여 코드 스타일과 품질을 유지합니다. **사용 방법:** 1. **의존성 설치:** `pip install -r requirements.txt` 2. **프리커밋 설치:** `pre-commit install` 3. **테스트 실행:** `pytest` 4. **서버 실행:** `uvicorn app.main:app --reload` **추가 고려 사항:** * **환경 변수:** API 키와 같은 민감한 정보는 환경 변수에 저장하고, `os.environ.get()`을 사용하여 가져오는 것이 좋습니다. * **로깅:** 애플리케이션에 로깅을 추가하여 디버깅 및 모니터링을 용이하게 할 수 있습니다. * **에러 처리:** 더 자세한 에러 처리 및 로깅을 구현하여 애플리케이션의 안정성을 높일 수 있습니다. * **API Rate Limiting:** OpenWeatherMap과 같은 API는 rate limiting을 적용하므로, 이를 고려하여 코드를 작성해야 합니다. * **캐싱:** 자주 요청되는 데이터에 대해 캐싱을 구현하여 API 호출 횟수를 줄이고 성능을 향상시킬 수 있습니다. * **Docker:** Docker를 사용하여 애플리케이션을 컨테이너화하면 배포가 더 쉬워집니다. 이 예제는 기본적인 MCP 서버 구현을 보여주며, 실제 사용 사례에 맞게 기능을 확장하고 개선할 수 있습니다. 특히, API 키 관리, 에러 처리, 로깅, 캐싱 등은 실제 운영 환경에서 중요한 고려 사항입니다.

Atlassian Jira MCP Server

Atlassian Jira MCP Server

Atlassian Jira용 Node.js/TypeScript MCP 서버입니다. AI 시스템(LLM)에 프로젝트 목록/가져오기, 이슈 검색/가져오기(JQL/ID 사용), 개발 정보 보기(커밋, PR) 도구를 제공합니다. AI 기능을 Jira 프로젝트 관리 및 이슈 추적 워크플로우에 직접 연결합니다.

mcp-server

mcp-server

Mirror of

📸 Smart Photo Journal MCP Server

📸 Smart Photo Journal MCP Server

거울

MCP Server Playground

MCP Server Playground

Mirror of

🌱 mcp-origin

🌱 mcp-origin

MCP server that manages MCP servers

Polkassembly MCP Server

Polkassembly MCP Server

MCP Server for Polkassembly API

ディーゼロ開発環境用 MCPサーバー

ディーゼロ開発環境用 MCPサーバー

D-Zero frontend coding MCP server

RapidAPI MCP Server

RapidAPI MCP Server

RapidAPI Global Patent API를 SQLite 저장소와 통합하는 MCP 서버 구현

MCP Community Contributions

MCP Community Contributions

This is a directory repo for anything related to MCP - servers, clients and projects around MCP.

VoiceStudio MCP Server

VoiceStudio MCP Server

MCP server for kintone

MCP server for kintone

거울

MCP Servers Modified

MCP Servers Modified

MCP BLE Server

MCP BLE Server

Swagger MCP 服务器

Swagger MCP 服务器

Model Context Protocol 기반 서버로, Swagger/OpenAPI 문서를 파싱하여 다양한 프레임워크(Axios, Fetch, React Query)를 위한 TypeScript 타입과 API 클라이언트 코드를 생성합니다.

Grasshopper MCP サーバー

Grasshopper MCP サーバー

Rhino/Grasshopper 통합을 위한 MCP(Model Context Protocol) 서버 구현, AI 모델이 파라메트릭 디자인 도구와 상호 작용할 수 있도록 지원

mcptime

mcptime

SImple MCP server to return the current time

MCP EV Assistant Server

MCP EV Assistant Server

전기 자동차(EV) 충전소 관리, 여행 계획, 자원 관리를 위한 강력한 서버 구현입니다. 이 서버는 EV 관련 서비스를 위한 포괄적인 도구 및 API 세트를 제공합니다.