SN

scgreenhalgh/nanokvm-mcp

开发工具

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

14 stars 7 forks 质量 60 趋势 20

An MCP (Model Context Protocol) server for controlling Sipeed NanoKVM devices. This enables AI assistants like Claude to remotely control hardware via keyboard, mouse, power buttons, and screen...

概览

An MCP (Model Context Protocol) server for controlling Sipeed NanoKVM devices. This enables AI assistants like Claude to remotely control hardware via keyboard, mouse, power buttons, and screen capture. NanoKVM is an open-source, affordable IP-KVM device based on RISC-V. It allows remote access to computers at the BIOS level—perfect for managing servers, embedded systems, or any headless machine. Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. This server exposes NanoKVM functionality as MCP tools that Claude and other AI assistants can use. - Python 3.10+ - mcp - Model Context Protocol SDK - httpx - Async HTTP client - websockets - WebSocket client for real-time HID - pycryptodome - AES encryption for authentication - pillow - Image processing for screenshots Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.

README

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

NanoKVM MCP Server

An MCP (Model Context Protocol) server for controlling Sipeed NanoKVM devices. This enables AI assistants like Claude to remotely control hardware via keyboard, mouse, power buttons, and screen capture.

What is NanoKVM?

NanoKVM is an open-source, affordable IP-KVM device based on RISC-V. It allows remote access to computers at the BIOS level—perfect for managing servers, embedded systems, or any headless machine.

What is MCP?

Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. This server exposes NanoKVM functionality as MCP tools that Claude and other AI assistants can use.

Features

Category Capabilities
Power Control Power on/off, reset, force shutdown via ATX header
Keyboard Type text, send key combinations (Ctrl+C, Alt+F4, etc.)
Mouse/Touch Click, move, scroll, tap at absolute screen coordinates
Screenshots Capture display as JPEG from MJPEG video stream
ISO Mounting Mount/unmount ISO images for remote OS installation
Monitoring Power LED status, HDD activity, HDMI state, resolution

Installation

From Source

git clone https://github.com/scgreenhalgh/nanokvm-mcp.git
cd nanokvm-mcp
pip install -e .

Dependencies

  • Python 3.10+
  • mcp - Model Context Protocol SDK
  • httpx - Async HTTP client
  • websockets - WebSocket client for real-time HID
  • pycryptodome - AES encryption for authentication
  • pillow - Image processing for screenshots

Configuration

Environment Variables

Variable Required Default Description
NANOKVM_HOST Yes - NanoKVM IP address or hostname
NANOKVM_USER No admin Web UI username
NANOKVM_PASS No admin Web UI password
NANOKVM_SCREEN_WIDTH No 1920 Target screen width in pixels
NANOKVM_SCREEN_HEIGHT No 1080 Target screen height in pixels
NANOKVM_HTTPS No false Use HTTPS instead of HTTP

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "nanokvm": {
      "command": "python",
      "args": ["-m", "nanokvm_mcp.server"],
      "env": {
        "NANOKVM_HOST": "192.168.1.100",
        "NANOKVM_USER": "admin",
        "NANOKVM_PASS": "admin",
        "NANOKVM_SCREEN_WIDTH": "1920",
        "NANOKVM_SCREEN_HEIGHT": "1080"
      }
    }
  }
}

Claude Code

Add to your Claude Code MCP configuration:

在 GitHub 查看完整 README

安装

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

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

配置

{ "mcpServers": { "nanokvm": { "command": "python", "args": ["-m", "nanokvm_mcp.server"], "env": { "NANOKVM_HOST": "192.168.1.100", "NANOKVM_USER": "admin", "NANOKVM_PASS": "admin", "NANOKVM_SCREEN_WIDTH": "1920", "NANOKVM_SCREEN_HEIGHT": "1080" } } } }