weapon-recoil-simulation-service
A microservice designed to compute and render detailed projectile path simulations reflecting firearm kickback characteristics across multiple weapon types. It exposes standardized HTTP endpoints for instantaneous recoil data retrieval and dynamic parameter modification.
Author

Hyeongseob91
Quick Info
Actions
Tags
Firearm Recoil Dynamics Engine (FRDE) - MCP Implementation
- We have deployed a robust MCP service enabling game architects to programmatically calculate and visualize weapon muzzle deviation trajectories via straightforward API interactions.
- FPS 게임 개발자가 간단한 API 호출만으로 무기 반동 패턴을 생성하고 시각화할 수 있는 강력한 MCP 서버를 출시했습니다.
Access and Deployment via Smithery: 
WRG Framework Server
- This operational MCP entity furnishes two primary utilities—Recoil Path Computation and Trajectory Rendering—accessible via dedicated web interfaces. Deploy this service locally or within a cloud infrastructure to begin iterative, real-time calibration of your simulation's weapon feedback.
- 이 MCP 서버는 ‘무기 반동 생성’과 ‘반동 시각화’라는 두 가지 핵심 도구를 HTTP 엔드포인트로 제공하며, 로컬 또는 클라우드에 배포한 뒤 실시간으로 반동 튜닝을 시작할 수 있습니다.
Setup Procedure
git clone https://github.com/Hyeongseob91/mcp-server.git
cd mcp-server
pip install -r requirements.txt
````
## Local Execution
Initiate the service locally, enabling hot-reloading:
자동 리로드 기능을 켜고 로컬에서 서버를 실행합니다:
```bash
uvicorn main:app --reload --host 0.0.0.0 --port 8000
Integration Guide
Configuration within Claude Desktop Client
Integrate the following configuration object into your Claude setup file: Claude 설정 파일에 다음을 추가하세요:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"wrg": {
"command": "python /path/to/mcp-server/main.py --http"
}
}
}
Upon client restart, endpoints such as /wrg and /rvz become directly callable for immediate system interaction.
Claude Desktop을 재시작한 후 /wrg와 /rvz 엔드포인트를 직접 호출할 수 있습니다.
Core Capabilities
-
Weapon Recoil Path Generation (WRG)
-
machinegun_recoil_points(shots: int)- Calculates the resultant recoil path coordinates based on the specified count of automatic fire events.
- 기관총 발사 횟수에 따른 반동 궤적 데이터를 생성합니다.
-
Weapon Recoil Path Generation (WRG)
-
pistol_recoil_points(shots: int)- Computes the simulated deviation path for handgun discharge sequences by input shot count.
- 권총 발사 횟수에 따른 반동 궤적 데이터를 생성합니다.
-
Weapon Recoil Path Generation (WRG)
-
shotgun_recoil_points(shots: int)- Derives the ballistic offset trajectory data corresponding to the number of shotgun blasts executed.
- 산탄총 발사 횟수에 따른 반동 궤적 데이터를 생성합니다.
-
Recoil Rendering Utility (RVZ)
-
plot_recoil_pattern(data: Tuple[List[float], List[float]])- Renders the provided X and Y recoil measurement series into a visual 2D scatter graph format.
- 입력된 반동 좌표 데이터를 2D 산점도로 시각화합니다.
-
Service Interface Endpoints
-
/wrg/*– Convenient HTTP access point for instantaneous recoil data computation. -
/rvz/*– Immediate HTTP interface for rendering complex recoil profiles. -
**Deployment Flexibility
-
Utilize FastMCP to deploy the identical service architecture across both local development machines and scalable cloud platforms (like Smithery).
-
FastMCP를 사용하여 로컬 및 클라우드(예: Smithery) 환경에 동일한 API를 배포합니다.
-
Access Security (Upcoming Feature)
-
Future roadmap includes implementation of token-based API key verification for external system authorization.
- 외부 접근 제어를 위한 API Key 인증 기능을 곧 지원할 예정입니다.
Anticipated Gains
-
Operational Velocity Increase
-
Eliminates the prerequisite for manual implementation of intricate kinetic algorithms.
- 복잡한 반동 알고리즘을 직접 구현할 필요가 없습니다.
- Built-in graphical tools drastically expedite data verification cycles and initial concept testing.
-
내장된 시각화 도구로 데이터 검증 및 프로토타입 속도가 향상됩니다.
-
System Interoperability & Asset Sharing
-
Standardized interfaces at
/wrgand/rvzpromote effortless module exchange and reuse across development groups. - 통합된 /wrg 및 /rvz 인터페이스로 팀 간 모듈 공유 및 재사용이 용이합니다.
- Ensures smooth integration paths between backend systems, frontend rendering layers, AI modeling teams, and core game logic programmers.
-
백엔드, 프론트엔드, AI 엔지니어, 게임 개발자 간 원활하게 연동됩니다.
-
Infrastructure Adaptability & Load Management
-
Facilitates a smooth transition from localized testing environments to demand-driven cloud resource allocation.
- 로컬 테스트 후 클라우드에 배포하여 필요에 따라 손쉽게 확장할 수 있습니다.
- Compatibility with established Continuous Integration/Continuous Deployment pipelines supports automated rollouts and version tracking.
-
CI/CD 파이프라인과 연동하여 자동 배포 및 버전 관리가 가능합니다.
-
**Iterative Balance Tuning
-
Allows immediate visualization of muzzle deviation profiles via simple API calls during live balance iterations.
- 게임 밸런스 조정 시 API 호출로 즉시 반동 패턴을 확인할 수 있습니다.
- A methodology rooted in quantitative data accelerates the efficacy of playtesting sessions.
- 데이터 기반 의사결정으로 플레이 테스트 효율성이 향상됩니다.
Diagnostics
- Given the service's reliance on the HTTP protocol, leverage comprehensive logging verbosity alongside the integrated auto-reload function. For deeper code inspection, consider attaching a debugger directly to the running Uvicorn process or closely monitoring the terminal error reports.
- 이 서버는 HTTP로 통신하므로, 자세한 로깅과 --reload 플래그를 사용하세요. 보다 심층적인 검사를 위해 Uvicorn 프로세스에 디버거를 연결하거나 콘솔 오류 출력을 확인하면 됩니다.
