Skip to main content
Glama

mcp-tool

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

功能特点

  • 快速生成 San 组件基础结构

  • 支持 TypeScript 类型定义

  • 自动集成 Cosmic UI 组件库

  • 提供组件样式文件生成

Related MCP server: discord-mcp

快速开始

# 全局安装
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

Available Tools

1 tool
sanD
ParametersJSON Schema
NameRequiredDescriptionDefault
componentNameYes组件名称(使用PascalCase命名规范)
featuresNo需要包含的特性,使用逗号分隔:template-模板, style-样式, computed-计算属性, lifecycle-生命周期, typescript-TypeScript支持。
descriptionNo组件的功能描述(可选)
selectedComponentsNo选择使用的组件列表

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool update
    • First observedsan

TDQS

D1.7/5.0
Disambiguation5/5

With only one tool named 'san', there is no possibility of ambiguity or overlap with other tools. The single tool stands alone without any confusion risk.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare against. The name 'san' follows no pattern but does not conflict with anything else.

Tool Count2/5

One tool is generally too few for most server purposes, indicating a thin or incomplete surface. Without a description, it's unclear if this minimal set is justified, but it likely represents an extreme mismatch for typical MCP server functionality.

Completeness1/5

With only one tool and no description provided, it is impossible to assess coverage of any domain. The surface is severely incomplete, as no operations or lifecycle can be inferred, making it highly likely to cause agent failures.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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