Altium MCP统一
Altium Designer的统一模型上下文协议(MCP)服务器,可在实时API交互和基于文件的操作之间智能路由。
概述
该项目在Claude Desktop和Altium Designer之间提供了一个无缝的桥梁,支持两种操作模式:
- 实时模式:当Altium Designer运行时,通过基于Python的工具直接与应用程序交互
- 文件模式:当Altium Designer关闭时,使用基于Rust的解析器读取和分析设计文件
建筑
统一架构使用智能调度器,自动检测Altium Designer的可用性并相应地路由请求:
altium-mcp-unified/
├── manifest.json # MCP manifest for Claude Desktop
├── server/
│ ├── main.py # MCP entry point + tool registry
│ ├── router.py # Live vs file mode detection
│ ├── live/ # Python tools for live Altium interaction
│ │ ├── board.py
│ │ ├── layout.py
│ │ ├── schematic.py
│ │ └── output_jobs.py
│ ├── file/
│ │ └── bridge.py # Calls Rust binary, parses JSON responses
│ └── workspace/ # Request/response JSON (Altium bridge)
├── rust-core/ # Rust binary for file parsing
└── scripts/ # Altium DelphiScript bridge特性
- 智能模式切换:自动检测Altium Designer是否正在运行
- 实时API访问:通过Python与开放的Altium项目直接交互
- 基于文件的分析:无需打开应用程序即可解析和分析Altium文件
- 统一接口:两种操作模式均使用单个MCP服务器
实施状态
该项目正在积极开发中。计划实施阶段:
- 基础:核心路由和调度器实施
- 架桥车:用于文件操作的Rust二进制集成
- 实时图层:用于Altium实时交互的Python工具集成
- 集成:端到端测试和验证
需求
- Python 3.8+
- Altium Designer(用于实时模式操作)
- Rust工具链(用于构建文件解析器)
- 支持MCP的Claude桌面
安装
# Clone the repository
git clone https://github.com/10x-engineering/altium-mcp-unified.git
cd altium-mcp-unified
# Install Python dependencies
pip install -r requirements.txt
# Build the Rust parser
cd rust-core
cargo build --release
cd ..配置
将MCP服务器添加到您的Claude Desktop配置中:
{
"mcpServers": {
"altium-unified": {
"command": "python",
"args": ["path/to/altium-mcp-unified/server/main.py"]
}
}
}用法
配置后,MCP服务器将根据Altium Designer的可用性自动路由您的请求:
- 请Claude分析原理图、布局或电路板设计
- 请求组件信息、网络连接或设计规则检查
- 导出设计数据或生成报告
服务器处理确定是使用实时API调用还是基于文件的解析的复杂性。
贡献
欢迎投稿!请随时提交问题、功能请求或拉取请求。
许可证
\[待添加许可证信息\]
相关项目
学分
这种统一的架构结合了两个方面的优点:
- 受coffeenmusic Python工具启发的API实时交互
- 嵌入式社会Rust实现的文件解析功能
