# AceFlow MCP Server - AI-协作增强版
> 🚀 **双向AI协作** - 支持AI Agent与MCP工具双向数据交换的智能开发工作流服务器
[](https://badge.fury.io/py/aceflow-mcp-server)
[](https://pypi.org/project/aceflow-mcp-server/)
[](https://opensource.org/licenses/MIT)
## 📋 概述
AceFlow MCP Server v2.0 引入了突破性的**双向AI-MCP协作架构**,不仅支持传统的MCP工具调用,更实现了AI Agent向MCP工具提供数据的反向流程。这种设计充分发挥了AI Agent的内容生成能力和MCP工具的数据管理能力。
### 🎯 核心创新 - 双向协作
#### 传统单向模式 (v1.x)
```
AI Agent → MCP Tools → 执行结果
```
#### 双向协作模式 (v2.0)
```
AI Agent ↔ MCP Tools ↔ 数据持久化
```
**AI Agent → MCP** 方向:
- `set_analysis`: AI提供项目分析数据
- `save_output`: AI保存阶段产出内容
**MCP → AI Agent** 方向:
- `prepare_data`: MCP准备结构化数据包
- `validate`: 验证数据完整性
### ✨ 主要特性
- **🤝 双向协作**: 革命性的AI-MCP双向数据交换
- **⚡ 性能优化**: 内存缓存、并发处理、批量操作
- **📊 智能工作流**: 支持4种复杂度项目模式
- **🔧 核心工具**: 4个精心设计的MCP工具
- **💾 数据持久化**: 智能数据管理和状态保持
- **🧪 稳定可靠**: 完整测试覆盖和错误处理
## 🛠️ 核心工具
### 1. **aceflow_init** - 项目初始化
```python
# 初始化标准项目
aceflow_init(mode="standard", project_name="my-project")
```
### 2. **aceflow_stage** - 阶段管理 (双向协作增强版)
```python
# 传统操作
aceflow_stage(action="status") # 查看状态
aceflow_stage(action="next") # 推进阶段
# AI → MCP 协作
aceflow_stage(action="set_analysis", stage="analysis", data={
"project_info": {"name": "web-app", "version": "1.0.0"},
"code_metrics": {"complexity": "medium", "coverage": 85}
})
aceflow_stage(action="save_output", stage="design", data={
"content": {"architecture": "microservices"},
"metadata": {"author": "AI Agent"}
})
# MCP → AI 协作
aceflow_stage(action="prepare_data", stage="implementation")
aceflow_stage(action="validate", stage="design")
```
### 3. **aceflow_validate** - 项目验证
```python
# 基础验证
aceflow_validate(mode="basic", report=True)
```
### 4. **aceflow_template** - 模板管理
```python
# 列出可用模板
aceflow_template(action="list")
```
## 🏗️ 双向协作架构
### 架构图
```
┌─────────────────────────────────────────────────────────────────┐
│ AI Agent (Claude Code/Cursor) │
│ ┌─────────────────┐ ┌──────────────────────┐ │
│ │ 内容生成 │ │ 数据分析 │ │
│ │ 代码编写 │ │ 质量评估 │ │
│ │ 文档创建 │ │ 决策建议 │ │
│ └─────────────────┘ └──────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│ set_analysis │ prepare_data
│ save_output │ validate
↓ ↑
┌─────────────────────────────────────────────────────────────────┐
│ AceFlow MCP Server │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ SimplifiedUnified│ │ DataManager │ │ MCPStdioServer │ │
│ │ Tools │ │ (缓存+持久化) │ │ (协议适配) │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
↓
┌─────────────────────────────────────────────────────────────────┐
│ 本地文件系统 │
│ .aceflow/ │
│ ├── analysis_data.json (AI分析数据) │
│ ├── stage_outputs/ (阶段产出) │
│ ├── cache/ (性能缓存) │
│ └── current_state.json (项目状态) │
└─────────────────────────────────────────────────────────────────┘
```
### 工作流程
1. **AI分析阶段**: AI Agent分析项目,调用`set_analysis`提供数据
2. **MCP处理阶段**: MCP工具处理数据,更新项目状态
3. **数据准备阶段**: MCP调用`prepare_data`为下阶段准备数据包
4. **AI生成阶段**: AI Agent基于数据包生成内容
5. **输出保存阶段**: AI Agent调用`save_output`保存产出
6. **验证阶段**: MCP调用`validate`确保数据完整性
### 性能特性
- **📦 内存缓存**: 5分钟TTL,减少重复数据读取
- **🔄 并发处理**: 4线程池,支持异步批量操作
- **🔒 线程安全**: RLock保证多线程数据一致性
- **📊 性能监控**: 实时缓存命中率和队列状态
## 🚀 快速开始
### 安装
```bash
# 使用 pip 安装
pip install aceflow-mcp-server
# 使用 uvx 安装(推荐)
uvx aceflow-mcp-server
```
### 基础使用
```bash
# 启动MCP服务器
python -m aceflow_mcp_server.mcp_stdio_server
# 或使用便捷命令
aceflow-mcp-server
```
### MCP 配置
在你的 MCP 客户端配置中添加:
```json
{
"mcpServers": {
"aceflow-unified": {
"command": "aceflow-unified",
"args": ["serve", "--mode", "enhanced"],
"env": {
"ACEFLOW_LOG_LEVEL": "INFO"
}
}
}
}
```
## 🔧 配置模式
### 基础模式 (Basic)
- ✅ 核心工具: `aceflow_init`, `aceflow_stage`, `aceflow_validate`
- ✅ 基础资源: `project_state`, `workflow_config`, `stage_guide`
- 🎯 适用于: 简单项目,快速原型
### 标准模式 (Standard)
- ✅ 包含基础模式所有功能
- ✅ 可选启用协作和智能功能
- 🎯 适用于: 大多数项目,平衡功能和性能
### 增强模式 (Enhanced)
- ✅ 包含标准模式所有功能
- ✅ 协作工具: `aceflow_respond`, `aceflow_collaboration_status`, `aceflow_task_execute`
- ✅ 智能工具: `aceflow_intent_analyze`, `aceflow_recommend`
- ✅ 增强资源: `collaboration_insights`, `usage_stats`
- 🎯 适用于: 复杂项目,团队协作
## 📚 API 参考
### 核心工具
#### `aceflow_init`
初始化 AceFlow 项目
```python
result = await aceflow_init(
mode="standard",
project_name="my-project",
directory="./my-project"
)
```
#### `aceflow_stage`
管理项目阶段
```python
result = await aceflow_stage(
action="next",
current_stage="planning"
)
```
#### `aceflow_validate`
验证项目状态
```python
result = await aceflow_validate(
mode="basic",
target="project"
)
```
### 协作工具 (增强模式)
#### `aceflow_respond`
响应协作请求
```python
result = await aceflow_respond(
request_id="req-123",
response="Approved",
user_id="user-456"
)
```
### 智能工具 (增强模式)
#### `aceflow_intent_analyze`
分析用户意图
```python
result = await aceflow_intent_analyze(
user_input="Create a new web project",
context={"type": "project_creation"}
)
```
## 🔧 高级配置
### 环境变量
```bash
# 设置运行模式
export ACEFLOW_MODE=enhanced
# 启用/禁用特定功能
export ACEFLOW_COLLABORATION_ENABLED=true
export ACEFLOW_INTELLIGENCE_ENABLED=true
# 性能配置
export ACEFLOW_CACHE_TTL=300
export ACEFLOW_MAX_CONCURRENT_REQUESTS=100
```
### 配置文件
创建 `aceflow-config.json`:
```json
{
"version": "2.0",
"mode": "enhanced",
"core": {
"enabled": true,
"default_mode": "standard",
"auto_advance": false,
"quality_threshold": 0.8
},
"collaboration": {
"enabled": true,
"confirmation_timeout": 30,
"auto_confirm": false,
"interaction_level": "standard"
},
"intelligence": {
"enabled": true,
"intent_recognition": true,
"adaptive_guidance": true,
"learning_enabled": false
}
}
```
## 🔄 迁移指南
### 从 aceflow-server 迁移
```bash
# 自动迁移配置
aceflow-unified config --migrate
# 验证迁移结果
aceflow-unified config --validate
```
### 从 aceflow-enhanced-server 迁移
```json
// 旧配置
{
"mcpServers": {
"aceflow-enhanced-server": {
"command": "uvx",
"args": ["aceflow-enhanced-server@latest"]
}
}
}
// 新配置
{
"mcpServers": {
"aceflow-unified": {
"command": "aceflow-unified",
"args": ["serve", "--mode", "enhanced"]
}
}
}
```
## 🧪 开发
### 安装开发依赖
```bash
# 克隆仓库
git clone https://github.com/aceflow/mcp-server.git
cd mcp-server
# 安装开发依赖
pip install -e ".[dev]"
# 运行测试
pytest
# 运行类型检查
mypy aceflow_mcp_server
# 格式化代码
black aceflow_mcp_server
isort aceflow_mcp_server
```
### 运行测试
```bash
# 运行所有测试
aceflow-unified test
# 运行单元测试
aceflow-unified test --mode unit
# 运行集成测试
aceflow-unified test --mode integration
# 运行兼容性测试
aceflow-unified test --mode compatibility
```
## 🐛 故障排除
### 常见问题
#### 服务器启动失败
```bash
# 检查系统状态
aceflow-unified doctor
# 验证配置
aceflow-unified config --validate
# 查看详细日志
aceflow-unified serve --mode enhanced --log-level DEBUG
```
#### 功能模块未加载
```bash
# 检查模式设置
echo $ACEFLOW_MODE
# 强制启用功能
export ACEFLOW_COLLABORATION_ENABLED=true
export ACEFLOW_INTELLIGENCE_ENABLED=true
```
更多故障排除信息,请查看 [故障排除指南](https://docs.aceflow.dev/troubleshooting)。
## 📄 许可证
本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。
## 🔗 相关链接
- [文档](https://docs.aceflow.dev)
- [问题反馈](https://github.com/aceflow/mcp-server/issues)
- [讨论区](https://github.com/aceflow/mcp-server/discussions)
- [更新日志](https://github.com/aceflow/mcp-server/blob/main/CHANGELOG.md)
## 🤝 贡献
我们欢迎社区贡献!请查看 [贡献指南](CONTRIBUTING.md) 了解详情。
## 📈 版本历史
### v2.0.0 (双向AI协作架构) - 2025-08-26
- 🎉 **突破性更新**: 双向AI-MCP协作架构
- ✨ **新增功能**:
- AI Agent → MCP 数据输入 (`set_analysis`, `save_output`)
- MCP → AI Agent 数据准备 (`prepare_data`, `validate`)
- ⚡ **性能优化**:
- 内存缓存系统 (5分钟TTL)
- 4线程池并发处理
- 批量操作支持
- 线程安全保证
- 📊 **数据管理**:
- 完整数据持久化层 (DataManager)
- 智能缓存和过期处理
- 项目状态一致性保证
- 🔧 **接口增强**:
- aceflow_stage 支持 data 参数
- 8种操作类型支持
- 完善的错误处理和验证
- 🧪 **测试覆盖**:
- 完整系统集成测试
- 性能基准测试
- 协作工作流验证
### v1.x.x (简化架构)
- 🚀 基础MCP服务器功能
- 📋 项目初始化和阶段管理
- ✅ 基础验证和模板系统
- 🔧 4个核心工具
---
**🚀 开始使用 AceFlow MCP 统一服务器,体验更强大、更灵活的工作流管理!**
Raw data
{
"_id": null,
"home_page": null,
"name": "aceflow-mcp-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "AceFlow Team <team@aceflow.dev>",
"keywords": "mcp, model-context-protocol, workflow, ai-collaboration, ai-tools, dual-direction, intelligent-workflow, claude-code, cursor",
"author": null,
"author_email": "AceFlow Team <team@aceflow.dev>",
"download_url": "https://files.pythonhosted.org/packages/e8/a0/a24fcac4e8248b96002cef318f99f1bb89f6280bf3b62c381712c2e63de0/aceflow_mcp_server-2.0.2.tar.gz",
"platform": null,
"description": "# AceFlow MCP Server - AI-\u534f\u4f5c\u589e\u5f3a\u7248\n\n> \ud83d\ude80 **\u53cc\u5411AI\u534f\u4f5c** - \u652f\u6301AI Agent\u4e0eMCP\u5de5\u5177\u53cc\u5411\u6570\u636e\u4ea4\u6362\u7684\u667a\u80fd\u5f00\u53d1\u5de5\u4f5c\u6d41\u670d\u52a1\u5668\n\n[](https://badge.fury.io/py/aceflow-mcp-server)\n[](https://pypi.org/project/aceflow-mcp-server/)\n[](https://opensource.org/licenses/MIT)\n\n## \ud83d\udccb \u6982\u8ff0\n\nAceFlow MCP Server v2.0 \u5f15\u5165\u4e86\u7a81\u7834\u6027\u7684**\u53cc\u5411AI-MCP\u534f\u4f5c\u67b6\u6784**\uff0c\u4e0d\u4ec5\u652f\u6301\u4f20\u7edf\u7684MCP\u5de5\u5177\u8c03\u7528\uff0c\u66f4\u5b9e\u73b0\u4e86AI Agent\u5411MCP\u5de5\u5177\u63d0\u4f9b\u6570\u636e\u7684\u53cd\u5411\u6d41\u7a0b\u3002\u8fd9\u79cd\u8bbe\u8ba1\u5145\u5206\u53d1\u6325\u4e86AI Agent\u7684\u5185\u5bb9\u751f\u6210\u80fd\u529b\u548cMCP\u5de5\u5177\u7684\u6570\u636e\u7ba1\u7406\u80fd\u529b\u3002\n\n### \ud83c\udfaf \u6838\u5fc3\u521b\u65b0 - \u53cc\u5411\u534f\u4f5c\n\n#### \u4f20\u7edf\u5355\u5411\u6a21\u5f0f (v1.x)\n```\nAI Agent \u2192 MCP Tools \u2192 \u6267\u884c\u7ed3\u679c\n```\n\n#### \u53cc\u5411\u534f\u4f5c\u6a21\u5f0f (v2.0)\n```\nAI Agent \u2194 MCP Tools \u2194 \u6570\u636e\u6301\u4e45\u5316\n```\n\n**AI Agent \u2192 MCP** \u65b9\u5411\uff1a\n- `set_analysis`: AI\u63d0\u4f9b\u9879\u76ee\u5206\u6790\u6570\u636e\n- `save_output`: AI\u4fdd\u5b58\u9636\u6bb5\u4ea7\u51fa\u5185\u5bb9\n\n**MCP \u2192 AI Agent** \u65b9\u5411\uff1a\n- `prepare_data`: MCP\u51c6\u5907\u7ed3\u6784\u5316\u6570\u636e\u5305\n- `validate`: \u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027\n\n### \u2728 \u4e3b\u8981\u7279\u6027\n\n- **\ud83e\udd1d \u53cc\u5411\u534f\u4f5c**: \u9769\u547d\u6027\u7684AI-MCP\u53cc\u5411\u6570\u636e\u4ea4\u6362\n- **\u26a1 \u6027\u80fd\u4f18\u5316**: \u5185\u5b58\u7f13\u5b58\u3001\u5e76\u53d1\u5904\u7406\u3001\u6279\u91cf\u64cd\u4f5c\n- **\ud83d\udcca \u667a\u80fd\u5de5\u4f5c\u6d41**: \u652f\u63014\u79cd\u590d\u6742\u5ea6\u9879\u76ee\u6a21\u5f0f\n- **\ud83d\udd27 \u6838\u5fc3\u5de5\u5177**: 4\u4e2a\u7cbe\u5fc3\u8bbe\u8ba1\u7684MCP\u5de5\u5177\n- **\ud83d\udcbe \u6570\u636e\u6301\u4e45\u5316**: \u667a\u80fd\u6570\u636e\u7ba1\u7406\u548c\u72b6\u6001\u4fdd\u6301\n- **\ud83e\uddea \u7a33\u5b9a\u53ef\u9760**: \u5b8c\u6574\u6d4b\u8bd5\u8986\u76d6\u548c\u9519\u8bef\u5904\u7406\n\n## \ud83d\udee0\ufe0f \u6838\u5fc3\u5de5\u5177\n\n### 1. **aceflow_init** - \u9879\u76ee\u521d\u59cb\u5316\n```python\n# \u521d\u59cb\u5316\u6807\u51c6\u9879\u76ee\naceflow_init(mode=\"standard\", project_name=\"my-project\")\n```\n\n### 2. **aceflow_stage** - \u9636\u6bb5\u7ba1\u7406 (\u53cc\u5411\u534f\u4f5c\u589e\u5f3a\u7248)\n```python\n# \u4f20\u7edf\u64cd\u4f5c\naceflow_stage(action=\"status\") # \u67e5\u770b\u72b6\u6001\naceflow_stage(action=\"next\") # \u63a8\u8fdb\u9636\u6bb5\n\n# AI \u2192 MCP \u534f\u4f5c\naceflow_stage(action=\"set_analysis\", stage=\"analysis\", data={\n \"project_info\": {\"name\": \"web-app\", \"version\": \"1.0.0\"},\n \"code_metrics\": {\"complexity\": \"medium\", \"coverage\": 85}\n})\n\naceflow_stage(action=\"save_output\", stage=\"design\", data={\n \"content\": {\"architecture\": \"microservices\"},\n \"metadata\": {\"author\": \"AI Agent\"}\n})\n\n# MCP \u2192 AI \u534f\u4f5c \naceflow_stage(action=\"prepare_data\", stage=\"implementation\")\naceflow_stage(action=\"validate\", stage=\"design\")\n```\n\n### 3. **aceflow_validate** - \u9879\u76ee\u9a8c\u8bc1\n```python\n# \u57fa\u7840\u9a8c\u8bc1\naceflow_validate(mode=\"basic\", report=True)\n```\n\n### 4. **aceflow_template** - \u6a21\u677f\u7ba1\u7406\n```python\n# \u5217\u51fa\u53ef\u7528\u6a21\u677f\naceflow_template(action=\"list\")\n```\n\n## \ud83c\udfd7\ufe0f \u53cc\u5411\u534f\u4f5c\u67b6\u6784\n\n### \u67b6\u6784\u56fe\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 AI Agent (Claude Code/Cursor) \u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 \u5185\u5bb9\u751f\u6210 \u2502 \u2502 \u6570\u636e\u5206\u6790 \u2502 \u2502\n\u2502 \u2502 \u4ee3\u7801\u7f16\u5199 \u2502 \u2502 \u8d28\u91cf\u8bc4\u4f30 \u2502 \u2502\n\u2502 \u2502 \u6587\u6863\u521b\u5efa \u2502 \u2502 \u51b3\u7b56\u5efa\u8bae \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 set_analysis \u2502 prepare_data\n \u2502 save_output \u2502 validate\n \u2193 \u2191\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 AceFlow MCP Server \u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 SimplifiedUnified\u2502 \u2502 DataManager \u2502 \u2502 MCPStdioServer \u2502 \u2502\n\u2502 \u2502 Tools \u2502 \u2502 (\u7f13\u5b58+\u6301\u4e45\u5316) \u2502 \u2502 (\u534f\u8bae\u9002\u914d) \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502\n \u2193\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 \u672c\u5730\u6587\u4ef6\u7cfb\u7edf \u2502\n\u2502 .aceflow/ \u2502\n\u2502 \u251c\u2500\u2500 analysis_data.json (AI\u5206\u6790\u6570\u636e) \u2502\n\u2502 \u251c\u2500\u2500 stage_outputs/ (\u9636\u6bb5\u4ea7\u51fa) \u2502\n\u2502 \u251c\u2500\u2500 cache/ (\u6027\u80fd\u7f13\u5b58) \u2502\n\u2502 \u2514\u2500\u2500 current_state.json (\u9879\u76ee\u72b6\u6001) \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n### \u5de5\u4f5c\u6d41\u7a0b\n\n1. **AI\u5206\u6790\u9636\u6bb5**: AI Agent\u5206\u6790\u9879\u76ee\uff0c\u8c03\u7528`set_analysis`\u63d0\u4f9b\u6570\u636e\n2. **MCP\u5904\u7406\u9636\u6bb5**: MCP\u5de5\u5177\u5904\u7406\u6570\u636e\uff0c\u66f4\u65b0\u9879\u76ee\u72b6\u6001 \n3. **\u6570\u636e\u51c6\u5907\u9636\u6bb5**: MCP\u8c03\u7528`prepare_data`\u4e3a\u4e0b\u9636\u6bb5\u51c6\u5907\u6570\u636e\u5305\n4. **AI\u751f\u6210\u9636\u6bb5**: AI Agent\u57fa\u4e8e\u6570\u636e\u5305\u751f\u6210\u5185\u5bb9\n5. **\u8f93\u51fa\u4fdd\u5b58\u9636\u6bb5**: AI Agent\u8c03\u7528`save_output`\u4fdd\u5b58\u4ea7\u51fa\n6. **\u9a8c\u8bc1\u9636\u6bb5**: MCP\u8c03\u7528`validate`\u786e\u4fdd\u6570\u636e\u5b8c\u6574\u6027\n\n### \u6027\u80fd\u7279\u6027\n\n- **\ud83d\udce6 \u5185\u5b58\u7f13\u5b58**: 5\u5206\u949fTTL\uff0c\u51cf\u5c11\u91cd\u590d\u6570\u636e\u8bfb\u53d6 \n- **\ud83d\udd04 \u5e76\u53d1\u5904\u7406**: 4\u7ebf\u7a0b\u6c60\uff0c\u652f\u6301\u5f02\u6b65\u6279\u91cf\u64cd\u4f5c\n- **\ud83d\udd12 \u7ebf\u7a0b\u5b89\u5168**: RLock\u4fdd\u8bc1\u591a\u7ebf\u7a0b\u6570\u636e\u4e00\u81f4\u6027\n- **\ud83d\udcca \u6027\u80fd\u76d1\u63a7**: \u5b9e\u65f6\u7f13\u5b58\u547d\u4e2d\u7387\u548c\u961f\u5217\u72b6\u6001\n\n## \ud83d\ude80 \u5feb\u901f\u5f00\u59cb\n\n### \u5b89\u88c5\n\n```bash\n# \u4f7f\u7528 pip \u5b89\u88c5\npip install aceflow-mcp-server\n\n# \u4f7f\u7528 uvx \u5b89\u88c5\uff08\u63a8\u8350\uff09 \nuvx aceflow-mcp-server\n```\n\n### \u57fa\u7840\u4f7f\u7528\n\n```bash\n# \u542f\u52a8MCP\u670d\u52a1\u5668\npython -m aceflow_mcp_server.mcp_stdio_server\n\n# \u6216\u4f7f\u7528\u4fbf\u6377\u547d\u4ee4\naceflow-mcp-server\n```\n\n### MCP \u914d\u7f6e\n\n\u5728\u4f60\u7684 MCP \u5ba2\u6237\u7aef\u914d\u7f6e\u4e2d\u6dfb\u52a0\uff1a\n\n```json\n{\n \"mcpServers\": {\n \"aceflow-unified\": {\n \"command\": \"aceflow-unified\",\n \"args\": [\"serve\", \"--mode\", \"enhanced\"],\n \"env\": {\n \"ACEFLOW_LOG_LEVEL\": \"INFO\"\n }\n }\n }\n}\n```\n\n## \ud83d\udd27 \u914d\u7f6e\u6a21\u5f0f\n\n### \u57fa\u7840\u6a21\u5f0f (Basic)\n- \u2705 \u6838\u5fc3\u5de5\u5177: `aceflow_init`, `aceflow_stage`, `aceflow_validate`\n- \u2705 \u57fa\u7840\u8d44\u6e90: `project_state`, `workflow_config`, `stage_guide`\n- \ud83c\udfaf \u9002\u7528\u4e8e: \u7b80\u5355\u9879\u76ee\uff0c\u5feb\u901f\u539f\u578b\n\n### \u6807\u51c6\u6a21\u5f0f (Standard)\n- \u2705 \u5305\u542b\u57fa\u7840\u6a21\u5f0f\u6240\u6709\u529f\u80fd\n- \u2705 \u53ef\u9009\u542f\u7528\u534f\u4f5c\u548c\u667a\u80fd\u529f\u80fd\n- \ud83c\udfaf \u9002\u7528\u4e8e: \u5927\u591a\u6570\u9879\u76ee\uff0c\u5e73\u8861\u529f\u80fd\u548c\u6027\u80fd\n\n### \u589e\u5f3a\u6a21\u5f0f (Enhanced)\n- \u2705 \u5305\u542b\u6807\u51c6\u6a21\u5f0f\u6240\u6709\u529f\u80fd\n- \u2705 \u534f\u4f5c\u5de5\u5177: `aceflow_respond`, `aceflow_collaboration_status`, `aceflow_task_execute`\n- \u2705 \u667a\u80fd\u5de5\u5177: `aceflow_intent_analyze`, `aceflow_recommend`\n- \u2705 \u589e\u5f3a\u8d44\u6e90: `collaboration_insights`, `usage_stats`\n- \ud83c\udfaf \u9002\u7528\u4e8e: \u590d\u6742\u9879\u76ee\uff0c\u56e2\u961f\u534f\u4f5c\n\n## \ud83d\udcda API \u53c2\u8003\n\n### \u6838\u5fc3\u5de5\u5177\n\n#### `aceflow_init`\n\u521d\u59cb\u5316 AceFlow \u9879\u76ee\n\n```python\nresult = await aceflow_init(\n mode=\"standard\",\n project_name=\"my-project\",\n directory=\"./my-project\"\n)\n```\n\n#### `aceflow_stage`\n\u7ba1\u7406\u9879\u76ee\u9636\u6bb5\n\n```python\nresult = await aceflow_stage(\n action=\"next\",\n current_stage=\"planning\"\n)\n```\n\n#### `aceflow_validate`\n\u9a8c\u8bc1\u9879\u76ee\u72b6\u6001\n\n```python\nresult = await aceflow_validate(\n mode=\"basic\",\n target=\"project\"\n)\n```\n\n### \u534f\u4f5c\u5de5\u5177 (\u589e\u5f3a\u6a21\u5f0f)\n\n#### `aceflow_respond`\n\u54cd\u5e94\u534f\u4f5c\u8bf7\u6c42\n\n```python\nresult = await aceflow_respond(\n request_id=\"req-123\",\n response=\"Approved\",\n user_id=\"user-456\"\n)\n```\n\n### \u667a\u80fd\u5de5\u5177 (\u589e\u5f3a\u6a21\u5f0f)\n\n#### `aceflow_intent_analyze`\n\u5206\u6790\u7528\u6237\u610f\u56fe\n\n```python\nresult = await aceflow_intent_analyze(\n user_input=\"Create a new web project\",\n context={\"type\": \"project_creation\"}\n)\n```\n\n## \ud83d\udd27 \u9ad8\u7ea7\u914d\u7f6e\n\n### \u73af\u5883\u53d8\u91cf\n\n```bash\n# \u8bbe\u7f6e\u8fd0\u884c\u6a21\u5f0f\nexport ACEFLOW_MODE=enhanced\n\n# \u542f\u7528/\u7981\u7528\u7279\u5b9a\u529f\u80fd\nexport ACEFLOW_COLLABORATION_ENABLED=true\nexport ACEFLOW_INTELLIGENCE_ENABLED=true\n\n# \u6027\u80fd\u914d\u7f6e\nexport ACEFLOW_CACHE_TTL=300\nexport ACEFLOW_MAX_CONCURRENT_REQUESTS=100\n```\n\n### \u914d\u7f6e\u6587\u4ef6\n\n\u521b\u5efa `aceflow-config.json`:\n\n```json\n{\n \"version\": \"2.0\",\n \"mode\": \"enhanced\",\n \"core\": {\n \"enabled\": true,\n \"default_mode\": \"standard\",\n \"auto_advance\": false,\n \"quality_threshold\": 0.8\n },\n \"collaboration\": {\n \"enabled\": true,\n \"confirmation_timeout\": 30,\n \"auto_confirm\": false,\n \"interaction_level\": \"standard\"\n },\n \"intelligence\": {\n \"enabled\": true,\n \"intent_recognition\": true,\n \"adaptive_guidance\": true,\n \"learning_enabled\": false\n }\n}\n```\n\n## \ud83d\udd04 \u8fc1\u79fb\u6307\u5357\n\n### \u4ece aceflow-server \u8fc1\u79fb\n\n```bash\n# \u81ea\u52a8\u8fc1\u79fb\u914d\u7f6e\naceflow-unified config --migrate\n\n# \u9a8c\u8bc1\u8fc1\u79fb\u7ed3\u679c\naceflow-unified config --validate\n```\n\n### \u4ece aceflow-enhanced-server \u8fc1\u79fb\n\n```json\n// \u65e7\u914d\u7f6e\n{\n \"mcpServers\": {\n \"aceflow-enhanced-server\": {\n \"command\": \"uvx\",\n \"args\": [\"aceflow-enhanced-server@latest\"]\n }\n }\n}\n\n// \u65b0\u914d\u7f6e\n{\n \"mcpServers\": {\n \"aceflow-unified\": {\n \"command\": \"aceflow-unified\",\n \"args\": [\"serve\", \"--mode\", \"enhanced\"]\n }\n }\n}\n```\n\n## \ud83e\uddea \u5f00\u53d1\n\n### \u5b89\u88c5\u5f00\u53d1\u4f9d\u8d56\n\n```bash\n# \u514b\u9686\u4ed3\u5e93\ngit clone https://github.com/aceflow/mcp-server.git\ncd mcp-server\n\n# \u5b89\u88c5\u5f00\u53d1\u4f9d\u8d56\npip install -e \".[dev]\"\n\n# \u8fd0\u884c\u6d4b\u8bd5\npytest\n\n# \u8fd0\u884c\u7c7b\u578b\u68c0\u67e5\nmypy aceflow_mcp_server\n\n# \u683c\u5f0f\u5316\u4ee3\u7801\nblack aceflow_mcp_server\nisort aceflow_mcp_server\n```\n\n### \u8fd0\u884c\u6d4b\u8bd5\n\n```bash\n# \u8fd0\u884c\u6240\u6709\u6d4b\u8bd5\naceflow-unified test\n\n# \u8fd0\u884c\u5355\u5143\u6d4b\u8bd5\naceflow-unified test --mode unit\n\n# \u8fd0\u884c\u96c6\u6210\u6d4b\u8bd5\naceflow-unified test --mode integration\n\n# \u8fd0\u884c\u517c\u5bb9\u6027\u6d4b\u8bd5\naceflow-unified test --mode compatibility\n```\n\n## \ud83d\udc1b \u6545\u969c\u6392\u9664\n\n### \u5e38\u89c1\u95ee\u9898\n\n#### \u670d\u52a1\u5668\u542f\u52a8\u5931\u8d25\n\n```bash\n# \u68c0\u67e5\u7cfb\u7edf\u72b6\u6001\naceflow-unified doctor\n\n# \u9a8c\u8bc1\u914d\u7f6e\naceflow-unified config --validate\n\n# \u67e5\u770b\u8be6\u7ec6\u65e5\u5fd7\naceflow-unified serve --mode enhanced --log-level DEBUG\n```\n\n#### \u529f\u80fd\u6a21\u5757\u672a\u52a0\u8f7d\n\n```bash\n# \u68c0\u67e5\u6a21\u5f0f\u8bbe\u7f6e\necho $ACEFLOW_MODE\n\n# \u5f3a\u5236\u542f\u7528\u529f\u80fd\nexport ACEFLOW_COLLABORATION_ENABLED=true\nexport ACEFLOW_INTELLIGENCE_ENABLED=true\n```\n\n\u66f4\u591a\u6545\u969c\u6392\u9664\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b [\u6545\u969c\u6392\u9664\u6307\u5357](https://docs.aceflow.dev/troubleshooting)\u3002\n\n## \ud83d\udcc4 \u8bb8\u53ef\u8bc1\n\n\u672c\u9879\u76ee\u91c7\u7528 MIT \u8bb8\u53ef\u8bc1 - \u67e5\u770b [LICENSE](LICENSE) \u6587\u4ef6\u4e86\u89e3\u8be6\u60c5\u3002\n\n## \ud83d\udd17 \u76f8\u5173\u94fe\u63a5\n\n- [\u6587\u6863](https://docs.aceflow.dev)\n- [\u95ee\u9898\u53cd\u9988](https://github.com/aceflow/mcp-server/issues)\n- [\u8ba8\u8bba\u533a](https://github.com/aceflow/mcp-server/discussions)\n- [\u66f4\u65b0\u65e5\u5fd7](https://github.com/aceflow/mcp-server/blob/main/CHANGELOG.md)\n\n## \ud83e\udd1d \u8d21\u732e\n\n\u6211\u4eec\u6b22\u8fce\u793e\u533a\u8d21\u732e\uff01\u8bf7\u67e5\u770b [\u8d21\u732e\u6307\u5357](CONTRIBUTING.md) \u4e86\u89e3\u8be6\u60c5\u3002\n\n## \ud83d\udcc8 \u7248\u672c\u5386\u53f2\n\n### v2.0.0 (\u53cc\u5411AI\u534f\u4f5c\u67b6\u6784) - 2025-08-26\n- \ud83c\udf89 **\u7a81\u7834\u6027\u66f4\u65b0**: \u53cc\u5411AI-MCP\u534f\u4f5c\u67b6\u6784\n- \u2728 **\u65b0\u589e\u529f\u80fd**: \n - AI Agent \u2192 MCP \u6570\u636e\u8f93\u5165 (`set_analysis`, `save_output`)\n - MCP \u2192 AI Agent \u6570\u636e\u51c6\u5907 (`prepare_data`, `validate`)\n- \u26a1 **\u6027\u80fd\u4f18\u5316**: \n - \u5185\u5b58\u7f13\u5b58\u7cfb\u7edf (5\u5206\u949fTTL)\n - 4\u7ebf\u7a0b\u6c60\u5e76\u53d1\u5904\u7406\n - \u6279\u91cf\u64cd\u4f5c\u652f\u6301\n - \u7ebf\u7a0b\u5b89\u5168\u4fdd\u8bc1\n- \ud83d\udcca **\u6570\u636e\u7ba1\u7406**: \n - \u5b8c\u6574\u6570\u636e\u6301\u4e45\u5316\u5c42 (DataManager)\n - \u667a\u80fd\u7f13\u5b58\u548c\u8fc7\u671f\u5904\u7406\n - \u9879\u76ee\u72b6\u6001\u4e00\u81f4\u6027\u4fdd\u8bc1\n- \ud83d\udd27 **\u63a5\u53e3\u589e\u5f3a**:\n - aceflow_stage \u652f\u6301 data \u53c2\u6570\n - 8\u79cd\u64cd\u4f5c\u7c7b\u578b\u652f\u6301\n - \u5b8c\u5584\u7684\u9519\u8bef\u5904\u7406\u548c\u9a8c\u8bc1\n- \ud83e\uddea **\u6d4b\u8bd5\u8986\u76d6**: \n - \u5b8c\u6574\u7cfb\u7edf\u96c6\u6210\u6d4b\u8bd5\n - \u6027\u80fd\u57fa\u51c6\u6d4b\u8bd5\n - \u534f\u4f5c\u5de5\u4f5c\u6d41\u9a8c\u8bc1\n\n### v1.x.x (\u7b80\u5316\u67b6\u6784)\n- \ud83d\ude80 \u57fa\u7840MCP\u670d\u52a1\u5668\u529f\u80fd\n- \ud83d\udccb \u9879\u76ee\u521d\u59cb\u5316\u548c\u9636\u6bb5\u7ba1\u7406 \n- \u2705 \u57fa\u7840\u9a8c\u8bc1\u548c\u6a21\u677f\u7cfb\u7edf\n- \ud83d\udd27 4\u4e2a\u6838\u5fc3\u5de5\u5177\n\n---\n\n**\ud83d\ude80 \u5f00\u59cb\u4f7f\u7528 AceFlow MCP \u7edf\u4e00\u670d\u52a1\u5668\uff0c\u4f53\u9a8c\u66f4\u5f3a\u5927\u3001\u66f4\u7075\u6d3b\u7684\u5de5\u4f5c\u6d41\u7ba1\u7406\uff01**\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "AceFlow MCP Server - AI-\u534f\u4f5c\u589e\u5f3a\u7248\uff0c\u652f\u6301\u53cc\u5411AI-MCP\u6570\u636e\u4ea4\u6362\u7684\u667a\u80fd\u5f00\u53d1\u5de5\u4f5c\u6d41\u670d\u52a1\u5668",
"version": "2.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/aceflow/mcp-server/issues",
"Changelog": "https://github.com/aceflow/mcp-server/blob/main/CHANGELOG.md",
"Documentation": "https://docs.aceflow.dev",
"Homepage": "https://github.com/aceflow/mcp-server",
"Repository": "https://github.com/aceflow/mcp-server.git"
},
"split_keywords": [
"mcp",
" model-context-protocol",
" workflow",
" ai-collaboration",
" ai-tools",
" dual-direction",
" intelligent-workflow",
" claude-code",
" cursor"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a19c557920cdddcbf4fe789336a44848cd7ff3065134dc5de093bdef4d1841ba",
"md5": "e1e03937c6c5e6bd1e59d669e6358ae7",
"sha256": "a3ee9bd27cd694cac11b78ed942cbcc8dc6c5a74da81676493c8e17b9a5d482d"
},
"downloads": -1,
"filename": "aceflow_mcp_server-2.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e1e03937c6c5e6bd1e59d669e6358ae7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 187708,
"upload_time": "2025-08-28T08:46:25",
"upload_time_iso_8601": "2025-08-28T08:46:25.848746Z",
"url": "https://files.pythonhosted.org/packages/a1/9c/557920cdddcbf4fe789336a44848cd7ff3065134dc5de093bdef4d1841ba/aceflow_mcp_server-2.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e8a0a24fcac4e8248b96002cef318f99f1bb89f6280bf3b62c381712c2e63de0",
"md5": "ebc88c5ee4289530c7eb0baa76817088",
"sha256": "83e5d9ea8138ce5aa5fcb52ab3e3b81482803370735f03d572d7be75660584ad"
},
"downloads": -1,
"filename": "aceflow_mcp_server-2.0.2.tar.gz",
"has_sig": false,
"md5_digest": "ebc88c5ee4289530c7eb0baa76817088",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 178929,
"upload_time": "2025-08-28T08:46:27",
"upload_time_iso_8601": "2025-08-28T08:46:27.410398Z",
"url": "https://files.pythonhosted.org/packages/e8/a0/a24fcac4e8248b96002cef318f99f1bb89f6280bf3b62c381712c2e63de0/aceflow_mcp_server-2.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-28 08:46:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aceflow",
"github_project": "mcp-server",
"github_not_found": true,
"lcname": "aceflow-mcp-server"
}