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

@context-cn/mcp

v0.1.2

Published

MCP documentation server for Chinese developer ecosystem

Downloads

42

Readme

@context-cn/mcp

为中国开发生态提供高质量框架文档的 MCP Server。通过 MCP 协议 对接 AI 编码助手,让 AI 基于真实文档而非记忆回答问题,减少幻觉和编码错误。

已收录框架

| 框架 | 说明 | |------|------| | Laravel | PHP 框架 | | ThinkPHP | PHP 框架 | | 企业微信 API | 开放平台接口 |

持续扩展中,欢迎提 Issue 建议收录。

快速开始

Claude Code

claude mcp add context-cn -- npx -y @context-cn/mcp

Cursor

Settings > MCP Servers,添加:

{
  "mcpServers": {
    "context-cn": {
      "command": "npx",
      "args": ["-y", "@context-cn/mcp"]
    }
  }
}

OpenClaw

通过 CLI 添加:

openclaw mcp set context-cn '{"command":"npx","args":["-y","@context-cn/mcp"]}'

或手动编辑 ~/.openclaw/config.json

{
  "mcp": {
    "servers": {
      "context-cn": {
        "command": "npx",
        "args": ["-y", "@context-cn/mcp"]
      }
    }
  }
}

支持 DeepSeek 等 OpenAI 兼容模型,只要模型具备 tool use 能力即可正常调用。

Windsurf / Cline / 其他 MCP 客户端

配置格式相同,在对应客户端的 MCP 配置中添加上述 JSON 即可。

提供的工具

MCP Server 提供 3 个工具,AI 会自动按需调用:

search-libraries

搜索可用的框架和版本。

输入: { query: "laravel" }
返回: 框架名称、library_id、可用版本列表

list-modules

查看框架的完整模块结构(文档地图),帮助 AI 精确定位目标模块。

输入: { library_id: "laravel", version: "12.x" }
返回: 树形模块列表

query-docs

按主题搜索文档内容,返回包含参数说明、返回值的结构化文档,同时附带相关 FAQ。

输入: { library_id: "laravel", topic: "任务分发", module: "队列" }
返回: 匹配的文档片段 + 常见问题

工作原理

  • 首次使用某框架时,自动从远端同步该框架文档到本地 SQLite 缓存(~/.context-cn/cache.db
  • 后续查询走本地 FTS5 全文搜索,毫秒级响应
  • 后台增量同步,文档更新自动拉取,不阻塞查询
  • 离线可用,无网络时使用本地缓存

环境要求

  • Node.js >= 22.5.0

配置

支持通过环境变量自定义:

| 变量 | 说明 | 默认值 | |------|------|--------| | CONTEXT_CN_API_URL | 远端 API 地址 | https://context-cn.bangbangda.me | | CONTEXT_CN_DB_PATH | 本地缓存路径 | ~/.context-cn/cache.db |

License

MIT