AI助手协议服务器

BMAD MCP服务器为AI助手提供11个专业代理和36+自动化工作流,实现统一的方法论访问和跨项目配置。

  • by mkellerman
  • TypeScript
  • 本地部署
  • 66 星标
  • 更新于
在 GitHub 查看 mkellerman/bmad-mcp-server

使用说明

BMAD MCP服务器

一个模型上下文协议服务器,它带来 BMAD方法 AI助手。

特性 • 安装 • 用法 • 文档


概述

BMAD MCP服务器为AI助手提供了11个专业代理和36个以上来自BMAD(果断构建现代应用程序)方法的自动化工作流程。配置一次,在所有项目中随处使用。

什么是BMAD?

BMAD是一种全面的软件开发方法,具有用于不同角色(业务分析师、架构师、开发人员、用户体验设计师等)的专业AI代理和用于常见任务(PRD生成、架构设计、调试、测试)的工作流。

为什么选择MCP?

MCP服务器提供通用访问,而不是将BMAD文件复制到每个项目:

  • ✅ 单一安装服务于所有项目
  • ✅ 各地采用一致的方法
  • ✅ 无项目混乱
  • ✅ 轻松更新

特性

统一工具架构

单 bmad 具有智能操作的工具:

// List available agents and workflows
{ operation: "list", query: "agents" }

// Read agent details (no execution)
{ operation: "read", type: "agent", agent: "analyst" }

// Execute agent with context
{ operation: "execute", agent: "analyst", message: "Help me..." }

11名专业代理

代理 角色 加载
📊 玛丽 商业分析师 analyst
🏗️ Winston 系统架构师 architect
💻 Amelia 开发人员 dev
🎨 Sally 用户体验设计师 ux-designer
🧪 Murat 测试架构师 tea
📋 John 产品经理 pm
🔄 Bob Scrum Master sm
🐛 Diana 调试专家 debug
... [+3名代理]

36+自动化工作流程

prd              # Product Requirements Document
architecture     # System architecture design
debug-inspect    # Comprehensive debugging
atdd             # Acceptance test generation
ux-design        # UX specifications
party-mode       # Multi-agent brainstorming
... and 30+ more

MCP能力

  • 工具 -统一 bmad 用于所有操作的工具
  • 资源 -通过以下方式访问BMAD文件 bmad:// URI
  • 提示词 -代理作为本地MCP提示
  • 补全 -参数的智能自动补全
  • 多来源 -项目、用户和Git远程支持

安装

先决条件

  • Node.js 18或更高版本
  • MCP兼容客户端(Claude Desktop、VS Code with Copilot、Cline等)

快速开始

选项1:npx(推荐)

添加到MCP客户端配置中:

{
  "mcpServers": {
    "bmad": {
      "command": "npx",
      "args": ["-y", "bmad-mcp-server"]
    }
  }
}

选项2:全局安装

npm install -g bmad-mcp-server
{
  "mcpServers": {
    "bmad": {
      "command": "bmad-mcp-server"
    }
  }
}

方案3:地方发展

git clone https://github.com/mkellerman/bmad-mcp-server.git
cd bmad-mcp-server
npm install
npm run build
{
  "mcpServers": {
    "bmad": {
      "command": "node",
      "args": ["/absolute/path/to/bmad-mcp-server/build/index.js"]
    }
  }
}

客户端特定设置

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "bmad": {
      "command": "npx",
      "args": ["-y", "bmad-mcp-server"]
    }
  }
}

重新启动克劳德桌面。

VS Code with GitHub Copilot
  1. 安装最新的GitHub Copilot扩展
  2. 打开设置(JSON)
  3. 添加到 github.copilot.chat.mcp.servers:
{
  "github.copilot.chat.mcp.servers": {
    "bmad": {
      "command": "npx",
      "args": ["-y", "bmad-mcp-server"]
    }
  }
}
  1. 重新启动VS代码
Cline (VS Code Extension)
  1. 打开临床设置
  2. 添加MCP服务器:
{
  "mcpServers": {
    "bmad": {
      "command": "npx",
      "args": ["-y", "bmad-mcp-server"]
    }
  }
}

用法

自然语言示例

自然地问你的人工智能助手——它会自动处理MCP工具调用:

代理执行:

You: "Ask Mary to analyze the market opportunity for a SaaS product"
→ AI executes: { operation: "execute", agent: "analyst", message: "..." }
→ Mary (Business Analyst) provides market analysis

工作流执行:

You: "Start a PRD workflow for a task management app"
→ AI executes: { operation: "execute", workflow: "prd", message: "..." }
→ John (Product Manager) guides you through PRD creation

