TOBE MCP服务器
一个全面的Python MCP(模型上下文协议)服务器,提供专门的AI驱动工具和提示,以提高开发效率、内容创建和学习体验。
🌟 特性
🤖 开发人员助理
- 软件系统设计:全面的系统架构和实施指南
- 代码审查:详细的代码分析和可操作的反馈
- 开发最佳实践:干净的代码原则和优化策略
🎨 UI/UX设计师
- UI设计原型:具有详细规格的完整设计解决方案
- 设计系统:全面的设计令牌和组件库
- 可访问性审计:WCAG合规性和包容性设计指南
- DRD生成:开发人员的详细设计要求文件
📚 英语老师
- 单词课程:详细的词汇解释,包括发音和用法
- 生词本:主题单词列表和学习活动
- 语法解释:带示例的综合语法课
- 会话练习:互动对话场景和角色扮演
- 阅读理解:带问题的教育性阅读材料
- 发音指南:声音分析和练习
✍️ 文章作者
- 文章生成:完整的中英文文章
- 内容大纲:战略性内容规划和结构
- 文章编辑:内容改进和优化
- 多语言内容:文化适应和本地化
- 搜索引擎优化:搜索引擎优化和关键字分析
- 内容分析:质量评估和业绩评价
🚀 快速开始
先决条件
- Python 3.8或更高版本
- pip包管理器
安装
- 克隆存储库
git clone
cd tobe-mcp- 安装依赖项
pip install -e .- 运行服务器
tobe-mcp开发设置
- 安装开发依赖项
pip install -e ".[dev]"- 运行测试
pytest- 格式代码
black src/
isort src/📖 用法
开发者提示
系统设计
/tobe-mcp/design "Create a web application for task management with user authentication"代码审查
/tobe-mcp/review
# Paste your code or provide a link to reviewUI/UX设计提示
UI设计
/tobe-mcp/UIdesign "Design a mobile app interface for food delivery with dark mode support"设计系统
/tobe-mcp/design_system "E-commerce Platform" "Modern, clean, accessible design"可访问性审计
/tobe-mcp/accessibility_audit "Review the accessibility of our login form design"英语学习提示
单词课
/tobe-mcp/word_lesson "serendipity" "Advanced vocabulary for creative writing"生词本
/tobe-mcp/vocabulary_builder "Technology" "intermediate" 15语法解释
/tobe-mcp/grammar_explanation "Present Perfect Tense" "intermediate"会话练习
/tobe-mcp/conversation_practice "Job Interview" "intermediate" 2阅读理解
/tobe-mcp/reading_comprehension "Climate Change" "intermediate" "medium"发音指南
/tobe-mcp/pronunciation_guide "th sounds" "intermediate"文章写作提示
文章生成
/tobe-mcp/article_generator "The Future of Artificial Intelligence in Healthcare" "english" "blog" "professionals" 1200内容大纲
/tobe-mcp/content_outline "Sustainable Living Practices" "article" "long" "environmentalists"文章编辑
/tobe-mcp/article_editor "Your article content here" "seo" "general"多语言内容
/tobe-mcp/multilingual_content "Original English content" "chinese" "Chinese business culture"搜索引擎优化
/tobe-mcp/seo_optimization "Your content here" "digital marketing tips" "blog"内容分析
/tobe-mcp/content_analysis "Your content here" "comprehensive"🏗️ 项目结构
tobe-mcp/
├── src/
│ ├── prompts/
│ │ ├── developer.py # Software development prompts
│ │ ├── ui_designer.py # UI/UX design prompts
│ │ ├── english_teacher.py # English learning prompts
│ │ └── article_writer.py # Content creation prompts
│ ├── tools/ # Additional tools (future)
│ ├── logger.py # Centralized logging system
│ └── server.py # Main MCP server
├── docs/ # Documentation
├── logs/ # Application logs
├── tests/ # Test files
├── pyproject.toml # Project configuration
├── requirements.txt # Production dependencies
├── requirements-dev.txt # Development dependencies
└── setup.py # Package setup🔧 配置
日志记录
服务器使用具有可配置级别的集中式日志记录系统:
from src.logger import get_logger
logger = get_logger("your_module_name")
logger.info("Your log message")环境变量
LOG_LEVEL:设置日志记录级别(调试、信息、警告、错误)LOG_FILE:指定自定义日志文件路径
🧪 测试
运行测试套件:
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test file
pytest tests/test_server.py📝 发展
添加新提示
- 在中创建新的提示文件
src/prompts/
- 遵循现有模式:
from mcp.server.fastmcp import FastMCP
from src.logger import get_logger
def your_prompt_function(mcp: FastMCP):
logger = get_logger("your_prompt_name")
@mcp.prompt("your_prompt_name")
def your_prompt(param: str) -> str:
logger.info(f"Processing: {param}")
print(f"Processing: {param}")
return f"Your prompt response for: {param}"- 在中注册提示
src/server.py
代码的风格
- 使用黑色进行代码格式化
- 使用isort进行导入排序
- 遵循PEP 8指南
- 在适当的地方添加类型提示
🤝 贡献
- 分叉存储库
- 创建要素分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
开发指南
- 为新功能编写测试
- 根据需要更新文档
- 遵循现有的代码模式
- 提交前确保所有测试通过
📄 许可证
此项目根据Apache许可证2.0获得许可-请参阅 许可证 文件以获取详细信息。
🙏 致谢
- 内置于 MCP(模型上下文协议)
- 由FastMCP框架提供支持
- 受高效AI驱动开发工具需求的启发
📞 支持
对于问题、议题或贡献:
- 在GitHub上打开一个问题
- 查看文档
docs/目录 - 查看使用模式的测试示例
______________________________________________________________________
由以下材料制成❤️ TOBE团队
