KO

kousen/osquerymcpserver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

15 stars 14 forks 质量 67 趋势 25MIT

MCP 包装和克洛德 Osquery 代码技能

概览

将Osquery与AI助手整合的完整执行,提供了三种方法:克洛德桌面的MCP服务器,Spring AI客户端,以及克洛德代码直接使用CLI的技能. 这个计划通过将自然语言翻译为Osquery SQL查询,使AI助理能够回答诸如"我的粉丝为什么跑得这么热"等系统诊断问题,或者"什么是使用我所有的记忆". 堆栈在GraalVM本土图像支持下被升级为最新的Spring生态系统: : MCP服务器编译为~62MB本土二进制,以~36ms开始并响应MCP请求. 这对语音接口使用大小写至关重要——当一个JavaFX语音客户端发射服务器时,它需要立即响应. : getSystemHealth Summary () 现在使用Executers同时运行所有5个诊断查询(CPU,内存,磁盘,网络,温度). newVirtualThreadPerTaskExecutor () 与 Confletable Future. supportAsync ().

概述(AI 翻译)

将Osquery与AI助手整合的完整执行,提供了三种方法:克洛德桌面的MCP服务器,Spring AI客户端,以及克洛德代码直接使用CLI的技能.

□ 概览

这个计划通过将自然语言翻译为Osquery SQL查询,使AI助理能够回答诸如"我的粉丝为什么跑得这么热"等系统诊断问题,或者"什么是使用我所有的记忆".

** 与大赦国际使用Osquery的三种方式:**

{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}“如何运作” {\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢? |--------------------------------------------------------------------------------------------------------------------------------------------------------------

  • ** MCP 服务器** * * * 克洛德桌面 * * 春季 Boot 服务器通过 MCP 协议 QQ 进行通信 使用 Spring AI 的 MCP 自动配置的 CLI 客户端 ** Claude Code Skill ** Claude Code CLI 直接 [T0] 通过Bash执行,不需要服务器 QQ

□什么是新来

堆栈在GraalVM本土图像支持下被升级为最新的Spring生态系统:

QQ 组件 QQ 先前 QQ 当前 QQ |-----------. 春靴 | 3. 5.0 | ** 4.0.3 ** | 春季AI ^ 1.0.0 → ** 2.0.0 ** →

  • Java 21 * ** 25 ** (GraalVM CE) * * ^ Jackson → 2.x ([[T1]) → ** 3.x** ([T2]) → |. ======================================= =======================================================================================================================================================================================================================.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Osquery MCP Server, Client & Skill

A complete implementation for integrating Osquery with AI assistants, providing three approaches: an MCP server for Claude Desktop, a Spring AI client, and a Claude Code skill for direct CLI usage.

Overview

This project enables AI assistants to answer system diagnostic questions like “Why is my fan running so hot?” or “What’s using all my memory?” by translating natural language into Osquery SQL queries.

Three ways to use osquery with AI:

Approach Best For How It Works
MCP Server Claude Desktop Spring Boot server communicates via MCP protocol
Spring AI Client Programmatic access CLI client using Spring AI’s MCP auto-configuration
Claude Code Skill Claude Code CLI Direct osqueryi execution via Bash, no server needed

What’s New

The stack was upgraded to the latest Spring ecosystem with GraalVM native image support:

Component Previous Current
Spring Boot 3.5.0 4.0.3
Spring AI 1.0.0 2.0.0
Java 21 25 (GraalVM CE)
Jackson 2.x (com.fasterxml) 3.x (tools.jackson)
Dependency mgmt io.spring.dependency-management plugin Gradle platform() BOMs
Native image Not supported GraalVM native binary (~36ms startup)
System health Sequential (5 queries) Parallel via virtual threads

Key Upgrade Details

GraalVM Native Image: The MCP server compiles to a ~62MB native binary that starts and responds to MCP requests in ~36ms. This is critical for the voice interface use case — when a JavaFX voice client launches the server, it needs to respond instantly.

Virtual Threads: getSystemHealthSummary() now runs all 5 diagnostic queries (CPU, memory, disk, network, temperature) in parallel using Executors.newVirtualThreadPerTaskExecutor() with CompletableFuture.supplyAsync(). This reduces response time from the sum of all queries to the duration of the slowest single query.

Jackson 3 Migration (client only): Spring Boot 4 ships Jackson 3 with new Maven coordinates (tools.jackson.core instead of com.fasterxml.jackson.core), immutable builders (JsonMapper.builder().build() instead of new ObjectMapper()), and unchecked exceptions (JacksonException instead of JsonProcessingException).

Gradle Build Changes: Spring Boot 4 drops the io.spring.dependency-management plugin. Dependencies are now managed with Gradle-native platform() BOMs. Spring AI 2.0.0 is GA on Maven Central, so no milestone repository is required.

Features

MCP Server

  • Natural Language System Diagnostics: Ask questions like “What’s using my CPU?” and get intelligent answers
  • 11 Specialized Tools for common diagnostic scenarios:
    • Execute custom Osquery SQL queries
    • Get table schemas and available columns
    • Find high CPU/memory/disk I/O usage processes
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "osquery": { "command": "java", "args": ["-jar", "path/to/osquery-mcp-server.jar"] } } }