@osqi/cmcc-tariff-rag
v0.3.0
Published
Lightweight MCP client for the CMCC Tariff Retrieval API
Readme
CMCC Tariff RAG MCP
轻量级 TypeScript MCP Server,通过 HTTPS 调用 CMCC Tariff Retrieval API v1.0.3。本包不直接读取 LanceDB/Qdrant,也不加载本地 Embedding 模型。
Hermes Agent 配置
mcp_servers:
cmcc_tariffs:
command: npx
args: [-y, "@osqi/[email protected]", serve]
env:
TARIFF_API_URL: https://你的资费API地址
TARIFF_API_KEY: 你的普通API_KEY
TARIFF_API_TIMEOUT: "60"
npm_config_cache: /opt/data/npm-cache
tools:
include: [search_tariffs, get_tariff, compare_tariffs, tariff_stats]
resources: false
prompts: false
connect_timeout: 120
timeout: 120
enabled: true仅使用普通业务API Key,不要向MCP配置管理员Key。API Key不会作为Tool参数提供给模型。
工具
search_tariffs:语义检索和结构化条件筛选。get_tariff:按方案编号读取完整记录。compare_tariffs:批量读取2至20个方案用于对比。tariff_stats:检查知识库就绪状态和数量。
回答用户时应携带方案编号,并提示“以中国移动最新公示及实际办理资格为准”。
命令行诊断
TARIFF_API_URL=https://tariff.example.com \
TARIFF_API_KEY=replace_with_regular_api_key \
npx -y @osqi/[email protected] status开发
npm install
npm test
npm pack --dry-run要求Node.js 20或更高版本。包仅使用Node.js原生fetch,不包含ONNX、LanceDB、Qdrant或模型文件。
