npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@geoqgisuni/brand-analysis-mcp

v0.3.1

Published

品牌分析MCP服务 - 将品牌分析HTTP API封装为MCP协议

Readme

品牌分析 MCP 服务器

将品牌分析HTTP API封装为MCP (Model Context Protocol) 服务,供AI Agent调用。

功能特性

  • 13个品牌分析接口工具
  • 网关认证与Token自动刷新
  • TypeScript类型安全
  • stdio (npx) 方式部署

安装使用

1. 全局安装

npm install -g brand-analysis-mcp

2. 配置Claude Desktop

在Claude Desktop配置文件中添加:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "brand-analysis": {
      "command": "npx",
      "args": ["brand-analysis-mcp"]
    }
  }
}

3. 本地开发

# 克隆项目
git clone <repo-url>
cd brand-mcp

# 安装依赖
npm install

# 构建
npm run build

# 启动服务
npm start

可用工具

| 工具名 | 说明 | |--------|------| | get_brand_info | 查询品牌基本信息 | | get_brand_categories | 获取品牌分类 | | get_city_tiers | 获取城市等级 | | get_brand_region_coverage | 品牌覆盖行政区划 | | get_nearby_business | 品牌周边业态 | | get_city_brands | 城市覆盖品牌 | | get_store_count | 品牌门店量 | | get_store_region_coverage | 门店覆盖区划 | | get_store_history | 门店历史 | | get_recent_stores | 最近门店 | | get_brand_relations | 品牌关联度 | | get_brand_logo | 品牌图标URL | | get_updated_date | 数据更新时间 |

技术栈

  • 运行时: Node.js >= 18
  • 语言: TypeScript
  • MCP SDK: @modelcontextprotocol/sdk
  • HTTP客户端: axios

项目结构

brand-mcp/
├── src/
│   ├── auth/           # 认证模块
│   │   └── gateway-auth.ts
│   ├── tools/          # 工具实现
│   │   └── brand-tools.ts
│   ├── types/          # 类型定义
│   │   └── brand-api.ts
│   └── index.ts        # MCP服务器入口
├── docs/               # 项目文档
├── tests/              # 测试文件
├── scripts/            # 脚本工具
└── dist/               # 编译输出

配置

网关认证

服务需要配置网关Ticket进行认证。

方式一:环境变量

export BRAND_GATEWAY_TICKET="<your-ticket-here>"
npm start

方式二:.env 文件

在项目根目录创建 .env 文件:

BRAND_GATEWAY_TICKET=<your-ticket-here>

⚠️ 注意

  • Token有效期2小时,服务会自动在过期前5分钟刷新
  • .env 文件已在 .gitignore 中,不会被提交到版本控制

添加新工具

  1. src/tools/brand-tools.ts 添加工具方法
  2. src/index.tsTOOLS 数组添加工具定义
  3. CallToolRequestSchema 处理器添加调用逻辑
  4. 重新构建:npm run build

参考文档

License

MIT