调试协助:

You: "Ask Diana to debug this script" (with code attached)
→ AI executes: { operation: "execute", agent: "debug", message: "..." }
→ Diana starts comprehensive debugging workflow

协作解决问题:

You: "Start party-mode with the planning team to brainstorm features"
→ AI executes: { operation: "execute", workflow: "party-mode", message: "..." }
→ Multiple agents collaborate on brainstorming session

架构审查:

You: "Have Winston review this system design"
→ AI executes: { operation: "execute", agent: "architect", message: "..." }
→ Winston provides architectural guidance

直接使用MCP工具

您也可以直接使用该工具(对开发/测试有用):

列出可用代理:

{
  "operation": "list",
  "query": "agents"
}

执行代理:

{
  "operation": "execute",
  "agent": "analyst",
  "message": "Help me analyze the market for a SaaS product"
}

运行工作流:

{
  "operation": "execute",
  "workflow": "prd",
  "message": "Create PRD for task management app"
}

阅读代理详细信息:

{
  "operation": "read",
  "type": "agent",
  "agent": "architect"
}

高级配置

使用Git遥控器进行多源加载:

{
  "mcpServers": {
    "bmad": {
      "command": "npx",
      "args": [
        "-y",
        "bmad-mcp-server",
        "git+https://github.com/org/custom-bmad.git#main"
      ]
    }
  }
}

自定义项目根:

{
  "mcpServers": {
    "bmad": {
      "command": "npx",
      "args": ["-y", "bmad-mcp-server"],
      "env": {
        "BMAD_ROOT": "/custom/bmad/location"
      }
    }
  }
}

资源发现优先级

服务器按以下顺序搜索BMAD内容:

  1. 项目本地: ./bmad/ (最高优先级-项目自定义)
  2. 用户全局: ~/.bmad/ (个人违约)
  3. Git 远程:克隆到 ~/.bmad/cache/git/ (共享/团队内容)
  4. 软件包默认值:内置BMAD文件(始终可用)

文档


发展

设置

# Clone repository
git clone https://github.com/mkellerman/bmad-mcp-server.git
cd bmad-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

项目结构

src/
├── index.ts              # MCP server entry point
├── cli.ts                # CLI entry point
├── server.ts             # MCP server implementation
├── core/
│   ├── bmad-engine.ts    # Core business logic
│   └── resource-loader.ts # Multi-source content loading
├── tools/
│   ├── bmad-unified.ts   # Unified tool implementation
│   └── operations/       # Operation handlers
├── types/                # TypeScript types
└── utils/                # Utilities

npm脚本

npm run build          # Compile TypeScript
npm run dev            # Development mode with auto-restart
npm test               # Run all tests
npm run test:unit      # Unit tests only
npm run test:coverage  # Coverage report
npm run lint           # Check linting
npm run format         # Format code

测试

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test suite
npm run test:unit
npm run test:integration
npm run test:e2e

# Watch mode
npm run test:watch

建筑

高级概述

AI Assistant (Claude, Copilot, etc.)
         ↓ MCP Protocol
    MCP Server Layer
         ↓
    BMAD Engine (transport-agnostic)
         ↓
  Resource Loader (multi-source)
         ↓
   BMAD Content (agents, workflows)

关键组件

  • 服务器:MCP协议实施(工具、资源、提示)
  • 引擎:与运输无关的业务逻辑
  • 加载器:多源内容发现和加载
  • 工具:统一 bmad 具有模块化操作的工具

看 架构文档 了解详情。


贡献

我们欢迎捐款!请查看我们的 开发指南 用于:

  • 开发设置
  • 代码风格指南
  • 测试要求
  • 拉取请求流程

快速贡献指南

  1. 分叉存储库
  2. 创建要素分支: git checkout -b feature/my-feature
  3. 通过测试进行更改
  4. 运行测试: npm test
  5. 承诺: git commit -m "feat: add my feature"
  6. 推: git push origin feature/my-feature
  7. 创建拉取请求

我们使用 常规承诺 用于提交消息。


许可证

ISC© 米勒曼


鸣谢

此MCP服务器构建在 BMAD方法。所有方法、代理、工作流程和最佳实践都归功于原始的BMAD方法项目。


链接

  • 仓库: https://github.com/mkellerman/bmad-mcp-server
  • 问题: https://github.com/mkellerman/bmad-mcp-server/issues
  • npm包: https://www.npmjs.com/package/bmad-mcp-server
  • BMAD方法: https://github.com/bmad-code-org/BMAD-METHOD
  • MCP规范: https://modelcontextprotocol.io/