# mcp-server **Repository Path**: ming_log/mcp-server ## Basic Information - **Project Name**: mcp-server - **Description**: minglog MCP Server - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-28 - **Last Updated**: 2025-05-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MCP Server 基于MCP(Model Control Protocol)的微服务接口平台,提供天气查询和时间获取等服务。 ## 功能特性 ### 天气服务 (Weather Service) - 支持通过城市名称(拼音)查询天气 - 支持通过经纬度查询天气 - 返回包含温度、湿度、风速等详细天气信息 - 支持 Streamable HTTP 和 SSE 两种协议 - 端口:Streamable HTTP 8012,SSE 8002 ### 时间服务 (Current Time Service) - 提供精确的当前时间获取 - 返回格式化的时间字符串 - 支持 Streamable HTTP 和 SSE 两种协议 - 端口:Streamable HTTP 8011,SSE 8001 ## 技术栈 - Python 3.10+ - FastMCP - SSE (Server-Sent Events) - PM2 进程管理 ## 快速开始 1. 克隆项目 ```bash git clone https://gitee.com/ming_log/mcp-server.git cd mcp-server ``` 2. 创建并激活虚拟环境 ```bash pip install uv uv venv source .venv/bin/activate # Linux/Mac # 或 .venv\Scripts\activate # Windows ``` 3. 安装依赖 ```bash uv sync ``` 4. 启动服务 ```bash pm2 start mcp.config.js ``` > 需要安装pm2工具,安装方法可自行百度。 ## API 文档 ### 天气服务 #### Streamable HTTP - 接口地址:`http://localhost:8012/http` - 方法: - `get_weather_from_cityname_tool`: 通过城市名称获取天气 - `get_weather_from_latitude_longitude_tool`: 通过经纬度获取天气 #### SSE - 接口地址:`http://localhost:8002/sse` - 方法: - `get_weather_from_cityname_tool`: 通过城市名称获取天气 - `get_weather_from_latitude_longitude_tool`: 通过经纬度获取天气 ### 时间服务 #### Streamable HTTP - 接口地址:`http://localhost:8011/http` - 方法: - `get_current_time_tool`: 获取当前时间 #### SSE - 接口地址:`http://localhost:8001/sse` - 方法: - `get_current_time_tool`: 获取当前时间 ## 部署 项目使用PM2进行进程管理,配置文件位于 `mcp.config.js`。 ## 许可证 - MIT License