mcp-server-multitask
mcp_training
MCP 서버: 날씨, 지오코딩, 환율 도구를 제공하며, 이를 사용할 수 있는 OpenAI 모델과 대화하는 콘솔 클라이언트를 포함합니다.
Tú › ¿Qué tiempo hace en Madrid?
Modelo:
En Madrid hay 24,3 °C, humedad del 41 % y cielo despejado.
· get_lat_lon_from_city → get_current_weather작동 방식
main_client.py ──> OpenAI (Responses API) ──> [túnel] ──> main_server.py (MCP)
tu terminal el modelo decide 5 herramientas
qué herramientas usa sobre APIs públicas클라이언트는 도구를 실행하지 않습니다. OpenAI에 MCP 서버의 공개 URL을 전달하면, OpenAI가 도구를 나열하고 호출하며 연결합니다(도시 → 좌표 → 날씨). 따라서 서버는 인터넷에서 접근 가능해야 합니다. OpenAI는 자신의 서버에서 연결하기 때문입니다.
도구
도구 | 입력 | 출력 |
| 도시 이름 | 위도 및 경도 |
| 좌표 | 온도, 습도, 하늘 상태 |
| 좌표 | 7일 예보 |
| 두 개의 ISO 코드 | 현재 환율 |
| 금액 + 환율 | 변환된 금액 |
날씨 및 지오코딩은 Open-Meteo를 사용합니다(무료, 키 불필요). 환율은 ExchangeRate-API를 사용하며, 키가 필요하고 20개 통화를 지원합니다(CLI에서 /monedas).
구조
config/settings.py configuración y logging (todo sale del .env)
server/ herramientas + clientes HTTP de las APIs externas
client/ cliente de OpenAI + interfaz de terminal
main_server.py arranca el servidor MCP
main_client.py arranca la conversaciónRelated MCP server: Python Weather MCP Server
설치
**Python 3.11+**가 필요합니다. uv 사용을 권장합니다:
git clone <url-del-repo>
cd mcp_training
uv sync또는 pip와 가상 환경 사용:
python -m venv .venv
.venv\Scripts\activate # Windows; en Linux/macOS: source .venv/bin/activate
pip install -r requirements.txt설정
예제 파일을 복사하고 키를 입력하세요:
cp .env.example .env필수 변수는 두 개뿐입니다:
변수 | 용도 |
| 환율 (여기서 무료 키 받기) |
| 클라이언트 모델 |
그리고 세 번째 변수 MCP_PUBLIC_URL은 다음 단계에서 채워집니다. 나머지(모델, 포트, 전송, 타임아웃, 로그 수준)는 합리적인 기본값을 가지며 .env.example에 문서화되어 있습니다.
사용법
세 개의 터미널이 필요합니다: 서버, 터널, 클라이언트.
1. MCP 서버 시작
uv run python main_server.pyhttp://127.0.0.1:8002/mcp에서 수신 대기합니다.
2. 터널로 서버 공개
OpenAI가 서버에 접근하려면 공개 URL이 필요합니다. devtunnel 사용:
devtunnel port create -p 8002 --allow-anonymous
devtunnel host출력된 URL(https://xxxxxxx-8002.euw.devtunnels.ms)을 복사하여 .env에 넣으세요:
MCP_PUBLIC_URL=https://xxxxxxx-8002.euw.devtunnels.ms어떤 터널이든 상관없습니다(ngrok, Cloudflare Tunnel…). URL이 외부에서 접근 가능하기만 하면 됩니다. 클라이언트는 URL에 /mcp가 없으면 자동으로 추가합니다.
3. 클라이언트 실행
uv run python main_client.py질문을 입력하고 Enter를 누르세요. 대화에는 메모리가 있습니다: 마드리드에 대해 물어본 후 "그리고 내일은?"이라고 말할 수 있습니다.
Convierte 100 USD a EUR
¿Cuál es el clima actual en Madrid?
Dame el pronóstico del tiempo para Nueva YorkCLI 명령어:
명령어 | 기능 |
| 도구, 예제 및 명령어 표시 |
| 지원되는 통화 코드 표시 |
| 종료 (Ctrl+C 및 Ctrl+D도 가능) |
클라이언트 없이 서버 사용하기
서버는 표준 MCP 서버입니다: 호환되는 모든 클라이언트에서 사용할 수 있습니다. 하위 프로세스로 연결하려면(Claude Desktop, Claude Code…), .env에 MCP_TRANSPORT=stdio를 설정하세요. 그러면 터널이나 포트가 필요 없습니다.
자주 발생하는 문제
증상 | 원인 |
시작 시 |
|
클라이언트가 시작되지 않고 |
|
모델이 도구를 사용할 수 없다고 말함 | 서버 또는 터널이 다운되었거나 |
OpenAI 할당량 오류 | 잔액 부족; 재시도해도 해결되지 않음 |
각 호출의 세부 정보(인수, 응답, URL)를 보려면 .env에 LOG_LEVEL=DEBUG를 설정하세요. 로그는 stderr로 출력되므로 python main_client.py > charla.txt는 대화 내용만 저장합니다.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA server that integrates the MCP library with OpenAI's API, allowing users to interact with various tools, such as the weather tool, through natural language queries.MIT
- AlicenseBqualityDmaintenanceEnables AI agents to fetch real-time weather data for any location using the OpenWeatherMap API. Demonstrates how to build a simple MCP server that exposes weather information as a tool for LLMs.1GPL 3.0
- Alicense-qualityDmaintenanceAn MCP server that enables AI assistants to call weather tools, read resources, and use prompt templates for live weather data integration.1,299MIT
- Flicense-qualityCmaintenanceAn MCP server that integrates ExchangeRate-API and Open-Meteo to provide currency conversion and weather tools, enabling natural language queries for exchange rates, weather, and geocoding.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Jotarose/mcp-server-multitask'
If you have feedback or need assistance with the MCP directory API, please join our Discord server