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

@iflow-mcp/swiftcode-mcp-server

v1.1.0

Published

MCP server for Swiftcode - Automatic code generation tool for Swagger API and Vue components

Readme

Swiftcode MCP Server

简体中文 | English

项目简介

Swiftcode MCP Server 是一个基于 Model Context Protocol (MCP) 的服务端,专注于自动化代码生成,支持现代 Web 开发流程。它可以根据 Swagger/OpenAPI 规范自动生成 TypeScript API 客户端,以及基于模板快速生成 Vue 列表页面组件,极大提升前后端开发效率。

功能特性

  • Swagger/OpenAPI 转 TypeScript:自动生成 TypeScript API 客户端和类型定义。
  • Vue 组件生成:一键生成包含表格、筛选、分页等功能的 Vue 3 列表页面。
  • 模板管理:获取和使用预置的代码生成模板。
  • 代码校验:支持 Swagger/OpenAPI 规范校验。
  • Mock 数据生成:可选生成前端开发用的 mock 数据。

支持技术

  • 前端框架:Vue 3(Composition API)、Element Plus、TypeScript
  • API 规范:Swagger 2.0、OpenAPI 3.0+(JSON/YAML)
  • 生成代码:TypeScript 接口/types、Vue 3 组件、Element Plus 表单与表格

工具列表

1. generate_api_client

根据 Swagger/OpenAPI 规范生成 TypeScript API 客户端

参数:

  • source (string):Swagger/OpenAPI 文件路径或 URL
  • dir (string):输出目录

示例:

{
  "source": "/mock/swagger.json",
  "dir": "./"
}

2. generate_sfc_template_client

下载并生成 SFC/Vue 列表模板文件到指定目录

参数:

  • dir (string):输出目录

示例:

{
  "dir": "./"
}

3. generate_sfc_client

基于模板文件生成 Vue 列表组件

参数:

  • source (string):模板文件路径
  • dir (string):输出目录

示例:

{
  "source": "template.js",
  "dir": "./"
}

快速开始

NPX (推荐)

MCP Server 客户端配置:

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

本地开发启动

pnpm install

# 编译 mcp
ppm build

# 启动 mcp 调试器
pnpm inspector

MCP Server 客户端配置:

{
  "mcpServers": {
    // 本地开发
    "swiftcode-local": {
      "command": "node",
      "args": ["swiftcode-mcp-server/dist/index.js"]
    }
  }
}

Docker 方式

docker build -t swiftcode-mcp .
docker run -it swiftcode-mcp

使用示例

生成 API 客户端

{
  "source": "/user/swagger.json",
  "dir": "./"
}

生成 Vue 列表组件

{
  "source": "template.js",
  "dir": "./"
}

贡献指南

  1. Fork 本仓库
  2. 新建功能分支
  3. 提交你的更改
  4. 如有需要请补充测试
  5. 提交 Pull Request

License

MIT


如需更多帮助或有任何问题,请访问 GitHub 仓库