关于 fabric-mcp-server
fabric-mcp-server 将 Daniel Miessler 的 Fabric patterns 作为可执行工具提供给 AI 编码 Agent 和助手,适合希望在 MCP 兼容任务工作流中运行 patterns 的用户。
主要功能
- 01将 Fabric patterns 暴露为工具
- 02在任务中运行选定 pattern
- 03支持 Claude Desktop 和 Cline
- 04适配 MCP 兼容 Agent
适用场景
- 01用 Fabric pattern 总结内容
- 02在 Agent 任务中分析论点
- 03创建 Mermaid 可视化图
MCP 相关
将 Fabric patterns 作为独立工具提供给 MCP 兼容客户端和 Agent,包括 Claude Desktop 与 Cline。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
fabric-mcp-server
目录
- 简介
- 什么是模型上下文协议(MCP)?
- 功能
- 工具
- 安装
- 使用方法
- Claude Desktop 配置
- 在 VS Code 中使用 Cline 的配置
- 与不同 AI Agent 搭配使用的技巧
- 故障排除
- 贡献
- 许可证
简介
fabric-mcp-server 是一个模型上下文协议(MCP)服务,旨在将 Daniel Miessler 的 Fabric 模式作为工具开放出来,以便与 AI 编码 Agent 和助手集成。此集成通过利用 Fabric 仓库中由 AI 驱动的模式执行能力,增强 AI 的功能。该服务可与 Claude Desktop、Cline 及其他兼容 MCP 的 AI Agent 配合使用。
什么是模型上下文协议(MCP)?
模型上下文协议(MCP)是一项规范,用于促进 AI 系统与外部工具或资源之间的通信。它统一了 AI 模型与数据库、API 和文件系统等各种功能交互的方式。fabric-mcp-server 等 MCP 服务会实现此协议,让 AI 模型能够访问工具和资源,从而扩展其功能范围。
功能
- 将 Fabric 模式作为工具开放:该服务会将所有 Fabric 模式作为独立工具提供给兼容 MCP 的 AI Agent。
- 模式执行:用户可在 AI 助手任务中直接选择并执行 Fabric 模式。
- 增强功能:集成由 AI 驱动的模式执行能力,扩展 AI 助手的功能。
- 跨平台兼容:可与 Claude Desktop、Cline 及其他兼容 MCP 的 AI Agent 配合使用。
工具
fabric-mcp-server 将大量 Fabric 模式作为工具开放。一些示例如下:
analyze_claimssummarizeextract_wisdomcreate_mermaid_visualization- 还有更多……
如需查看全部可用模式,请列出 [fabric/patterns](https://github.com/danielmiessler/Fabric/tree/main/data/patterns) 目录中的内容。
安装
- 克隆仓库:将
fabric-mcp-server仓库克隆到本地系统。 - 安装依赖项:进入
fabric-mcp-server目录并运行npm install。 - 构建项目:运行
npm run build以编译 TypeScript 代码。
使用方法
如需将 fabric-mcp-server 与 AI Agent 配合使用:
- 确保已安装并运行该服务。
- 在 AI Agent 的设置文件中配置 MCP 服务。
- 创建新任务或对话,并选择要使用的 Fabric 模式。
具体配置步骤因所用的 AI Agent 而异。详细说明请参阅下文各部分。
Claude Desktop 配置
若要在 Claude Desktop 中使用 fabric-mcp-server:
-
完成安装:按照上面的安装步骤构建项目。
-
配置 Claude Desktop:将 MCP 服务配置添加到 Claude Desktop 设置中。配置文件通常位于:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
-
添加服务配置:将以下内容添加到
claude_desktop_config.json:
{
"mcpServers": {
"fabric-mcp-server": {
"command": "node",
"args": [
"<path-to-fabric-mcp-server>/build/index.js"
],
"env": {}
}
}
}
将 <path-to-fabric-mcp-server> 替换为系统上 fabric-mcp-server 目录的实际路径。
- 重启 Claude Desktop:重启 Claude Desktop 以应用更改。
在 VS Code 中使用 Cline 的配置
若要在 VS Code 中通过 Cline 使用 fabric-mcp-server:
-
完成安装:按照上面的安装步骤构建项目。
-
配置 Cline 设置:将 MCP 服务配置添加到 Cline 设置文件中。文件路径因操作系统而异:
- Windows:
C:\Users\<username>\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_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
- Windows:
-
添加服务配置:使用以下配置:
{
"fabric-mcp-server": {
"command": "node",
"args": [
"<path-to-fabric-mcp-server>/build/index.js"
],
"env": {},
"disabled": false,
"autoApprove": [],
"transportType": "stdio",
"timeout": 60
}
}
将 <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"
- 重启 VS Code:重启 VS Code 或重新加载 Cline 扩展以应用更改。
使用不同 AI Agent 的提示
Claude Desktop 用户
- 在对话中直接提及你想使用 Fabric 模式
- 如果不确定使用哪种模式,可以让 Claude 列出可用模式
- 配置完成后,这些模式将自动作为工具提供
Cline 用户
若要充分发挥 fabric-mcp-server 与 Cline 配合使用的优势,请在提示词末尾添加 use fabric-mcp-server,或考虑将以下规则添加到 .clinerules 文件中:
# Fabric MCP Server Rule
1. **List Fabric Patterns**: When a new task is created, list all pattern names from the Fabric repository.
2. **Prompt for Pattern Selection**: Ask the user to select one of the following options:
a) Enter a pattern name from the list to use the `fabric-mcp-server` tool with the specified pattern.
b) Choose not to use `fabric-mcp-server` for the task.
此规则可简化 Cline 为新任务选择工具的流程。
其他兼容 MCP 的 Agent
- 查阅特定 AI Agent 的文档,了解 MCP 服务配置方法
- 基本服务配置应与上述示例类似
- 确保 Agent 支持 MCP 协议和工具执行
故障排除
- 确保已在 AI Agent 的设置中正确配置
fabric-mcp-server。 - 确认服务正在运行且可访问。
- 检查控制台输出中是否有错误消息。
- 确保 build/index.js 文件的路径正确且可访问。
- 确认系统 PATH 中已安装并可使用 Node.js。
贡献
欢迎为 fabric-mcp-server 做出贡献。贡献指南请参阅 CONTRIBUTING.md。
许可证
fabric-mcp-server 基于 MIT 许可证 发布。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。