Sponsored by Deepsite.site

MCP 시스템 리소스 모니터링 서버

Created By
oh9802259 months ago
MCP Server Practice
Content

MCP 시스템 리소스 모니터링 서버

이 프로젝트는 Spring AI 기반의 MCP 서버로, 호스트 시스템의 리소스 정보를 모니터링하고 제공하는 기능을 구현합니다. 다양한 운영체제(Linux, macOS, Windows)를 지원하며, AI 모델이 시스템 리소스 정보를 요청할 수 있는 도구를 제공합니다.

주요 기능

  1. 시스템 리소스 정보 모니터링

    • CPU 사용률 정보
    • 메모리 사용량 정보
    • 프로세서 수 등 시스템 정보
  2. 최상위 CPU 사용 프로세스 정보 제공

    • 가장 많은 CPU를 사용하는 프로세스 식별
    • 프로세스 ID, 이름, CPU/메모리 사용량, 실행 시간 정보 제공
  3. 다양한 운영체제 지원

    • Linux
    • macOS
    • Windows

기술 스택

  • Java 24
  • Spring Boot 3.4.4
  • Spring AI MCP Server
  • Maven

설치 및 실행 방법

사전 요구사항

  • JDK 24 이상
  • Maven 3.6 이상

빌드 및 실행

  1. 프로젝트 클론

    git clone <repository-url>
    cd example-server
    
  2. Maven으로 빌드

    ./mvnw clean package
    
  3. 서버 실행

    ./mvnw spring-boot:run
    

API 사용 예시

MCP 서버는 다음과 같은 도구를 제공합니다:

시스템 리소스 정보 조회

현재 호스트의 CPU 및 메모리 사용량 정보를 조회합니다

응답 예시:

시스템 리소스 정보:

CPU 정보:
- 사용 가능한 프로세서: 8개
- 시스템 CPU 사용률: 15.75%
- 프로세스 CPU 사용률: 2.13%

메모리 정보:
- 전체 메모리: 16384 MB
- 사용 가능한 메모리: 8472 MB
- 사용 중인 메모리: 7912 MB
- 메모리 사용률: 48.29%

최상위 CPU 사용 프로세스 정보 조회

현재 호스트에서 가장 많은 CPU 자원을 사용하는 프로세스 정보를 조회합니다

응답 예시:

현재 가장 많은 CPU를 사용 중인 프로세스:

PID: 1234
이름: chrome
CPU 사용량: 25.3%
메모리 사용량: 1250 MB
실행 시간: 120분

주의 사항

  • MCP 의 동작을 확인하고 싶어 간단히 만든 코드로 환경별로 정상적인 동작을 하지않을 수 있습니다.
  • 시스템 리소스 정보를 가져오기 위해 외부 명령어를 실행하므로, 해당 명령어가 사용 가능한 환경이어야 합니다.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor