](https://mseep.ai/app/3a3-fujitsu-sdt-mcp)
富士通社交数字孪生MCP服务器
](https://smithery.ai/server/@3a3/fujitsu-sdt-mcp)
该项目整合 富士通的社交数字双胞胎和数字排练API 随着 模型上下文协议(MCP),允许大型语言模型(LLM)通过自然语言访问富士通的数字排练API。
概述
富士通的社交数字孪生不仅基于现实世界的数据再现了数字空间中人和物体的状态,还再现了整个经济和社会活动。其核心功能“数字排练”使用户能够在现实世界中实施措施之前,在数字空间中模拟人类和社会行为,从而预先验证其效果和影响。
该项目使用MCP来弥合LLM和数字排练API之间的差距,使用户能够使用自然语言运行模拟和分析结果。
主要特点
- 检索并显示模拟列表
- 开始模拟
- 检索和分析仿真结果
- 管理仿真数据
- 分析交通模拟
- 比较场景
- 从自然语言生成仿真配置
先决条件
- Python 3.13或更高版本
- 访问富士通API网关(API密钥)
- MCP兼容的LLM客户端(例如Claude Desktop)
安装
通过Smithery安装
通过以下方式自动为Claude Desktop安装富士通社交数字孪生服务器 史密瑟里:
npx -y @smithery/cli install @3a3/fujitsu-sdt-mcp --client claude1.克隆存储库
git clone https://github.com/3a3/fujitsu-sdt-mcp.git
cd fujitsu-sdt-mcp2.设置环境
使用紫外线(推荐):
首先,安装uv:
# Install uv using pip
pip install uv
# Or using curl (Linux/macOS)
curl -sSf https://astral.sh/uv/install.sh | sh然后,用uv设置您的环境:
# Create virtual environment
uv venv
# Activate virtual environment
# Windows:
.venv\Scripts\activate
# Unix/MacOS:
source .venv/bin/activate
# Install dependencies
uv pip install -r requirements.txt或者,您可以使用提供的安装脚本:
# Make the script executable
chmod +x setup.sh
# Run setup
./setup.sh3.设置环境变量
# Windows:
set FUJITSU_API_BASE_URL=https://apigateway.research.global.fujitsu.com/sdtp
set FUJITSU_API_KEY=your_api_key_here
# Unix/MacOS:
export FUJITSU_API_BASE_URL=https://apigateway.research.global.fujitsu.com/sdtp
export FUJITSU_API_KEY=your_api_key_here或者,您可以创建 .env 具有以下设置的文件:
FUJITSU_API_BASE_URL=https://apigateway.research.global.fujitsu.com/sdtp
FUJITSU_API_KEY=your_api_key_here用法
启动MCP服务器
python -m fujitsu_sdt_mcp服务器使用标准I/O与MCP客户端通信。
使用交互式客户端
还提供了一个简单的客户端,用于与MCP服务器直接交互:
python client.py启动客户端时,将显示可用资源和工具的列表,您可以从命令行调用它们。
使用Claude Desktop进行设置
要将服务器与MCP兼容的LLM客户端(如Claude Desktop)一起使用:
- 打开克劳德桌面
- 转到设置>开发人员设置>编辑配置文件
- 添加以下设置:
"command": "uvx",
"args": [
"fujitsu-sdt-mcp"
],
"env": {
"FUJITSU_API_BASE_URL": "https://apigateway.research.global.fujitsu.com/sdtp",
"FUJITSU_API_KEY": "your_api_key_here"
}- 重新启动克劳德桌面
资源和工具
资源
resource://digital_rehearsal_overview:数字排练技术概述resource://simulation_metrics_explanation:模拟指标说明resource://scenario_examples:示例场景
工具
list_simulations:检索模拟列表start_simulation:开始模拟get_simulation_result:检索模拟结果get_metrics:检索模拟指标list_simdata:检索仿真数据列表get_simdata:检索模拟数据analyze_traffic_simulation:分析交通模拟compare_scenarios:比较场景create_natural_language_simulation_config:从自然语言生成模拟设置
使用示例
检索模拟列表
tool list_simulations启动模拟
tool start_simulation {"simdataId": "your_simdata_id"}交通仿真分析
tool analyze_traffic_simulation {"simulationId": "your_simulation_id", "region": "Tokyo", "timeRange": "morning rush hour", "scenario": "traffic optimization"}从自然语言生成模拟设置
tool create_natural_language_simulation_config {"description": "I want to run a traffic optimization simulation during morning rush hour in Tokyo"}LLM交互示例
User: I want to run a traffic simulation during morning rush hour in Tokyo
Claude: I can help you run a traffic simulation for Tokyo's morning rush hour. Here's how we can set it up.
First, let's generate simulation settings from your natural language description:
[Tool execution: create_natural_language_simulation_config]
Generated settings:
{
"simulationType": "traffic",
"parameters": {
"region": "Tokyo",
"timeRange": "morning_rush"
},
"name": "traffic_20250416_123045"
}
Next, let's check available simulation data:
[Tool execution: list_simdata]
From this data, I can start a simulation using Tokyo's morning traffic data.
I've selected the appropriate simulation data ID and will start the simulation:
[Tool execution: start_simulation]
The simulation has started. The simulation ID is "sim_12345".
It will take some time for the results to be available. Once complete, I'll analyze them.
(After simulation completes)
Let's analyze the simulation results:
[Tool execution: analyze_traffic_simulation]
Analysis results:
- CO2 emissions: 1,250kg
- Average travel time: 42 minutes
- Total traffic volume: 15,700 vehicles
From these results, I can see that the Shibuya-Shinjuku route experiences particularly severe congestion.
Here are some potential improvements:
1. Optimize traffic signal control
2. Implement one-way traffic on certain roads during specific times
3. Increase public transportation frequency
Would you like to see a more detailed analysis?贡献
请通过GitHub Issues报告错误或功能请求。欢迎拉取请求。
许可证
该项目在MIT许可证下发布。有关详细信息,请参阅LICENSE文件。
致谢
- 富士通公司-社交数字孪生技术的发展
- 模型上下文协议(MCP)-实现与LLM的无缝集成
