Skip to main content
Glama
Micro66

daily-hot-mcp

by Micro66
README.md
# daily-hot-mcp

**测试 MCP Server(standalone)**:测试数据查询,并提供 **高性能内存 TTL 缓存**(可配置缓存时间)。

## 依赖

- Node.js >= 20(建议 22+)

## 运行方式

构建并启动 MCP:

```bash
cd ../daily-hot-mcp
npm i
npm run build
npm run start
```

## 环境变量

- `DAILY_HOT_CACHE_TTL_MS`:默认缓存毫秒数,默认 `60000`
- `DAILY_HOT_TIMEOUT_MS`:请求超时毫秒数,默认 `10000`
- `DAILY_HOT_MAX_CONCURRENCY`:批量请求最大并发,默认 `6`

## MCP Tools

- `daily_hot_list_sources`:列出全部热榜来源(30 个)
- `daily_hot_get`:获取单个来源热榜(支持 `cacheTtlMs` / `forceRefresh` / `limit`)
- `daily_hot_get_multi`:批量获取多个来源热榜
- `daily_hot_cache_stats`:查看缓存命中统计
- `daily_hot_cache_clear`:清空缓存

## Claude Desktop 配置示例

把下面添加到你的 `claude_desktop_config.json`(按需调整路径):

```json
{
  "mcpServers": {
    "daily-hot": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/daily-hot-mcp/dist/index.js"],
      "env": {
        "DAILY_HOT_CACHE_TTL_MS": "60000"
      }
    }
  }
}
```

## 用 MCP Inspector 测试(Web UI)

先构建:

```bash
npm run build
```

再启动 Inspector(建议给 npx 单独指定可写缓存目录,避免 `~/.npm` 权限问题):

```bash
mkdir -p .npm-cache
NPM_CONFIG_CACHE="$PWD/.npm-cache" npx -y @modelcontextprotocol/inspector --config ./mcp_config.json
```

## ⚠️ 免责声明

> ⚠️ **重要提醒:请仔细阅读以下声明**

### 📋 使用条款

1. **数据来源**:本项目通过公开 API 和网页抓取获取数据,仅供学习和研究使用
2. **合规使用**:用户需遵守各平台的使用条款和相关法律法规
3. **商业使用**:禁止将本项目用于任何商业用途
4. **数据准确性**:不保证数据的实时性和准确性

### 🛡️ 责任限制

- 本项目仅供技术研究和学习交流使用
- 任何因使用本项目产生的法律风险由使用者自行承担
- 如有平台方要求移除相关接口,请及时联系我们处理
- 项目维护者不承担任何直接或间接的损失责任

TDQS

A4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: cache management (clear/stats), single-source retrieval, multi-source retrieval, and source listing. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent snake_case pattern with the prefix 'daily_hot_' and verb_noun structure (e.g., daily_hot_get, daily_hot_list_sources). No naming irregularities.

Tool Count5/5

With 5 tools covering core operations (list sources, get single/multiple, cache management), the count is well-scoped for the server's purpose—neither too sparse nor excessive.

Completeness5/5

The tool surface covers all essential operations: source enumeration, data retrieval (single and batch), and cache introspection/control. No obvious gaps for the intended use case.

Maintenance

ActivityInactive
ResponsivenessNo issues