codex-serverops-mcp
A Windows-first MCP server that maintains persistent stateful SSH sessions to Linux servers, enabling Codex to run commands, manage files, and use sudo without exposing credentials.
README
Codex ServerOps MCP
<!-- mcp-name: io.github.cyyprezz/codex-serverops-mcp -->
Windows-first local MCP server for operating explicitly configured Linux servers from Codex through the Windows OpenSSH client. It keeps stateful Bash sessions alive, exposes structured file operations and supports guided sudo without sending passwords or key passphrases through MCP parameters.
Why this exists
Codex can already run commands such as:
ssh my-server "docker compose ps"
But this is not the same as working inside a persistent remote environment.
Without a dedicated integration, Codex must repeatedly rebuild connection context, quote remote
commands correctly and reconstruct shell state for every operation. Working with password
authentication, long-running processes, interactive commands, changing directories, activated
virtual environments and sudo is especially awkward.
ServerOps MCP was built to solve that gap.
It provides Codex with persistent, broker-owned SSH sessions that keep their Bash state across multiple MCP calls. Codex can enter a project directory, activate a virtual environment, run commands, inspect output and continue working in the same remote shell.
Persistence does not make the shell indestructible. If a command exits or replaces the original Bash, or leaves it impossible to verify, ServerOps loses the session in a controlled way and never retries an uncertain command automatically.
Sensitive interaction remains local. SSH passwords, private-key passphrases, host-key decisions and interactive sudo authentication are handled in separate visible windows and are never sent through MCP tool arguments.
The goal is not to replace SSH or create a remote security sandbox. The goal is to turn an existing SSH-accessible Linux server into a practical, stateful workspace for Codex while continuing to use OpenSSH, Linux permissions and the operator's existing server configuration.
In practice, this enables workflows such as:
- diagnosing services and containers over several related commands;
- keeping the current directory and shell environment between operations;
- controlling long-running or interactive terminal processes;
- using password, key and guided sudo authentication without exposing credentials to Codex;
- reading and safely patching configured remote project files; and
- rediscovering broker-owned sessions after the disposable MCP process restarts, without rebuilding SSH or retrying a command.
Release status: version
0.1.0is the first public release. Its automated, packaging and contained integration gates are release-blocking. Real-network and visible credential checks remain documented operator evidence because public CI cannot reproduce a real SSH/sudo server. Start with disposable or non-production accounts while evaluating this initial release.
What it provides
- direct SSH targets and existing OpenSSH aliases;
- a guided local profile assistant with password, existing-key and new-key workflows;
- stateful SSH sessions that preserve working directory and shell environment while the original Bash remains healthy and controllable;
- completed commands plus interactive terminal control;
- structured UTF-8 reads and hash-protected normal-user file edits below configured roots;
- explicit sudo acquisition, reuse and release plus optional separate root sessions;
- local redacted JSONL audit events; and
- a checkout-free
uvxinstaller for published releases.
The Linux server needs no ServerOps agent or daemon.
Requirements
- Windows 10 or Windows 11;
- Python 3.12 for the current release line;
- Windows OpenSSH Client;
uv/uvx; and- an SSH-accessible Linux account with Bash. Structured file tools additionally need the common utilities listed in Structured remote files.
Use a dedicated non-root SSH account and narrow server-side sudoers rules. ServerOps permissions guide which MCP tools are offered; they do not replace Linux permissions, backups or a remote sandbox.
Getting started
The package is not published as 0.1.0 yet. Choose the matching path in
Windows installation and Doctor:
- use the exact PyPI pin after a public release; or
- use the explicitly marked local-wheel flow when evaluating a development checkout.
After restarting Codex, follow Getting started to create the first profile, open a session and verify the connection without putting a credential into chat.
Documentation
- Getting started
- Installation, update, Doctor and uninstall
- Profile configuration
- MCP tool reference
- Setup assistant and key transition
- Visible authentication
- Structured remote files
- Guided sudo and root sessions
- Security model and audit
- Troubleshooting
- Architecture
- Release evidence and final-candidate procedure
Development
uv sync --locked --all-groups --python 3.12
$env:PYTHONPATH = "src"
.\.venv\Scripts\python.exe -m unittest discover -s tests -v
.\.venv\Scripts\ruff.exe check .
No credentials, private keys, host-specific configuration or generated runtime material belong in the repository. See SECURITY.md before reporting a vulnerability.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。