MCP service framework with a weather MCP server example

MCP service framework with a weather MCP server example

mcp-server-web•byhiohk

A framework that implements MCP server and client communication, including a weather service MCP server with tool registration, parameter validation and weather API integration.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Implements an MCP server that registers tools with an input schema and handles tool call requests.
  • •Provides a weather service MCP server example that integrates a weather API and standardizes data.
  • •Supports request retries, unified error handling and service health monitoring.
  • •Includes an intelligent conversation pipeline that automatically calls tools and integrates results with context management.

BEST FOR

  • •Developers building a weather-focused MCP server with tool registration and API integration.
  • •Teams that want an MCP server and client framework with an AI-driven chat pipeline and automatic tool invocation.

ABOUT MCP-SERVER-WEB

MCP service framework with a weather MCP server example is cataloged as an MCP server attributed to hiohk. A framework that implements MCP server and client communication, including a weather service MCP server with tool registration, parameter validation and weather API integration. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP service framework with a weather MCP server example are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can I add a new MCP service to this framework?

Yes, the README provides a guide for creating new MCP services using the MCP SDK Server and registering tool handlers.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 89dd4da30004 · 采集于 2026-11-13 12:39:09 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Service Framework

一个基于MCP(Model Context Protocol)协议的可扩展服务框架,提供标准化的工具调用接口和AI集成能力。包含基础服务架构、天气服务实现示例和智能对话处理管道。前端效果如下图所示:

alt text

核心特性

  • MCP协议实现:完整支持MCP协议的Server/Client通信模型
  • 服务热插拔:支持动态注册和调用各类工具服务
  • 智能对话管道:
    • 上下文感知的对话管理
    • 自动工具调用与结果整合
    • 多轮对话状态保持
  • 高可用设计:
    • 请求重试机制(默认3次)
    • 错误统一处理
    • 服务健康监控

技术架构

├── MCP Client (Express Server)
│   ├── 会话管理
│   ├── AI集成(DeepSeek)
│   ├── 工具调用路由
│   └── 服务连接器
│
└── MCP Server (Weather Service Example)
    ├── 工具注册
    ├── 参数校验
    ├── 天气API集成
    └── 数据标准化

快速开始

环境准备

npm install @modelcontextprotocol/sdk express dotenv

配置环境变量

# 服务配置
PORT=3000
AI_MODEL_NAME=xxxxxx

# DeepSeek API
DEEPSEEK_API_BASE_URL=https://api.deepseek.com/v1/
DEEPSEEK_API_ENDPOINT=/chat/completions
DEEPSEEK_API_KEY=your_api_key

# 天气服务API
WEATHER_API_KEY=your_weather_api_key

启动服务

# 启动主服务
npm run start:prod

接口示例

聊天请求:

POST /chat
Content-Type: application/json

{
  "message": "北京今天天气如何?",
  "sessionId": "user123"
}

响应示例:

{
  "status": "success",
  "response": {
    "text": "北京当前温度28℃,晴,西北风3级",
    "reasoning": "",
    "toolResults": [{
      "toolName": "get_forecast",
      "result": "温度:28℃ 风速:20km/h..."
    }]
  }
}

服务扩展指南

创建新MCP服务

  1. 服务模板:
// services/customService.js
import { Server } from "@modelcontextprotocol/sdk/server";

export function createCustomService() {
  const server = new Server({/* 服务元数据 */});

  // 工具注册
  server.setRequestHandler(ListToolsRequestSchema, () => ({
    tools: [{
      name: "custom_tool",
      description: "工具描述",
      inputSchema: {/* JSON Schema */}
    }]
  }));

  // 工具实现
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
    // 业务逻辑实现
    return { content: [{ type: "text", text: "处理结果" }] };
  });

  return { run: async () => {/* 启动逻辑 */} };
}
  1. 服务集成:
// 在client.js中扩展
async function initializeServices() {
  // 添加新服务连接
  const customTransport = new StdioClientTransport({
    command: "node",
    args: ["./services/customService.js"]
  });
  await customClient.connect(customTransport);
}

开发规范

  1. 工具设计原则:

    • 输入输出遵循JSON Schema
    • 错误代码使用标准MCP错误码
    • 包含完整的参数校验
  2. 服务通信:

    • 使用Stdio传输协议
    • 服务版本兼容性管理
    • 心跳检测机制
  3. 性能要求:

    • 单次工具调用响应时间 < 2s
    • 错误重试间隔:500ms, 1000ms, 1500ms
    • 最大上下文长度:5轮对话

演进路线

  1. 服务发现机制
  2. 负载均衡支持
  3. 服务监控仪表盘
  4. 协议缓冲支持

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP service framework with a weather MCP server example from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-web)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools