响应MCP
用于钢筋混凝土Response-2000截面分析的MCP(模型上下文协议)服务器。
项目状态
当前阶段:带有存根实现的初始MCP框架
- ✅ MCP服务器基础设施完成
- ✅ 工具模式已定义(
analyze_section) - ⏳ Response-2000集成(待文件格式调查)
- ⏳ 实际分析执行(待定)
服务器当前返回 存根数据 -在手动调查文件格式后,将添加real Response-2000集成。
安装
先决条件
- Python 3.10或更高版本
- 已安装响应-2000(Windows可执行文件)
- WSL或本机Windows环境
设置
# Clone repository
git clone https://github.com/maczout/response-mcp.git
cd response-mcp
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"用法
运行服务器
MCP服务器通过stdio进行通信。开发/测试:
# Run directly
python -m response_mcp.server
# Or use the installed script
response-mcp使用Claude Desktop进行测试
添加到您的Claude Desktop MCP配置中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"response-mcp": {
"command": "python",
"args": ["-m", "response_mcp.server"],
"cwd": "/path/to/response-mcp"
}
}
}重新启动Claude Desktop以加载服务器。
Claude中的示例用法
Analyze a rectangular concrete section:
- Width: 400 mm
- Depth: 600 mm
- Concrete strength: 35 MPa
- Rebar yield: 400 MPa
- Top reinforcement: 4 × 25mm bars, 60mm cover
- Bottom reinforcement: 4 × 25mm bars, 60mm cover克劳德将使用 analyze_section 工具具有这些参数。
工具参考
analyze_section
分析矩形钢筋混凝土截面。
参数:
width(数字):截面宽度,单位为毫米depth(数字):截面深度,单位为毫米fc(编号):混凝土抗压强度,单位MPafy(编号):钢筋屈服强度(MPa)rebar_top(阵列):顶部钢筋[[count, diameter_mm, cover_mm], ...]rebar_bottom(阵列):底部钢筋[[count, diameter_mm, cover_mm], ...]axial_load(数字,可选):施加的轴向载荷,单位为kN(正=压缩)
退货:
- 设计弯矩承载力(φMn),单位为kNm
- 故障模式(压缩/拉伸/平衡)
- 承载能力下的曲率(1/mm)
- 中性轴深度(mm)
发展路线图
第一阶段:调查(当前)
- \[\]在样本部分手动运行Response-2000
- \[\]文档.r2k输入文件格式
- \[\]捕获并分析.out输出文件
- \[\]使用/b/r标志测试命令行执行
阶段2:适配器实现
- \[\]实施
InputFileGenerator对于.r2k文件 - \[\]实施
Response2000Runner用于子流程执行 - \[\]实施
OutputFileParserfor.out文件 - \[\]添加全面的错误处理
- \[\]根据已知结果编写单元测试
第三阶段:整合
- \[\]替换中的存根实现
tools.py - \[\]添加Response.exe路径的配置
- \[\]与Claude进行端到端测试
- \[\]处理边缘情况和收敛失败
第四阶段:波兰语
- \[\]添加更多截面类型(T梁等)
- \[\]改进错误消息
- \[\]添加日志记录和诊断
- \[\]撰写全面的文档
- \[\]创建示例计算
项目结构
response-mcp/
├── src/
│ └── response_mcp/
│ ├── __init__.py # Package initialization
│ ├── server.py # MCP server entry point
│ ├── tools.py # Tool definitions (stub implementation)
│ └── adapter.py # Response-2000 integration (stub)
├── tests/ # Test suite (coming soon)
├── pyproject.toml # Project configuration
└── README.md # This file测试
# Run tests (once implemented)
pytest
# Run with coverage
pytest --cov=response_mcp贡献
该项目展示了“分数工程”方法——人工智能增强的结构工程工作流程。
开发进度和方法将通过博客文章和这个存储库记录下来。
许可证
MIT许可证-有关详细信息,请参阅许可证文件
致谢
- Evan Bentz和Michael Collins的2000年回应
- MCP(模型上下文协议)
