MCP 演示项目 - 双实现版本
这个项目包含了 两个不同的 Model Context Protocol (MCP) 实现,用于学习和比较不同的实现方法。
🚀 快速开始
选择版本启动
运行测试
📂 项目结构
🎯 两个版本对比
| 特性 | FastAPI版本 (v1.0) | MCP SDK版本 (v2.0) | 
| 目的 | 学习MCP概念 | 真正的MCP协议实现 | 
| 协议 | RESTful HTTP API | MCP协议 + JSON-RPC | 
| 传输 | HTTP/HTTPS | STDIO | 
| 客户端 | Web浏览器、HTTP客户端 | Claude Desktop、MCP兼容客户端 | 
| 优势 | 简单易懂、有Web界面 | 真正的MCP协议、Claude Desktop兼容 | 
| 限制 | 无法与真正MCP客户端连接 | 学习曲线稍陡、无Web界面 | 
🛠️ 功能特性
两个版本都提供相同的工具功能:
- calculator - 数学计算工具 ( - +,- -,- *,- /,- sin,- cos,- sqrt等)
- text_analyzer - 文本分析工具 (字符统计、词频分析、阅读时间) 
- file_reader - 文件读取工具 (安全文件访问、多格式支持) 
🔌 Claude Desktop 集成
只有 MCP SDK版本 支持与Claude Desktop集成。详细配置请参考 mcp_sdk_demo/README.md。
📚 学习建议
初学者路径
- 从FastAPI版本开始 - 理解MCP的基本概念 
- 查看Web界面 - 访问 http://localhost:8000/docs 
- 升级到SDK版本 - 体验真正的MCP协议 
开发者路径
- 直接使用SDK版本 - 用于生产环境 
- 配置Claude Desktop - 体验真实的AI助手集成 
🔧 系统要求
- Python 3.10+ 
- PowerShell (Windows) 
- 虚拟环境支持 
选择建议:
- 🎓 学习MCP概念 → 使用 - mcp_fastapi_demo
- 🚀 生产环境/Claude Desktop集成 → 使用 - mcp_sdk_demo
This server cannot be installed
Provides calculator, text analysis, and file reading tools through two different implementations - a FastAPI version for learning MCP concepts and an official SDK version for production use with Claude Desktop integration.
Related MCP Servers
- -security-license-qualityAllows interaction with MATLAB by creating and executing scripts and functions through Claude or other MCP clients, supporting script management and execution result retrieval with environment configuration capabilities.Last updated -32
- Asecurity-licenseAqualityAllows Claude desktop app to execute terminal commands and edit files on your computer through MCP, with features including command execution, process management, and diff-based file editing.Last updated -2114,6144,798MIT License
- -security-license-qualityAn MCP server that integrates with Claude to provide smart documentation search capabilities across multiple AI/ML libraries, allowing users to retrieve and process technical information through natural language queries.Last updated -
- Asecurity-licenseAqualityA comprehensive learning project providing hands-on experience with Model Context Protocol (MCP) server development, featuring calculator and text utility tools for integration with Claude Desktop.Last updated -1