Genesis MCP服务器
用于Genesis World模拟的模型上下文协议(MCP)服务器,支持可视化。
快速开始
要了解开始可视化的最快方法:
# Run the simplified setup script (only installs what's needed)
./setup.sh
# Run the stdio client (opens a visualization window)
./examples/stdio_client.py这将直接启动Genesis World模拟,并使用stdio传输进行可视化。
运输方式:stdio
此服务器使用 stdio传输 这是Genesis World可视化功能所必需的。 可视化组件需要本地运行时,无法通过网络传输工作。
设置
先决条件
- Python 3.8+
- uv包管理器(
pip install uv) - npm(可选,用于MCP检查器)
安装
Linux/macOS
# Clone the repository
git clone https://github.com/username/genesis-mcp.git
cd genesis-mcp
# Run the setup script
./setup.sh
# Activate the virtual environment
source .venv/bin/activate视窗
# Clone the repository
git clone https://github.com/username/genesis-mcp.git
cd genesis-mcp
# Run the setup script
setup.bat
# Activate the virtual environment
.venv\Scripts\activate.bat紫外线手动安装
如果您更喜欢手动安装依赖项:
- 创建虚拟环境:
uv venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate.bat # Windows- 从锁文件安装依赖项:
uv pip install -r requirements.lock
uv pip install -e .
uv pip install genesis==0.2.1 --no-deps- 安装MCP检查器(可选):
npm install -g @modelcontextprotocol/inspector@0.6.0运行服务器
# Run with stdio transport (required for visualization)
./start.sh
### Using with the MCP Inspector
To use with the MCP Inspector for debugging:
In one terminal, start the inspector
mcp-inspector
In another terminal, start the server with stdio transport
python server.py
配置MCP检查器:
- 传输类型:STDIO
- 命令:python
- 参数:server.py
## 可用资源
### 世界资讯
获取有关Genesis World功能的信息:
world_info://{name}
## 可用工具
### 仿真运行
使用提供的代码和参数运行Genesis World模拟:
run_simulation
## MCP客户端
存储库包括用于可视化的stdio客户端:
Run a simulation with Genesis World visualization
./examples/stdio_client.py
黑客快乐!
