Fujitsu Social Digital Twin MCP Server

by 3a3
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Supports configuration through .env files for storing API credentials and endpoints for the Fujitsu API Gateway.

  • Integrates with Fujitsu's Social Digital Twin and Digital Rehearsal API, enabling simulation management, results analysis, traffic simulation analysis, scenario comparison, and natural language generation of simulation configurations.

후지쯔 소셜 디지털 트윈 MCP 서버

이 프로젝트에서는 Fujitsu의 Social Digital Twin과 Digital Rehearsal API를 Model Context Protocol(MCP) 과 통합하여 대규모 언어 모델(LLM)이 자연어를 통해 Fujitsu의 Digital Rehearsal API에 액세스할 수 있도록 합니다.

개요

후지쯔의 소셜 디지털 트윈은 현실 세계 데이터를 기반으로 디지털 공간에서 사람과 사물의 상태뿐만 아니라 경제 및 사회 활동 전반을 재현합니다. 핵심 기능인 "디지털 리허설"을 통해 사용자는 현실 세계에 조치를 적용하기 전에 디지털 공간에서 인간 및 사회적 행동을 시뮬레이션하여 그 효과와 영향을 사전에 검증할 수 있습니다.

이 프로젝트에서는 MCP를 사용하여 LLM과 Digital Rehearsal API 간의 격차를 해소하고, 사용자가 자연어를 사용하여 시뮬레이션을 실행하고 결과를 분석할 수 있도록 합니다.

주요 특징

  • 시뮬레이션 목록 검색 및 표시
  • 시뮬레이션 시작
  • 시뮬레이션 결과 검색 및 분석
  • 시뮬레이션 데이터 관리
  • 교통 시뮬레이션 분석
  • 시나리오 비교
  • 자연어에서 시뮬레이션 구성 생성

필수 조건

  • Python 3.13 이상
  • Fujitsu API Gateway(API 키)에 대한 액세스
  • MCP 호환 LLM 클라이언트(예: Claude Desktop)

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 Fujitsu Social Digital Twin Server를 자동으로 설치하려면:

지엑스피1

1. 저장소 복제

git clone https://github.com/3a3/fujitsu-sdt-mcp.git cd fujitsu-sdt-mcp

2. 환경 설정

uv 사용(권장) :

먼저, 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.sh

3. 환경 변수 설정

# 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으로 설정

Claude Desktop과 같은 MCP 호환 LLM 클라이언트와 함께 서버를 사용하려면:

  1. 클로드 데스크톱 열기
  2. 설정 > 개발자 설정 > 구성 파일 편집으로 이동하세요.
  3. 다음 설정을 추가합니다.
"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" }
  1. Claude Desktop을 다시 시작하세요

리소스 및 도구

자원

  • 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 라이선스에 따라 배포됩니다. 자세한 내용은 라이선스 파일을 참조하세요.

감사의 말

  • 후지쯔 주식회사 - 소셜 디지털 트윈 기술 개발
  • 모델 컨텍스트 프로토콜(MCP) - LLM과의 원활한 통합 지원
ID: jdmhdohe0v