Token导航 LogoToken导航TokenDH.com
Linux MCP Agent logo
开发工具stdio官方级别未说明来源级核验

Linux MCP Agent

MCP Server

一个轻量级CLI客户端,用于通过Linux MCP服务器进行交互式系统诊断和故障排除。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
命令行工具PythonVS CodeVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

alexjch

提供方

alexjch

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv .venv

详细介绍

mcp-linux代理

一个轻量级的CLI客户端 Linux MCP服务器此工具在无头服务器上运行,不需要X11或其他显示库,可以直接从终端进行交互式Linux系统诊断。

特性

  • 🤖 交互式聊天界面,支持人工智能故障排除
  • 🔍 通过以下方式进行只读系统诊断 Linux MCP服务器
  • 🎨 具有颜色编码输出的丰富控制台UI
  • ⚙️ 基于环境的配置
  • 🐳 开发容器支持,便于设置

先决条件

安装

开发容器快速入门

  1. 在VS Code中打开项目
  2. 出现提示时重新打开容器
  3. 等待自动设置完成

手动安装

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt
pip install linux-mcp-server

配置

通过环境变量进行配置:

变量默认值描述
LINUX_MCP_SERVER.venv/bin/linux-mcp-serverMCP服务器可执行文件的路径
LLM_PROVIDERollamaLLM后端(ollamagooglegenai)
LLM_MODELllama3.2:latest所选后端的型号名称
LLM_BASE_URLhttp://localhost:11434Ollama服务器URL(用于 LLM_PROVIDER=ollama)
REQUEST_TIMEOUT90请求超时(秒)

提供商示例

启动代理之前,请使用以下配置之一。

Ollama(当地)

export LLM_PROVIDER=ollama
export LLM_MODEL=llama3.2:latest
export LLM_BASE_URL=http://localhost:11434

谷歌GenAI

export LLM_PROVIDER=googlegenai
export LLM_MODEL=gemini-2.0-flash
export GOOGLE_API_KEY=your_api_key_here

用法

# As a module
python -m linux_mcp_agent

# Or directly
python linux_mcp_agent

示例会话

You: What is the free disk space?
Agent: [Analyzes system and provides disk usage information]

You: Check if nginx is running
Agent: [Queries service status and reports findings]

You: exit
Goodbye!

发展

制定目标

make install   # Install dependencies
make format    # Format code with black
make lint      # Run flake8 and mypy
make test      # Run pytest
make all       # Run format, lint, and test
make clean     # Remove cache files

项目结构

linux_mcp_agent/
├── __init__.py      # Package initialization
├── __main__.py      # Entry point
├── agent.py         # Main agent logic
└── config.py        # Configuration management
tests/
├── __init__.py
└── test_config.py   # Configuration tests

建筑

代理人使用:

  • 骆驼索引:LLM驱动的应用程序框架
  • MCP(模型上下文协议):工具访问的标准协议
  • 奥拉玛:本地LLM推理
  • 富有的:终端UI格式

代理以只读模式运行,防止系统修改。

许可证

许可证 文件以获取详细信息。

目录标签

目录标签

命令行工具PythonVS CodeCLI工具本地部署系统诊断故障排除AI辅助Linux工具

支持客户端

VS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP