MCPFastDemo

Chenlong-Tao/MCPFastDemo

3.1

If you are the rightful owner of MCPFastDemo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This is a simple MCP (Model Context Protocol) server example, suitable for beginners to understand and learn the basic concepts and usage of MCP.

MCP 服务器示例

这是一个简单的 MCP (Model Context Protocol) 服务器示例,适合初学者了解和学习 MCP 的基本概念和使用方法。

什么是 MCP?

MCP (Model Context Protocol) 是一种协议,允许 AI 模型(如 Claude)与外部工具和资源进行交互。通过 MCP,AI 可以访问实时数据、执行计算或与其他系统通信,从而扩展其能力。

这个仓库包含什么?

这个仓库包含一个简单的 MCP 服务器示例,它提供了以下功能:

  1. 加法工具:一个简单的工具,可以将两个数字相加
  2. 问候资源:一个动态资源,可以根据提供的名字返回个性化的问候语
  3. 代码分析提示:一个用于深入分析代码的提示模板

如何开始使用

前提条件

  • 安装 Python(建议 Python 3.6 或更高版本)
  • 基本的命令行知识

安装步骤

  1. 克隆或下载这个仓库到你的计算机上

  2. 打开终端或命令提示符,导航到仓库的 server 目录

  3. 运行启动脚本

    sh start.sh
    

    这个脚本会自动检查是否安装了 MCP 包,如果没有,会自动安装,然后启动服务器。

  4. 如果一切顺利,你应该会看到服务器启动的消息,表明服务器正在运行。

如何使用这个 MCP 服务器

运行后 打开 http://localhost:5173