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

delphi-doc-mcp

v1.0.2

Published

MCP server for Delphi documentation (DevExpress VCL & Free Pascal RTL)

Readme

Delphi Doc MCP

English

一个 Model Context Protocol (MCP) 服务器,为 AI 编程助手提供 Delphi 文档访问能力。

✨ 功能特点

  • 📚 多数据源支持 - DevExpress VCL + Free Pascal RTL (与 Delphi VCL 兼容)
  • 🔍 智能搜索 - 全文搜索,支持通配符 (*, ?) 和模糊匹配
  • 快速缓存 - 本地缓存,二次查询即时响应
  • 🤖 AI 友好 - 结构化 Markdown 输出,便于 LLM 理解

🚀 快速开始

安装

从 npm 安装(推荐):

npm install -g delphi-doc-mcp

从源码安装:

git clone https://github.com/LinFallen/delphi-doc-mcp.git
cd delphi-doc-mcp
npm install
npm run build

注意: 首次运行时,服务器会自动爬取文档数据。这需要几分钟,但只会执行一次。数据存储在 ~/.delphi-doc-mcp/

配置 Claude Desktop

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "delphi-docs": {
      "command": "npx",
      "args": ["delphi-doc-mcp@latest"]
    }
  }
}

注意: 首次运行时自动爬取文档(约2-5分钟)。数据缓存在 ~/.delphi-doc-mcp/

🧰 可用工具

| 工具 | 描述 | |------|------| | discover_units | 浏览/筛选可用的文档单元 | | choose_unit | 选择当前文档源和单元 | | current_unit | 显示当前选择和下一步操作 | | search_symbols | 搜索类、方法、属性 | | get_documentation | 获取符号的完整文档 | | get_version | 获取服务器版本和统计信息 |

🔄 典型工作流

1. 浏览 → discover_units { "query": "grid" }
2. 选择 → choose_unit { "source": "devexpress", "unit": "cxGrid" }
3. 搜索 → search_symbols { "query": "TcxGrid*" }
4. 查看 → get_documentation { "symbol": "TcxGrid" }

🔍 搜索技巧

  • 精确匹配: TcxGrid
  • 前缀匹配: Tcx*
  • 后缀匹配: *Grid
  • 包含匹配: *Data*
  • 模糊匹配: 自动启用,容错拼写错误

📁 项目结构

src/
├── index.ts           # 入口文件
├── model/             # 数据类型定义
├── crawler/           # 文档爬虫
│   ├── devexpress-crawler.ts   # DevExpress 文档
│   ├── fpc-crawler.ts          # Free Pascal RTL
│   └── vcl-crawler.ts          # DocWiki (Cloudflare 阻止)
├── parser/            # HTML 解析器
├── indexer/           # Lunr.js 搜索索引
└── server/            # MCP 服务器

📊 数据源状态

| 数据源 | 状态 | 命令 | |--------|------|------| | DevExpress VCL | ✅ 可用 | npm run crawl:devexpress | | Free Pascal RTL | ✅ 可用 | npm run crawl:fpc | | RAD Studio DocWiki | ⚠️ Cloudflare 保护 | npm run crawl:vcl |

注意: DocWiki 使用 Cloudflare 保护,无头浏览器无法访问。Free Pascal RTL 提供与 Delphi VCL 兼容的核心类文档 (TComponent, TList, TStream 等)。

🛠️ 开发

# 安装依赖
npm install

# 开发模式运行
npm run dev

# 测试单个类爬取
npm run crawl:devexpress -- --test https://docs.devexpress.com/VCL/cxGrid.TcxGrid
npm run crawl:fpc -- --test https://www.freepascal.org/docs-html/rtl/classes/tcomponent.html

# 生产构建
npm run build

# 运行测试
npm run test

📝 许可证

MIT