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

mcp-lucide-downloader

v1.0.0

Published

An MCP server for fetching and downloading Lucide icons with customizable styles.

Readme

mcp-lucide-downloader

项目简介

项目主要用于在不支持 svg 场景,例如:微信小程序

mcp-lucide-downloader 是一个基于 Model Context Protocol (MCP) 的服务端项目,旨在提供便捷的 Lucide 图标获取与下载工具。它允许 AI 助手或其他 MCP 客户端动态地访问 Lucide 图标,自定义其样式(如颜色、尺寸和描边宽度),并支持直接获取原始的 SVG 字符串或将其保存到本地文件系统中。

该项目解决了在开发过程中需要手动搜索、调整样式和下载图标的痛点,通过将图标管理直接集成到支持 MCP 的环境中,极大地简化了工作流。

快速开始

前置准备

  • Node.js (推荐 v18 或更高版本)
  • pnpmnpm 包管理器

安装

克隆仓库并安装依赖:

git clone https://github.com/your-username/mcp-lucide-downloader.git
cd mcp-lucide-downloader
pnpm install

基础用法

构建项目并启动 MCP 服务:

pnpm run build
node build/index.js

若要在 MCP 客户端(如 Cursor)中使用,请在客户端设置中配置该服务以运行构建后的脚本。

配置与使用说明

该服务暴露了两个主要的 MCP 工具:

1. get_lucide_svg

返回特定 Lucide 图标的原始 SVG 字符串。

参数:

  • iconName (字符串,必填):Lucide 图标的名称,使用大驼峰命名法(PascalCase),例如 "MapPin", "User"。
  • color (字符串,选填):图标的描边颜色。默认值为 "currentColor"
  • size (数字,选填):图标的尺寸(宽度和高度),单位为像素。默认值为 24
  • strokeWidth (数字,选填):图标的描边宽度。默认值为 2

2. save_lucide_svg

将 Lucide 图标作为 SVG 文件保存到指定的本地目录中。

参数:

  • iconName (字符串,必填):Lucide 图标的名称(大驼峰命名法)。
  • targetDir (字符串,必填):SVG 文件保存的目标目录路径。
  • fileName (字符串,选填):自定义文件名(例如 "my-icon.svg")。如果不提供,则默认使用图标名称的短横线命名法(kebab-case)。
  • color (字符串,选填):图标的描边颜色。默认值为 "currentColor"
  • size (数字,选填):图标的尺寸。默认值为 24
  • strokeWidth (数字,选填):图标的描边宽度。默认值为 2

基础事例

获取 SVG 字符串

当 MCP 客户端使用以下参数调用 get_lucide_svg 时:

{
    "iconName": "ShieldAlert",
    "color": "#ff0000",
    "size": 32
}

服务端将返回应用了指定样式的原始 SVG 字符串。

保存 SVG 到本地磁盘

当 MCP 客户端使用以下参数调用 save_lucide_svg 时:

{
    "iconName": "User",
    "targetDir": "./src/assets/icons",
    "fileName": "user-icon.svg",
    "color": "#10b981"
}

服务端将生成带有样式的 SVG,并将其保存到 ./src/assets/icons/user-icon.svg