Server-Inspection
服务器巡检 MCP
claude mcp add --transport stdio b3nguang-server-inspection-mcp uv --directory your_path run main.py
How to use
This MCP server is designed for server-side inspection and forensics. It runs an agent program on the target server (via the UV tool) and exposes inspection capabilities through the MCP interface on the client PC. The example configuration maps the MCP server name to a UV-based command that runs a Python agent (main.py) from a specified directory. When deployed, you can initiate the agent from the MCP client side and collect diagnostics, logs, or other inspection data produced by main.py. The included checks (e.g., websocket connectivity and RSA encryption) indicate security and channel integrity should be verified, although the README marks these as tasks to enable and configure later. Use the provided server name (forensics ssh mcp) and modify the --directory argument to point to the agent’s location on the target server. The MCP workflow will then run the agent's main.py and relay results back through the MCP channel for viewing and analysis.
How to install
Prerequisites
- A target server with Python installed (the agent runs a Python script, main.py).
- An MCP client/host environment to run the MCP server definition (as shown in the README).
- Network access between the MCP host and the target server where the agent runs, plus appropriate permissions to execute the agent.
Step-by-step
- Prepare the target environment
- Install Python 3.x on the target server.
- Place the agent script (main.py) and any required modules in a directory, e.g. /path/to/agent.
- Install and configure the UV tool (as used in the MCP config)
- Install the UV tool on the MCP host or ensure it is accessible in PATH. For example, if UV is distributed via a package manager or Python environment, install according to your platform.
- Verify you can run the agent manually:
- uv --directory /path/to/agent run main.py
- Create the MCP configuration (as shown in the README)
- Save the mcp_config.json or equivalent configuration with the following entry: "mcpServers": { "forensics ssh mcp": { "command": "uv", "args": ["--directory", "your_path", "run", "main.py"] } }
- Run the MCP server
- Start your MCP server environment using the standard startup command for your setup (e.g., npx/uv/node/pipx as appropriate for your runtime).
- Ensure the MCP host can reach the target directory and that main.py executes without errors when run through UV.
- Validate the connection
- Confirm that the MCP client can trigger the agent and receive responses. Check logs for any permission or path errors and adjust --directory accordingly.
Additional notes
Notes and tips:
- The README mentions a WebSocket connection (ws) and RSA encryption; ensure these security features are enabled in your deployment if required by your environment. You may need to configure TLS, keys, and network permissions to establish a secure channel.
- The mcp_config uses a literal path placeholder (your_path). Replace it with the actual directory on the target server where main.py resides.
- If the target environment requires authentication or SSH tunneling, ensure the MCP host has the necessary credentials and access rights to execute the agent script.
- If you encounter permission denied errors, verify that the user running the MCP server has execute permissions on main.py and read access to the directory provided in --directory.
- Keep the agent script under version control and document any dependencies used by main.py to simplify maintenance.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go