basic-mcp
basic-mcp
一个带有 React 界面的 MCP (Model Context Protocol) 服务器,提供围绕 GitHub 用户和天气的工具与资源。
项目结构
basic-mcp/
├── server/ # Serveur MCP (Node.js / TypeScript)
│ ├── main.ts # Point d'entrée — transport stdio
│ ├── server-http.ts # Point d'entrée — transport HTTP (Streamable HTTP)
│ └── src/
│ ├── application/ # Cas d'usage (GetGitHubUser, GetWeather)
│ ├── domain/ # Entités et ports (interfaces)
│ ├── infrastructure/ # Implémentations des repositories
│ └── interface/mcp/ # Outils et ressources MCP exposés
└── client/ # Interface React + Vite
└── src/
├── application/hooks/ # useMcpTool, useMcpResource
├── domain/ # Entités côté client
├── infrastructure/mcp/ # Adaptateur MCP client
└── presentation/ # Composants ReactRelated MCP server: Weather MCP
前置要求
Node.js >= 18
npm >= 9
安装
npm install
cd client && npm install启动
仅服务器 (stdio)
npm run startHTTP 服务器 (端口 3001)
npm run start:httpHTTP 服务器 + React 界面
npm run start:ui界面可通过 http://localhost:5173 访问。
MCP HTTP 服务器监听 http://localhost:3001/mcp。
可用的 MCP 工具
工具 | 描述 |
| 检查服务器是否响应 |
| 返回 GitHub 用户信息 |
| 返回指定经纬度的天气 |
可用的 MCP 资源
URI | 描述 |
| 用户的 GitHub 资料 |
| GPS 坐标的天气 |
架构
该项目遵循 简洁架构 (Clean Architecture) 原则:
Domain (领域层) — 实体和端口接口(无外部依赖)
Application (应用层) — 编排业务逻辑的用例
Infrastructure (基础设施层) — 对外部 API (GitHub, Open-Meteo) 的 HTTP 调用
Interface (接口层) — 通过 MCP 协议进行暴露
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A MCP server built for developers enabling Git based project management with project and personal…
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Node.js/TypeScript server implementing the Model Context Protocol that provides integrations with GitHub and Notion, allowing automated workflow between these platforms via API endpoints.1,020 npmMIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables natural language weather queries for global cities, integrating with OpenWeather API to provide real-time weather information in an easy-to-read format.1-
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides weather information using the Open-Meteo API, allowing users to get current weather for specific cities and retrieve weather data for date ranges.Apache 2.0