Skip to main content
Glama

MCP 敏捷流程

覆盖范围

使用 FastMCP 的现代、基于资源的 API 来管理 AI 辅助敏捷开发工作流程的综合系统。

地位

✅迁移完成:从旧服务器到 FastMCP 实现的迁移已完全完成。所有旧代码和测试均已删除。

Related MCP server: AI Pull Request Generator

概述

MCP Agile Flow 项目采用基于资源的方法,并使用官方 MCP SDK 中的 FastMCP,重点关注:

  • RESTful API 设计- 用于数据访问的干净、直观的资源 URI

  • 资源优先架构——针对数据检索和状态表示进行了优化

  • 面向操作的工具- 仅用于修改状态的操作的工具

主要特点

  • 敏捷文档:生成并维护全面的 AI 文档

  • 项目结构:使用 AI 生成的文件和目录组织您的项目

  • IDE 集成:直接与各种 AI IDE 集成(Cursor、Windsurf、Cline)

  • 工作流管理:跟踪敏捷故事和进度

  • 直观的 API 结构:以 RESTful 层次结构组织的资源

  • 简化集成:直接映射到资源 URI

  • 改进的性能:针对数据访问模式进行了优化

入门

要使用 MCP Agile Flow:

  1. 安装软件包:

    pip install mcp-agile-flow
  2. 导入您的代码:

    from mcp_agile_flow import call_tool, call_tool_sync
    
    # Use async interface
    result = await call_tool("get-project-settings", {})
    
    # Or use sync interface
    result = call_tool_sync("get-project-settings", {})

MCP 客户端配置

重要:需要配置更新

如果您之前已配置 MCP Agile Flow,则需要更新配置。fastmcp_server.py 模块已作为fastmcp_server.py清理的一部分被移除,其功能已合并到主包中。

从以下位置更新您的 MCP 客户端配置:

{
    "name": "mcp-agile-flow",
    "server": {
        "type": "module",
        "module": "mcp_agile_flow.fastmcp_server",
        "entry_point": "run"
    }
}

到:

{
    "name": "mcp-agile-flow",
    "server": {
        "type": "module",
        "module": "mcp_agile_flow",
        "entry_point": "main"
    }
}

对于 Cursor 用户,还请更新 mcp.json 文件(通常位于 ~/.cursor/mcp.json):

"mcp-agile-flow": {
  "command": "/path/to/python",
  "args": [
    "-m",
    "mcp_agile_flow"  // Updated from "mcp_agile_flow.fastmcp_server"
  ],
  "autoApprove": [
    // ...
  ]
}

命令行用法

您也可以直接从命令行运行服务器:

# Using Python (logs disabled by default)
python -m mcp_agile_flow

# Enable normal logging
python -m mcp_agile_flow --verbose

# Debug mode (most verbose logging)
python -m mcp_agile_flow --debug

可用工具

MCP Agile Flow 提供了多种工具:

  • get-project-settings :获取项目设置,包括路径和环境变量

  • initialize-ide特定 IDE 的项目目录结构

  • initialize-ide-rules特定 IDE 的 AI 规则文件

  • prime-context :分析项目文档并建立背景理解

  • migrate-mcp-config :在不同的 IDE 之间迁移 MCP 配置

  • think :记录想法,进行复杂的推理和逐步分析

  • get-thoughts :检索当前会话中记录的所有想法

  • clear-thoughts :清除当前会话中记录的所有想法

  • get-thought-stats :获取当前会话中记录的想法的统计数据

  • process-natural-language :处理自然语言命令并路由到适当的工具

自然语言命令

MCP Agile Flow 支持自然语言命令,让您无需记住确切的命令名称即可更轻松地与工具交互。只需使用对话短语,系统就会自动检测您的意图,并使用正确的参数将其映射到相应的工具。

支持的命令类型

迁移命令

要在不同的 IDE 之间迁移 MCP 配置:

  • “将 mcp 配置迁移到 claude-desktop”

  • “将配置从光标迁移到 claude-desktop”

  • “将 mcp 设置复制到 windsurf”

  • “将配置传输到 cline”

  • “将 mcp 设置从光标移动到 roo”

如果未指定源 IDE,则默认为“cursor”。

注意:有效的 IDE 名称为:“cursor”、“windsurf-next”、“windsurf”、“cline”、“roo”和“claude-desktop”。

初始化命令

要使用特定 IDE 的规则初始化项目:

  • “为 Claude 初始化 IDE”

  • “风帆冲浪设置规则”

  • “为 Cline 创建 IDE”

  • “初始化副驾驶规则”

项目设置命令

要获得全面的项目设置:

  • “获取项目设置”

  • “显示设置”

  • “项目设置”

上下文分析命令

分析项目文档:

  • “主要背景”

  • “分析项目背景”

  • “构建上下文”

思维命令

记录想法:

  • “思考一下[你的想法]”

使用示例

以下是如何使用这些命令的一些示例:

from mcp_agile_flow import process_natural_language

# Migrate configuration from Cursor to Claude
result = process_natural_language("migrate mcp config to claude-desktop")

# Initialize rules for Windsurf
result = process_natural_language("initialize ide for windsurf")

# Get project settings
result = process_natural_language("get project settings")

# Prime the context
result = process_natural_language("prime context")

# Record a thought
result = process_natural_language("think about how to improve code quality")

从命令行使用

