MCP服务器集合

一个包含多个MCP(模型上下文协议)服务器的单一仓库,用于与Claude Desktop和Claude Code一起使用。

  • by Shahid-Mo
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 shahid-mo/mcp-servers

使用说明

MCP服务器集合

一个包含多个MCP(模型上下文协议)服务器的单存储库,用于Claude Desktop和Claude Code。

🚀 快速开始

# Clone and setup
git clone <your-repo-url>
cd mcp-servers
uv sync

# Run a specific server
cd weather
uv run weather

# Or run from root
uv run --directory weather weather

📦 可用服务器

天气服务器

  • 包裹: weather-mcp
  • 命令: weather
  • 描述:使用美国国家气象局API获取天气预报和警报
  • 工具:
    • get_weather(latitude, longitude) -当前天气预报
    • get_weather_alerts(latitude, longitude) -活跃天气警报

SEO工具服务器

  • 包裹: seo-mcp
  • 命令: seo
  • 描述:分析网站进行SEO优化
  • 工具:
    • analyze_page_seo(url) -完整的SEO分析
    • extract_keywords(url, max_keywords) -提取热门关键词

🔧 配置

适用于克劳德桌面

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-servers/weather", "weather"],
      "env": {}
    },
    "seo": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-servers/seo_tooling", "seo"],
      "env": {}
    }
  }
}

克劳德代码

相同的配置工作!Claude Code可以使用相同的MCP服务器。

🏗️ 发展

添加新服务器

  1. 创建新目录: mkdir my_new_server
  2. 添加到根目录下的工作区 pyproject.toml:
    [tool.uv.workspace]
    members = ["shared_lib", "weather", "seo_tooling", "my_new_server"]
    
  3. 创建 my_new_server/pyproject.toml:
    [project]
    name = "my-new-server-mcp"
    dependencies = ["mcp[cli]", "shared-lib"]
    
    [project.scripts]
    my-server = "my_new_server.server:main"
    
  4. 使用FastMCP模式实现

代码质量

# Lint all packages
uv run ruff check .

# Format code
uv run ruff format .

# Type checking
uv run mypy .

📁 项目结构

mcp-servers/
├── pyproject.toml           # Workspace root
├── shared_lib/              # Common utilities
│   ├── pyproject.toml
│   └── shared_lib/
│       ├── __init__.py
│       ├── http_utils.py
│       └── validation.py
├── weather/                 # Weather MCP server
│   ├── pyproject.toml
│   └── weather/
│       ├── __init__.py
│       └── server.py
├── seo_tooling/            # SEO MCP server
│   ├── pyproject.toml
│   └── seo_tooling/
│       ├── __init__.py
│       └── server.py
└── .github/
    └── workflows/
        └── ci.yml

🔍 为什么是这种结构?

Mono回购的好处:

  • ✅ 共享开发工具和标准
  • ✅ 易于添加新服务器
  • ✅ 通过以下方式重用常用实用程序 shared_lib
  • ✅ 所有MCP实验都放在一个地方

个人套餐:

  • ✅ 每台服务器都可以独立使用
  • ✅ 明确依赖关系和版本
  • ✅ 如果需要,稍后可以轻松提取到单独的仓库

🤝 贡献

  1. 按照现有模式添加服务器
  2. 使用 shared_lib 用于通用功能
  3. 包括示例配置
  4. 使用Claude Desktop和Claude Code进行测试