一个MCP服务器,它将Fabric模式作为Cline的工具暴露出来,从而能够在Cline任务中直接进行由AI驱动的模式执行。
299 查看 · 2026-07-07 更新
简介
一个MCP服务器,它将Fabric模式作为Cline的工具暴露出来,从而能够在Cline任务中直接进行由AI驱动的模式执行。
简介
一个MCP服务器,它将Fabric模式作为Cline的工具暴露出来,从而能够在Cline任务中直接进行由AI驱动的模式执行。
fabric-mcp-server
目录
简介
fabric-mcp-server 是一个模型上下文协议 (MCP) 服务器,旨在将 Fabric 模式作为工具暴露出来,以便与 Cline 集成。这种集成通过利用来自 Fabric 仓库的 AI 驱动模式执行来增强 Cline 的功能。
什么是模型上下文协议 (MCP)?
模型上下文协议 (MCP) 是一种规范,它促进了 AI 系统与外部工具或资源之间的通信。它标准化了 AI 模型与各种能力(如数据库、API 和文件系统)交互的方式。像 fabric-mcp-server 这样的 MCP 服务器实现了这一协议,使工具和资源对 AI 模型可访问,从而扩展了它们的功能范围。
特性
- 将 Fabric 模式作为工具暴露: 该服务器将所有 Fabric 模式作为单独的工具在 Cline 中提供。
- 模式执行: 用户可以在 Cline 任务中直接选择并执行 Fabric 模式。
- 增强功能: 通过集成 AI 驱动的模式执行来增强 Cline 的功能。
工具
fabric-mcp-server 将广泛的 Fabric 模式作为工具暴露出来。一些示例包括:
analyze_claimssummarizeextract_wisdomcreate_mermaid_visualization- 以及更多...
要查看所有可用模式的完整列表,可以列出 fabric/patterns 目录中的目录。
安装
- 克隆仓库: 将
fabric-mcp-server仓库克隆到本地系统。 - 安装依赖项: 进入
fabric-mcp-server目录并运行npm install。 - 构建项目: 运行
npm run build来编译 TypeScript 代码。
使用方法
要将 fabric-mcp-server 与 Cline 一起使用:
- 确保服务器已安装并正在运行。
- 在 Cline 设置文件中配置 MCP 服务器。
- 在 Cline 中创建一个新任务,并选择一个 Fabric 模式来使用。
与 VS Code 配合使用的配置
-
克隆仓库: 将
fabric-mcp-server仓库克隆到本地系统。 -
安装依赖项: 进入
fabric-mcp-server目录并运行npm install。 -
构建项目: 运行
npm run build。 -
配置 Cline 设置: 将 MCP 服务器配置添加到 Cline 设置文件中。文件路径因操作系统而异:
- Windows:
C:Users<username>AppDataRoamingCodeUserglobalStoragesaoudrizwan.claude-devsettingscline_mcp_settings.json - macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Linux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
使用以下配置: json "fabric-mcp-server": { "command": "node", "args": [ "
/build/index.js" ], "env": {}, "disabled": false, "autoApprove": [], "transportType": "stdio", "timeout": 60 } - Windows:
将 <path-to-fabric-mcp-server> 替换为系统上 fabric-mcp-server 目录的实际路径。例如:
- Windows:
"C:\path\to\fabric-mcp-server\build\index.js" - macOS/Linux:
"/path/to/fabric-mcp-server/build/index.js"
- 重启 VSCode: 重启 VSCode 或重新加载 Cline 扩展以应用更改。
与 Cline 配合使用的技巧
为了最大化 fabric-mcp-server 与 Cline 的好处,在提示的末尾添加 use fabric-mcp-server,或者考虑在 .clinerules 文件中添加以下规则:
Fabric MCP Server 规则
- 列出 Fabric 模式: 当创建新任务时,列出 Fabric 仓库中的所有模式名称。
- 提示选择模式: 询问用户选择以下选项之一:
a) 从列表中输入一个模式名称,以使用指定模式的
fabric-mcp-server工具。 b) 选择不使用fabric-mcp-server进行任务。此规则简化了Cline中为新任务选择工具的过程。
故障排除
- 确保
fabric-mcp-server已在您的Cline设置中正确配置。 - 确认服务器正在运行且可访问。
- 检查控制台输出中的任何错误信息。
贡献
欢迎对fabric-mcp-server做出贡献。请参考CONTRIBUTING.md文件以获取贡献指南。
许可证
fabric-mcp-server是在MIT License下发布的。
工具列表
- recommend_tool: Recommends the best Fabric pattern tool for a given task
服务配置
[{'mcpServers': {'fabric-mcp-server': {'args': ['<path-to-fabric-mcp-server>/build/index.js'], 'command': 'node', 'env': {}}}}]
来源
- 来源:github
- 链接:https://github.com/adapoet/fabric-mcp-server