使用说明
MCP远程服务器(Node.js版本)
这是BluestoneApps编码标准和示例MCP服务器的Node.js实现。
概述
此MCP服务器通过模型上下文协议(MCP)提供对React Native编码标准和代码示例的访问。它可以与Windsurf IDE等MCP客户端一起使用。
特性
- 获取React Native编码标准
- 组件、钩子、屏幕、服务和主题代码示例
- 按名称查找示例的模糊匹配
- 与MCP协议完全集成
安装
- 克隆此存储库
- 安装依赖项:
npm install - 构建项目:
npm run build
用法
启动服务器:
npm start
要与MCP客户端一起使用,请将它们配置为连接到此服务器。
工具
服务器提供以下工具:
get_project_structure:获取项目结构标准get_api_communication:获取API通信标准get_component_design:获取组件设计标准get_state_management:获得州管理标准get_component_example:获取特定组件示例get_hook_example:获取一个特定的钩子示例get_service_example:获取具体的服务示例get_screen_example:获取一个特定的屏幕示例get_theme_example:获取特定主题示例list_available_examples:列出所有可用的代码示例
使用MCP客户端进行配置
对于Windsurf IDE,请更新 mcp_config.json 与:
{
"servers": {
"bluestoneapps": {
"command": "node",
"args": ["/path/to/build/index.js"],
"description": "BluestoneApps Coding Standards and Examples",
"displayName": "BluestoneApps MCP Server",
"timeout": 30000
}
}
}