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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aisf/mcp-client

v1.0.9

Published

AISF MCP Client - Node.js 版本,作为 MCP Server 与 Cursor/Claude Desktop 通信

Readme

AISF MCP Client (Node.js 版本)

概述

AISF MCP Client 是本地客户端,作为 MCP Server 与 Cursor/Claude Desktop 通信,通过 REST API 调用远程服务器上的功能。

这是 Node.js 版本的实现,支持通过 npx 进行配置。

功能

提供以下 MCP 工具接口:

  • 初始化项目代码仓库:通过 REST API 在服务器上执行初始化脚本。代码在服务器上。
  • 生成前端界面:从服务器获取模板规范流程文档,并将代码生成到本地。
  • 后端接口及前后端联调:从服务器获取模板规范流程文档,并将代码生成到本地。
  • 配置菜单:从服务器获取模板规范流程文档。将菜单配置的文档生成到本地并在本地完成配置菜单接口调用;
  • 自动化测试:从服务器获取模板规范流程文档,并将测试代码生成到本地。
  • 更新代码:将服务器上的代码拉取到本地(只有初始化之后需要用到)。

安装

推荐使用 npx 方式(无需本地安装)

此包设计为通过 npx 直接运行,无需本地安装。只需确保已安装 Node.js >= 18.0.0。

使用 npx(推荐)

# 运行配置工具
npx @aisf/mcp-client configure

# 或直接运行 MCP client(在 Cursor/Claude Desktop 配置中使用)
npx @aisf/mcp-client

本地安装(可选)

如果需要本地安装:

cd aisf-node-mcp-client
npm install
npm run configure

配置

使用配置工具(推荐)

运行配置工具,它会引导您完成配置并生成配置文件:

npx @aisf/mcp-client configure

配置工具会:

  1. 提示您输入服务器 URL(默认:http://192.168.1.7:10190)
  2. 提示您输入本地代码路径(默认:~/codes/taobao/kaggle)
  3. 选择配置方式(npx 方式或本地路径方式)
  4. 生成 Cursor 和 Claude Desktop 的配置
  5. 可选择将配置保存到本地文件

手动配置

方式一:使用 npx(推荐,无需本地安装)

Cursor 配置

在 Cursor 设置中添加 MCP Server 配置:

{
  "aisf_mcp": {
    "command": "npx",
    "args": ["-y", "@aisf/mcp-client@latest"],
    "env": {
      "AISF_SERVER_URL": "http://192.168.1.7:10190",
      "AISF_LOCAL_CODE_PATH": "~/codes/taobao/kaggle"
    }
  },
}

Claude Desktop 配置

在 Claude Desktop 配置文件中添加:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "aisf-mcp": {
      "command": "npx",
      "args": ["-y", "@aisf/mcp-client"],
      "env": {
        "AISF_SERVER_URL": "http://192.168.1.7:10190",
        "AISF_LOCAL_CODE_PATH": "~/codes/taobao/kaggle"
      }
    }
  }
}

配置说明:

  • command: 使用 npx 命令
  • args: ["-y", "@aisf/mcp-client"] - -y 表示自动确认,无需交互
  • env.AISF_SERVER_URL: 服务器 REST API 地址(默认:http://192.168.1.7:10190)
  • env.AISF_LOCAL_CODE_PATH: 本地代码保存路径(可选,默认:~/codes/taobao/kaggle)

优点:

  • ✅ 无需本地安装包
  • ✅ 自动使用最新版本
  • ✅ 配置简单,无需管理路径

方式二:使用本地路径(备选方案)

如果您已经本地安装了包,可以使用本地路径:

Cursor 配置:

{
  "aisf_mcp": {
    "command": "node",
    "args": ["/absolute/path/to/aisf-node-mcp-client/src/index.js"],
    "env": {
      "AISF_SERVER_URL": "http://192.168.1.7:10190",
      "AISF_LOCAL_CODE_PATH": "~/codes/taobao/kaggle"
    }
  }
}

Claude Desktop 配置:

{
  "mcpServers": {
    "aisf-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/aisf-node-mcp-client/src/index.js"],
      "env": {
        "AISF_SERVER_URL": "http://192.168.1.7:10190",
        "AISF_LOCAL_CODE_PATH": "~/codes/taobao/kaggle"
      }
    }
  }
}

注意:请将 /absolute/path/to/aisf-node-mcp-client 替换为实际的绝对路径。

配置完成后,重启 Cursor/Claude Desktop 即可使用。

工作流程

  1. 用户在 Cursor/Claude 中调用 MCP 工具
  2. Client 在本地接收请求
  3. Client 通过 HTTP REST API 调用服务器
  4. 服务器执行相应的操作并返回结果
  5. Client 将结果返回给 Cursor/Claude

环境变量

  • AISF_SERVER_URL: 服务器 REST API 地址(默认:http://192.168.1.7:10190)
  • AISF_LOCAL_CODE_PATH: 本地代码保存路径(可选,默认:~/codes/taobao/kaggle)
    • 支持绝对路径和相对路径(使用 ~ 表示用户主目录)
    • 例如:/Users/username/projects~/projects/mycode

故障排查

无法连接到服务器

检查服务器地址和端口:

curl http://192.168.1.7:10190/

应该返回 API 信息。

API 请求失败

检查服务器是否正常运行:

curl http://192.168.1.7:10190/api/init-project -X POST -H "Content-Type: application/json" -d '{"tech_stack":"JeecgBoot","project_name":"test"}'

代码更新失败

确保本地有 Git 客户端,并且可以访问 GitLab:

git --version
ssh -T [email protected] -p 15822

Node.js 版本问题

确保 Node.js 版本 >= 18.0.0:

node --version

依赖

  • Node.js >= 18.0.0
  • @modelcontextprotocol/sdk >= 0.5.0
  • axios >= 1.6.0

与 Python 版本的对比

| 特性 | Node.js 版本 | Python 版本 | |------|-------------|-------------| | 配置方式 | npx 配置工具 + 手动配置 | 手动配置 | | 运行方式 | node / npx | python3 | | 依赖管理 | npm | pip | | 性能 | 良好 | 良好 |

发布

关于如何发布此包到 npm,请参阅 发布指南

相关文档