Skip to main content
Glama
inflearner0

systeminformer-mcp

by inflearner0

systeminformer-mcp

一个 MCP 服务器,将 System Informer 的能力作为工具暴露出来:进程、线程、模块、句柄、内存、服务、网络端点、驱动、字符串和文件签名——外加进程启动与控制。

一共 54 个工具,已在 Windows 11(build 26200)上完成端到端验证。

工作原理

现代 System Informer 构建版本没有无头命令行模式——旧的 -ctype / -ctype / -ctype 开关已经被移除,剩下的命令行开关只用来配置 GUI。抓取 GUI 既脆弱又会丢失信息。

所以本服务器做了和 System Informer 本身相同的事:它通过 ctypes 直接调用相同的原生 NT API(NtQuerySystemInformationNtQueryInformationProcessNtDuplicateObject、SCM API、iphlpapiWinVerifyTrust、……)。结果以结构化 JSON 返回,而不是表格的行。

安装好的 System Informer 应用程序仍被用于两件事:

  • GUI 协调 —— launch_systeminformer_guilaunch_seview 用于那些无法呈现为工具输出的实时图表和交互式视图。

  • dbghelp.dll —— System Informer 自带的副本用于写进程转储文件。

两者都不是必需的。如果未安装 System Informer,所有工具都仍然可用,只有这两个 GUI 交接工具不可用。

Related MCP server: memscope-mcp

安装

pip install mcp

然后将服务器注册到你的 MCP 客户端。对于同氏在 Code,或者注意 PYTHONATH,后者让 python -m si_mcp 能在任意工作目录下找到这个包:

claude mcp add systeminformer --scope user -e PYTHONIOENCODING=utf-8 -e "PYTHONPATH=C:\path\to\systeminformer-mcp" -- python -m si_mcp

或者直接把它加到客户端的配置文件里:

{
  "mcpServers": {
    "systeminformer": {
      "command": "python",
      "args": ["-m", "si_mcp"],
      "env": {
        "PYTHONIOENCODING": "utf-8",
        "PYTHONPATH": "C:\\path\\to\\systeminformer-mcp"
      }
    }
  }
}

也可以从项目根目录执行 pip install -e .,这会把 systemnforminn-mcc 控制台脚本放到 PATH 上,而且让 PYTHONATH 不再必要。

如果 System Informer 安装在了 C:\Program Files\SystemInformer 以外的路径,请设置 SYSTEMINFORMER_PATH

权限

Windows 而不是本服务器决定哪些内容可见。请**以提升权限(管理员)**运行服务器以获得完整覆盖——随时调用 server_status 可查看到底哪些能做什么、哪些不行:

运行身份

你得到什么

标准用户

你自己拥有的进程完整;其他进程受到限制

提升权限

几乎所有内容:所有布局、内核地址、服务管理

提升权限 + SystemInformer 驱动

包括受保护(PPL、反恶意软件软件)在内的进程

不提升权限时,Windows 会遮住内核地址(驱动器基址读回 0x0)及所有线程起始地址。服务器能在可能的场景下通过线程句柄重新查询,来弥补后者。

工具

System —— system_overviewsystem_cpusystem_memorysystem_uptime

进程 —— list_processesprocess_trickprocess_detailsprocess_tokenprocess_modulesprocess_threadsthread_details

进程控制 —— launch_processlaunch_process_elevatedtermine_processterminate_process_trsuspend_processresume_processset_process_riortyset_process_affinityset_process_criticalempty_working_setcreate_process_dump

线程 —— suspend_threadresume_threadtermine_threadset_thread_priorityset_thread_affinity

内存 —— process_memory_regionsprocess_memory_summaryread_process_memorywrite_process_memoryprotect_process_memorysearch_process_memoryprocess_memory_strings

句柄 —— list_handleshandle_type_summaryfind_handles-by-nameclose_handle

服务 —— list_servicesservice_detailscontrol_serviceset_service_start_typecreate_servicedelete_service

