Provides containerization support for deploying the GitHub stars analysis server in isolated environments.
Supports environment-based configuration through .env files for secure GitHub App credentials management.
Enables analysis of GitHub user starred repositories, providing insights into development trends, technology adoption patterns, and timeline tracking of starring activities.
Utilizes GitHub's GraphQL API for efficient data retrieval, enabling comprehensive analysis of GitHub stars and repository data.
Uses Pydantic for data validation and serialization when processing GitHub repository data and star information.
Supports testing the GitHub stars analysis functionality to ensure reliable data processing.
Built with Python 3.11+, providing a modern foundation with type hints for GitHub stars analysis and timeline tracking.
Implements Redis caching for frequently accessed data, optimizing performance when analyzing GitHub stars and repository information.
Incorporates Ruff for code linting to maintain high code quality in the GitHub stars analysis implementation.
GitHub Stars MCP Server
一个高性能的 MCP (Model Context Protocol) 服务器,用于 GitHub 星标仓库分析和时间线跟踪。
功能特性
- 🌟 星标仓库管理: 获取和分析用户的 GitHub 星标仓库
- 📊 数据分析: 提供语言分布、主题统计、星标趋势等分析
- 🚀 批量处理: 支持批量获取仓库详情和 README 内容
- 💾 多级缓存: L1 (内存) + L2 (Redis) 缓存系统提升性能
- 🔧 精简工具集: 4个核心工具,专注于核心功能
安装
- 克隆仓库:
- 安装依赖:
- 配置环境变量:
使用方法
启动服务器
可用工具
1. 获取星标仓库列表
2. 获取单个仓库详情
3. 批量获取仓库详情
4. 创建综合分析报告
配置选项
环境变量
GITHUB_TOKEN
: GitHub Personal Access Token (必需)REDIS_URL
: Redis 连接 URL (可选,默认: redis://localhost:6379/0)LOG_LEVEL
: 日志级别 (可选,默认: INFO)DANGEROUSLY_OMIT_AUTH
: 是否跳过认证检查 (可选,默认: true)
缓存配置
- L1 缓存: 内存中的 TTL 缓存,默认 128 个条目,5 分钟过期
- L2 缓存: Redis 缓存,用于持久化和跨实例共享
数据模型
StarredRepository
包含星标仓库的完整信息,包括:
- 基本信息 (名称、描述、URL)
- 统计数据 (星标数、分叉数)
- 元数据 (创建时间、更新时间、星标时间)
- 标签和主题
AnalysisBundle
综合分析报告,包含:
- 语言分布统计
- 主题分布统计
- 星标数量统计
- 处理摘要和元数据
错误处理
服务器包含完善的错误处理机制:
AuthenticationError
: GitHub 认证失败RateLimitError
: API 速率限制GitHubAPIError
: GitHub API 错误CacheError
: 缓存操作错误ConfigurationError
: 配置错误
性能优化
- 多级缓存系统减少 API 调用
- 并发控制避免速率限制
- 分页支持处理大量数据
- 异步操作提升响应速度
开发
运行测试
代码检查
格式化代码
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A high-performance server for analyzing GitHub user starred repositories, providing insights into development trends, technology adoption patterns, and timeline tracking.
Related MCP Servers
- AsecurityAlicenseAqualityProvides comprehensive tools for managing GitHub projects, milestones, tasks, and sprints. This server integrates deeply with GitHub Projects V2, offering features like automated kanban workflows, sprint planning, and custom field management.Last updated -461151TypeScriptMIT License
- AsecurityFlicenseAqualityProvides tools for mapping and analyzing GitHub repositories. It allows users to set a GitHub Personal Access Token and retrieve detailed information about a specified repository, including its structure and summary statistics.Last updated -218TypeScript
- AsecurityFlicenseAqualityGenerates comprehensive and formatted release notes from GitHub repositories, efficiently organizing commits by type and including detailed statistics using smart API usage.Last updated -32TypeScript
- AsecurityAlicenseAqualityA TypeScript server that analyzes GitHub Pull Requests using the Model-Controller-Presenter pattern.Last updated -15TypeScriptMIT License