Skip to main content
Glama

MCP Tool

by PiuQiuPiaQia

mcp-tool

基于 @modelcontextprotocol/sdk 构建的 San 组件生成工具。

功能特点

  • 快速生成 San 组件基础结构
  • 支持 TypeScript 类型定义
  • 自动集成 Cosmic UI 组件库
  • 提供组件样式文件生成

快速开始

# 全局安装 npm install -g mcp-tool # 或者使用 yarn yarn global add mcp-tool

项目结构

mcp-tool/ ├── src/ │ ├── tools/ # MCP 工具目录 │ │ └── san/ # San 组件生成工具 │ │ ├── config/ # 配置文件 │ │ └── index.ts # 工具实现 │ └── index.ts # 服务器入口文件 ├── package.json └── tsconfig.json

配置 Cursor

在 Cursor 配置中添加以下配置:

{ "mcpServers": { "mcp-tool": { "command": "node", "args": ["/[你的路径]/mcp-tool/dist/index.js"] } } }

San 工具使用

工具支持以下参数:

{ componentName: string; // 组件名称(使用 PascalCase 命名规范) description?: string; // 组件的功能描述(可选) features?: string; // 需要包含的特性,支持: // - template: 模板 // - style: 样式 // - computed: 计算属性 // - lifecycle: 生命周期 // - typescript: TypeScript支持 selectedComponents?: string[]; // 选择使用的 Cosmic 组件列表 }

使用示例

  1. 查询可用组件:
// 不传入 componentName 时,返回所有可用的 Cosmic 组件列表 { "componentName": "" }
  1. 生成组件:
{ "componentName": "MyComponent", "description": "这是一个示例组件", "features": "template,style,typescript" }

开发指南

  1. 克隆项目
git clone [项目地址] cd mcp-tool
  1. 安装依赖
yarn install
  1. 开发模式
yarn watch
  1. 构建项目
yarn build

注意事项

  1. 生成的组件默认包含 Button 组件作为示例
  2. 组件名称必须使用 PascalCase 命名规范
  3. 样式文件使用 Less 预处理器

License

MIT

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Tools

A server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.

  1. 功能特点
    1. 快速开始
      1. 项目结构
        1. 配置 Cursor
          1. San 工具使用
            1. 使用示例
          2. 开发指南
            1. 注意事项
              1. License

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Python-based server that implements the Model Context Protocol to interface with Claude Desktop as an MCP client, supporting interaction through efficient memory management.
                  Last updated -
                  1
                  Python
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.
                  Last updated -
                  48
                  4
                  TypeScript
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A utility tool that enables Claude Desktop to interact with external tools via the Model Context Protocol, providing features like email sending and simple calculations while simplifying the MCP setup process.
                  Last updated -
                  129
                  9
                  JavaScript
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that automatically reads the Claude Desktop configuration file and presents all available MCP services in an easy-to-copy format at the top of the tools list.
                  Last updated -
                  1
                  1
                  3
                  JavaScript
                  MIT License
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/PiuQiuPiaQia/mcp-tool'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server