MCP Server Demo

by dynstat
Verified

MCP 服务器演示

模型控制协议 (MCP) 服务器实现的简单演示项目。未来将提供 MCP 客户端实现。

概述

该项目演示了一个使用 FastMCP 构建的简单 MCP 服务器,它为 AI 助手提供了多种工具和资源:

  • 新闻文章获取:从 WorldNewsAPI 查询和检索新闻文章
  • 简单计算:基本加法功能
  • 天气信息:简单的天气数据检索
  • 动态问候:个性化问候资源

设置

先决条件

  • Python 3.x
  • 所需的 Python 包(用于测试):
    • mcp-server
    • worldnewsapi

安装

  1. 克隆此存储库
  2. 安装依赖项:
    uv add mcp-server
    uv add worldnewsapi
    pip install mcp-server worldnewsapi

用法

运行服务器

使用 Python 运行服务器:从 MCP 相关配置并重新启动客户端,如 claude desktop 或 cursor ide mcp。

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

模型控制协议 (MCP) 服务器的简单演示项目,为 AI 助手提供获取新闻文章、执行计算、检索天气数据和生成个性化问候的工具。

  1. Overview
    1. Setup
      1. Prerequisites
      2. Installation
    2. Usage
      1. Running the Server
    ID: hi11pm2u6i