您还可以将自然语言命令与 MCP Agile Flow CLI 结合使用:

python -m mcp_agile_flow process-natural-language "migrate mcp config to claude-desktop"

错误处理

如果系统无法识别命令,它将返回一条错误消息,解释未检测到命令并建议使用更具体的措辞。

扩展命令

自然语言命令检测在utils.py中使用正则表达式实现。要添加对新命令模式的支持,请将相应的正则表达式模式添加到detect_mcp_command函数中。

发展

为开发进行设置:

  1. 克隆存储库:

    git clone https://github.com/yourusername/mcp-agile-flow.git
    cd mcp-agile-flow
  2. 创建虚拟环境:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. 安装开发依赖项:

    pip install -e ".[dev]"
  4. 运行测试:

    pytest
  5. 常用 Makefile 命令:

    make test             # Run all tests
    make test-nl-commands # Test natural language command functionality
    make test-core        # Run core tests only
    make coverage         # Generate coverage report
    make clean            # Clean build artifacts
    make clean-all        # Clean everything including venv
    make clean-archived   # Remove archived legacy files

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

Available Tools

13 tools
clear_thoughtsA

Clear recorded thoughts.

This tool removes previously recorded thoughts, optionally filtered by category. If no category is specified, all thoughts will be cleared.

Inputs: category.

detect_thinking_directiveB

Detect thinking directives.

This tool analyzes text to detect directives suggesting deeper thinking, such as "think harder", "think deeper", "think again", etc.

Inputs: text (required).

get_project_settingsB
Get the project settings for the current working directory or a proposed path.

Returns configuration settings including project path, type, and metadata.
If proposed_path is not provided or invalid, uses the current directory.

Inputs: proposed_path.

get_thoughtsB

Retrieve recorded thoughts.

This tool retrieves all previously recorded thoughts, optionally filtered by category. You can also choose to organize them hierarchically by depth.

Inputs: category, organize_by_depth.

get_thought_statsB

Get statistics about recorded thoughts.

This tool provides statistics about recorded thoughts, such as count and depth distribution. Results can be filtered by category.

Inputs: category.

initialize_ideB
Initialize IDE project structure with appropriate directories and config files.

This tool sets up the necessary directories and configuration files for IDE
integration, including .ai-templates directory and IDE-specific rules.

Note: If project_path is omitted, not a string, invalid, or the directory doesn't exist,
the current working directory will be used automatically.

Inputs: ide_type, project_path.

initialize_ide_rulesB
Initialize IDE rules for a project.

This tool sets up IDE-specific rules for a project, creating the necessary
files and directories for AI assistants to understand project conventions.

Note: If project_path is omitted, not a string, or invalid, the current working
directory will be used automatically.

Inputs: ide, project_path.

migrate_mcp_configB
Migrate MCP configuration between different IDEs.

This tool helps migrate configuration and rules between different IDEs,
ensuring consistent AI assistance across different environments.

Note: If project_path is omitted, not a string, or invalid, the current working
directory will be used automatically.

Inputs: from_ide, project_path, to_ide.

prime_contextB
Prime project context by analyzing documentation and structure.

This tool analyzes the project structure and documentation to provide
context information for AI assistants working with the project.

Note: If project_path is omitted, not a string, or invalid, the current working
directory will be used automatically.

Inputs: depth, project_path.

process_natural_languageA

Process natural language command and route to appropriate tool.

This tool takes a natural language query and determines which tool to call with what parameters, providing a way to interact with the MCP Agile Flow tools using natural language.

Inputs: query (required).

should_thinkC

Assess whether deeper thinking is needed for a query.

This tool analyzes a query to determine if it requires deeper thinking, based on complexity indicators and context.

Inputs: query (required).

thinkC

Record a thought for later reference and analysis.

This tool allows you to record thoughts during development or analysis processes. Thoughts can be organized by category and depth to create a hierarchical structure of analysis.

Inputs: thought (required), category, depth, metadata, +2 more.

think_moreC

Get guidance for thinking more deeply.

This tool provides suggestions and guidance for thinking more deeply about a specific query or thought.

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 13 tools

    Disambiguation3/5

    The tools have some clear distinctions but significant overlap exists. Tools like think, think_more, should_think, and detect_thinking_directive all relate to thinking processes with unclear boundaries. Similarly, initialize_ide and initialize_ide_rules appear to serve very similar purposes. The descriptions help differentiate them somewhat, but an agent could easily misselect between these overlapping tools.

    Naming Consistency4/5

    The naming follows a consistent snake_case pattern throughout, which is good. Most tools use verb_noun or verb_adjective_noun patterns (e.g., clear_thoughts, get_project_settings). The main deviation is process_natural_language which uses a verb_adjective_noun pattern that still fits the overall style, keeping the naming mostly predictable and readable.

    Tool Count4/5

    With 13 tools, the count is reasonable for a server focused on agile development workflows and thinking assistance. It's slightly on the higher side but still manageable. The tools cover multiple aspects of the domain without feeling excessively bloated, though some consolidation might improve coherence.

    Completeness3/5

    The server covers thinking processes and IDE/project setup reasonably well, but there are notable gaps. For thinking workflows, there's good recording and analysis but limited action-oriented tools. For project management, there are initialization tools but no ongoing management, update, or collaboration features. The natural language processing tool provides routing but doesn't complete the surface for a comprehensive agile flow system.

    Related MCP Connectors

    Related MCP Servers