IOBS MCP Server
Controls surgical bed and C-arm through natural language commands via MCP protocol, with a mock backend and 3D visualization for real-time feedback.
README
IOBS MCP Server — 手术室 AI 设备控制平台
通过自然语言控制手术床和 C 臂。Claude Desktop 通过 MCP 协议调用设备控制工具,Mock 后端模拟硬件行为,前端 3D 实时可视化。
架构
┌─────────────────┐ MCP (stdio) ┌──────────────────┐
│ Claude Desktop │ ◄──────────────────► │ MCP Server │
│ (自然语言交互) │ │ 8 个工具 │
└─────────────────┘ └────────┬─────────┘
│ HTTP + WS
▼
┌─────────────────┐ Vite Proxy ┌──────────────────┐
│ iobs-unified-app│ ◄──────────────────► │ Mock Backend │
│ (React 3D 前端) │ │ (Express:18011) │
└─────────────────┘ └──────────────────┘
开始
npm install
npm run dev
连接到 iobs-unified-app 前端
把你前端的 vite.config.ts 里的代理目标指向 localhost:18011:
// vite.config.ts — 修改一行
'/iobs-api': {
target: 'http://localhost:18011', // 原本是 192.168.1.200:18011
changeOrigin: true,
},
然后启动前端 npm run dev,3D 场景会显示 Mock 后端提供的设备状态。
连接到 Claude Desktop
- 编译项目:
npm run build - 找到 Claude Desktop 配置文件:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
- 添加配置后重启 Claude Desktop:
{
"mcpServers": {
"iobs-surgical": {
"command": "node",
"args": ["D:/compilation tool/Yiming/operating table/iobs-mcp-server/dist/index.js"]
}
}
}
MCP 工具列表
| 工具 | 说明 |
|---|---|
get_device_state |
获取手术床 10 关节 + C 臂 4 关节 + 模式 + 急停 |
list_joints |
列所有可控关节、物理范围、可用体位预设 |
move_bed_joint |
调整手术床指定关节(目标值或增量) |
move_carm_joint |
调整 C 臂指定关节 |
apply_bed_preset |
一键应用手术体位(平卧位/截石位/沙滩椅位等 7 种) |
set_carm_mode |
C 臂模式:1=同步 / -1=镜像 / 0=脱离 |
emergency_stop |
🚨 紧急停止所有设备 |
reset_emergency |
解除急停 |
演示场景
1. 查询设备状态
"手术室现在什么状态?"
2. 调整手术床
"把手术床升高到 800mm,背板抬起来 30 度"
3. 应用手术体位
"病人要做腹腔镜,给我调成 Trendelenburg 位"
4. C 臂控制
"C 臂旋转 45 度,高度降到 320"
5. 紧急停止
"紧急停止!"
6. 完整手术准备
"把床放平,C 臂切换到同步模式,调到沙滩椅位"
API 端点
Mock 后端完整实现了 IOBS API 协议,兼容 iobs-unified-app 前端:
GET /iobs-api/healthGET /iobs-api/get_pos?version=1.0GET /iobs-api/get_space?version=1.0GET /iobs-api/set_joint_move?version=1.0&device=...&joint=...&speed=...GET /iobs-api/get_status?version=1.0— 手术体位预设GET /iobs-api/get_c_arm_mode?version=1.0POST /iobs-api/set_stop?version=1.0WebSocket /ws— 实时状态推送
技术栈
- MCP SDK: @modelcontextprotocol/sdk ^1.0
- Mock Backend: Express + ws + in-memory state
- Runtime: Node.js 18+ (ESM)
- Dev: tsx + TypeScript 5.9
项目结构
src/
├── index.ts # 入口
├── mock-server/
│ ├── index.ts # Express 启动
│ ├── device-state.ts # 设备状态存储 + 约束
│ └── routes.ts # REST + WebSocket 路由
└── mcp-server/
├── index.ts # MCP Server (stdio)
├── tools.ts # 8 个 Tool 定义
└── handlers.ts # Tool 执行逻辑
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.