win-mcp-server

win-mcp-server

A Windows MCP server for remote administration over WinRM/NTLM, enabling management of files, services, registry, events, certificates, processes, network, and more on AD-joined Windows hosts from MCP clients.

Category
访问服务器

README

win-mcp-server

License: MIT Python 3.11 Docker

A Windows MCP server for remote administration over WinRM/NTLM. Diagnose, inspect, and manage any AD-joined Windows host from Cursor, Claude Code, Codex, or any MCP (Model Context Protocol) client. Connects using per-user credentials elicited at runtime. Passwords live only in server memory with an idle TTL and are never logged.

  • 40+ tools: filesystem, services, registry, event logs, certificates, processes, network, scheduled tasks, and more
  • Per-user AD identity: each request carries an X-AD-User header; the password is either supplied via the optional X-AD-Password header (no prompt) or elicited once and cached in-memory
  • Zero secrets on disk: no credentials in config files, env vars, or logs

Example prompts

  • "Why is drive C: almost full on HOST1?"
  • "Check the event log for errors in the last 24 hours."
  • "The Print Spooler service stopped, find out why and restart it."
  • "Which process is using port 443?"
  • "List certificates expiring in the next 30 days."
  • "Read HKLM:\SOFTWARE\MyApp and show me the current settings."
  • "Compare web.config between the two app servers."

Tools

Session

Tool Description
connect Open a WinRM session to a Windows host and return a session_id
disconnect Close an active WinRM session
list_sessions List active WinRM sessions with usage details

Filesystem (read-only)

Tool Description
list_directory List files and directories at a path
find_files Recursively find files by wildcard pattern
read_file Read file contents as numbered lines
search_file_content Grep-like text search in a file or across a directory
file_info JSON metadata for a file or directory
compare_files Line-by-line diff of two files

System diagnostics (read-only)

Tool Description
get_event_log Windows Event Log: crashes, service failures, auth errors
get_services Services summary or full JSON detail per service
list_processes Processes sorted by CPU, memory, or handles
get_system_info OS version, uptime, RAM, CPU count, domain, timezone
get_disk_space Disk space for all fixed drives
get_perf_snapshot Averaged CPU, memory, disk I/O, network snapshot
get_registry Read a registry key or value (read-only)
get_certificates Personal store certificates sorted by days until expiry
get_network_config Per-NIC IP, gateway, and DNS configuration
test_network ICMP ping or TCP port test from the remote host

Identity & configuration (read-only)

Tool Description
get_environment_variables Environment variables by scope
get_scheduled_tasks Scheduled tasks with last/next run and result
get_local_users Local user accounts with status and last logon
get_user_groups Local group memberships
get_security_context Current session identity, groups, privileges (whoami /all)
get_permissions File/folder ACL entries

Network & software (read-only)

Tool Description
get_tcp_connections Active TCP connections with owning process
get_dns_cache Local DNS client cache
get_installed_software Installed software from 64-bit and 32-bit uninstall keys
resolve_dns_name DNS resolution chain from the remote server

SFTP (read-only, from the Windows host)

Tool Description
sftp_connect Validate and cache SFTP credentials, returning an sftp_session_id
sftp_disconnect Drop a cached SFTP credential set
sftp_list_sessions List active SFTP sessions
sftp_list_directory List a directory on a remote SFTP server
sftp_stat JSON metadata for one remote path
sftp_read_file Read a remote text file as numbered lines

Write operations (all require user confirmation)

Tool Description
restart_service / stop_service / start_service Manage services with before/after state
kill_process Force-terminate a process by PID
set_registry Set a registry value showing old vs new
copy_file / rename_file / move_file File operations (no overwrite unless requested)
create_directory Create a directory and missing parents
delete_file / delete_directory Delete with metadata/size shown in the prompt
compress_archive / expand_archive Create or extract .zip archives
flush_dns Clear the DNS client cache
invoke_http_request HTTP request from the remote server

Quick Start

docker compose -f docker-compose.yml -p win-mcp up -d --build --force-recreate

Client setup

X-AD-User is required. X-AD-Password is optional: omit it and the server prompts for the password once via MCP elicitation, caching it in memory.

Cursor (mcp.json)

{
  "mcpServers": {
    "win-mcp": {
      "type": "http",
      "url": "http://localhost:8005/mcp",
      "headers": {
        "X-AD-User": "<your-ad-username>",
        "X-AD-Password": "<your-ad-password>"
      }
    }
  }
}

Claude Code

claude mcp add --transport http win-mcp http://localhost:8005/mcp \
  --header "X-AD-User: <your-ad-username>" \
  --header "X-AD-Password: <your-ad-password>"

Codex (~/.codex/config.toml)

[mcp_servers.win-mcp]
url = "http://localhost:8005/mcp"
http_headers = { "X-AD-User" = "<your-ad-username>", "X-AD-Password" = "<your-ad-password>" }

Any other MCP client works the same way: point it at the streamable HTTP endpoint and pass the headers.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选