Provides comprehensive GitHub search capabilities including repositories, code, issues, and user information, with support for pagination and structured data returns
Enables natural language queries to MySQL databases with intelligent SQL conversion and secure execution capabilities
Utilizes OpenAI GPT for natural language to SQL conversion in database queries
Supports natural language queries to PostgreSQL databases with intelligent SQL conversion and table structure retrieval
Enables querying SQLite databases using natural language, with capabilities for SQL generation and database structure inspection
MCP 服务器演示项目
一个基于 Model Context Protocol (MCP) 的多功能服务器演示项目,展示了如何构建和使用不同类型的 MCP 服务器。
🚀 项目概述
本项目是一个 monorepo,包含了三个不同功能的 MCP 服务器示例:
- Database Search - 智能数据库搜索服务,支持自然语言查询
- GitHub Search - GitHub 仓库和用户信息搜索服务
- Time - 时间获取和时区转换服务
所有服务器都基于 Model Context Protocol (MCP) 标准构建,可以与支持 MCP 的客户端(如 Claude Desktop)无缝集成。
📦 项目结构
🛠️ 技术栈
- 运行时: Node.js + TypeScript
- 包管理: pnpm workspace
- 框架: Model Context Protocol SDK
- 数据库: MySQL, PostgreSQL, SQLite (database-search)
- API: GitHub API (github-search)
- 工具库: dayjs, zod, prettier
🚀 快速开始
环境要求
- Node.js >= 18
- pnpm >= 8
安装依赖
构建所有包
代码格式化
📚 MCP 服务器详解
1. Database Search MCP Server
功能: 支持自然语言查询多种数据库,提供智能 SQL 转换
核心特性:
- 🗄️ 多数据库支持(MySQL、PostgreSQL、SQLite)
- 🧠 自然语言转 SQL(基于 OpenAI GPT)
- 🔒 安全 SQL 检查和过滤
- ⚙️ 灵活的环境配置管理
- 🔄 连接池和资源管理
工具列表:
query_database
- 自然语言数据库查询list_databases
- 列出可用数据库get_table_structure
- 获取表结构execute_sql
- 直接执行 SQL
2. GitHub Search MCP Server
功能: 搜索 GitHub 仓库、代码、问题和用户信息
核心特性:
- 🔍 全面搜索(仓库、代码、问题、用户)
- 📄 分页支持
- 🔑 GitHub API 集成
- 📊 结构化数据返回
工具列表:
search_github
- 搜索 GitHub 内容get_user_info
- 获取用户详细信息
使用示例:
代码来源:
3. Time MCP Server
功能: 获取当前时间和进行时区转换
核心特性:
- 🕐 获取当前时间
- 🌍 时区转换
- 🔧 灵活的时区配置
- 📅 标准时间格式
工具列表:
get_current_time
- 获取当前时间convert_time
- 时区间时间转换
使用示例:
代码来源:
🔧 开发指南
添加新的 MCP 服务器
- 在
packages/
目录下创建新包 - 配置
package.json
和tsconfig.json
- 实现 MCP 服务器逻辑
- 添加到 workspace 配置
项目脚本命令
开发最佳实践
- 使用 TypeScript 进行类型安全
- 遵循 MCP 标准和最佳实践
- 使用 zod 进行参数验证
- 实现适当的错误处理
- 添加详细的工具描述和参数说明
🤝 与 MCP 客户端集成
Claude Desktop 配置示例
在 Claude Desktop 的配置文件中添加服务器:
📄 许可证
ISC License
🤝 贡献
欢迎提交 Issue 和 Pull Request!
📞 支持
如果您在使用过程中遇到问题,请:
- 查看各包的详细文档
- 检查环境配置
- 提交 Issue 描述问题
注意: 这些是 MCP (Model Context Protocol) 服务器,需要与支持 MCP 的客户端(如 Claude Desktop)配合使用。
This server cannot be installed
A monorepo containing three Model Context Protocol (MCP) servers that enable natural language interaction with databases, GitHub repositories, and time/timezone services.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.Last updated -1JavaScript
- -securityFlicense-qualityA monorepo containing Model Control Protocol (MCP) servers for different services, primarily focused on Bitte AI integrations.Last updated -8,4094TypeScript
- -securityFlicense-qualityModel Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.Last updated -TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides daily-refreshed documentation for 9000+ libraries directly in AI code editors, helping developers avoid outdated references and hallucinations.Last updated -120654JavaScriptMIT License