使用说明
节点综合MCP服务器
一个全面的模型上下文协议(MCP)服务器,提供先进的Node.js开发工具和自动化功能。
特性
项目管理
- 项目创建:为新项目搭建支架,内置支持:
- 反应
- Next.js
- 快速
- 禁食
- 普通Node.js
- TypeScript集成:自动TypeScript配置和设置
- 包管理:智能依赖安装和版本管理
组件生成
- 创建React组件(基于函数或类)
- TypeScript接口生成
- 自动道具类型定义
- 组件文档生成
配置管理
- TypeScript配置管理
- NPM脚本管理
- Package.json更新
- 环境设置
文档
- 生成项目README
- API文档
- 组件文档
- TypeScript类型定义文档
人工智能辅助
- 项目创建指导
- 代码分析和改进
- 组件生成辅助
- Git提交消息建议
- 调试协助出错
安装
通过Smithery安装
通过以下方式自动安装Claude Desktop的Node Omnibus服务器 史密瑟里:
npx -y @smithery/cli install @bsmi021/mcp-node-omnibus-server --client claude
- 克隆存储库
- 安装依赖项:
npm install
用法
服务器使用stdio上的模型上下文协议进行操作。它可以与任何兼容MCP的客户端集成。
启动服务器
npm start
可用工具
-
create_project{ name: string; type: 'react' | 'node' | 'next' | 'express' | 'fastify'; path: string; typescript?: boolean; } -
install_packages{ packages: string[]; path: string; dev?: boolean; } -
generate_component{ name: string; path: string; type: 'functional' | 'class'; props?: Record<string, string>; } -
create_type_definition{ name: string; path: string; properties: Record<string, string>; } -
add_script{ path: string; name: string; command: string; } -
update_tsconfig{ path: string; options: Record<string, unknown>; } -
create_documentation{ path: string; type: 'readme' | 'api' | 'component'; name?: string; }
可用提示
-
create-project{ projectType: string; // react, node, next, express, fastify features?: string; // comma-separated list of features } -
analyze-code{ code: string; language: string; } -
generate-component{ name: string; type: string; // functional or class } -
git-commit{ changes: string; // Git diff or description of changes } -
debug-error{ error: string; // Error message or stack trace }
项目结构
node-omnibus-server/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript
├── node_modules/ # Dependencies
├── package.json # Project configuration
└── tsconfig.json # TypeScript configuration
发展
建筑
npm run build
运行测试
npm test
发展模式
npm run dev
整合
VSCode配置
添加到VSCode设置中:
{
"mcpServers": {
"node-omnibus": {
"command": "node",
"args": ["path/to/node-omnibus-server/dist/index.js"]
}
}
}
客户端使用示例
const client = new McpClient();
await client.connect(transport);
// Create a new React project
const result = await client.callTool('create_project', {
name: 'my-app',
type: 'react',
path: './projects',
typescript: true
});
// Use AI assistance for project setup
const guidance = await client.getPrompt('create-project', {
projectType: 'react',
features: 'typescript,testing,docker'
});
贡献
- 分叉存储库
- 创建要素分支
- 进行更改
- 提交拉取请求
许可证
MIT许可证-有关详细信息,请参阅许可证文件
需求
- Node.js>=14.x
- npm>=6.x
- TypeScript>=4.x
依赖项
- @模型上下文协议/sdk
- 轴
- 打字稿(dev)