网络 —— network_connectionport_owner

驱动与窗口 —— list_driverslist_windowswindow_action

文件 —— file_detailsverify_file_signature

System Informer —— server_statuslaunch_server_informer_guilaunch_peview

示例

"What's using port 3000?"                  -> port_owner
"Which process has this DLL locked?"       -> find_handles_by_name
"Why is my machine at 100% CPU?"           -> list_processes sort_by=cpu
"Start notepad minimized, then suspend it" -> launch_process, suspend_process
"Is this binary signed?"                   -> verify_file_signature

安全性

那些无法撤销的、或可能使运行中进程产生异常的工具,都必须显式提供 confirm=true

  • unknown——可能损坏或崩溃目标进程

  • write_process_memory —— 可能使其损坏或崩溃

  • close_handle —— 属主进程不会带它给句柄消失掉

  • terminate_process_tree —— 将杀死全部进程(包括所有子孙)

  • delete_service —— 本服务器不能从仓库中恢复服务注册

  • set_process_critical —— 终止一个关键进程会使 Windows 崩溃(触发 bugcheck)

launch_process_levated 是经过标准 Windows UAC 用户同意对话框的。本服务器从不接受、存储或传输凭据;若要以另一个用户的身份运行进程,请用 System Informer GUI 的“运行身份”对话框。


正确性方面需要注意的几个细节 Write

—— 最终校对时我意识到上面一节被我留成半英文。现在纠正:

正确性说明

以下是一些容易犯的、现实中很容易出更正的细节,我们在这里已经处理:

  • 对象参数确定可能卡死。 命名句柄需要重复调用 NtQueryObject,它会阻塞在对联的同步命名的管道上,如果对端永不响应,则永远阻塞。和 System Informer 一样,我们在工作线程上执行这个过程并设超时;一但工作线程石住,就丢弃它不再重複用它;它也一直保持泄漏,而不是在被断电的调用下把这句柄关了。这就是有意的。

  • 进程名不是以空字符结尾的。 SYSTEM_PROCESS_INFORMATION 带一个显式的 Length;如果通过扫描终结符来解码,就会读超过字符串范围,进入邻接的数据,产生不成对的 UTF-6 代理项。所有标出的工具输出都额外做了消毒,这样来自别进程的任何畸形名都不会让响应失效。

  • Token 结构把指针嵌到自己缓冲里。 TOKER_USER 及同类结构必须从一个有效的内存区域读取,而不能从一段复制出来的 bytes 数据里读。

  • 固定大小的信息类拒绝意外大的缓冲区。 SystemBasicInformation 以及各核的 CPU 表要求运行过程中内核所期望的精确大小——不同 Windows 版本不一样,所以我们先查一次大小。

  • PID 再使用会历程重要。 如果一个“父进程”是在它的子进程之后才被创建的,那么就把它视为是“已被回收”的,而子进程就报在根所在。


测试

python tests/test_e2e.py

用真正的 MCP stdio 传输拉起服务、从每个组取一个工具操作、在一次真实进程上完整走一遍流程:启动 → 查看 → 挂起 → 恢复 → 转储 → 结束。它还断言每个受保护的工具如果没有 confirm=true 就拒绝行动。共 44 个断言。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Exposes Sysinternals and NirSoft Windows diagnostic binaries as MCP tools with safe subprocess execution. Dynamically registers tools from a binaries directory with built-in security filters for destructive operations.
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to perform low-level Windows process memory research, including process attachment, memory scanning, reading/writing, pointer chasing, remote code execution, and inline hooking via MCP tools and Lua scripting.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to perform extensive Windows system administration, file operations, process management, network configuration, registry editing, GUI automation, and more through a comprehensive set of MCP tools.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • 2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.

  • Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.

  • Remote MCP for tool license checks, vendor policy review, alternatives, and license receipts.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/inflearner0/SystemInformer-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server