AI Ops MCP

AI Ops MCP

Local SSH credential broker and stdio MCP server that enables AI clients to perform SSH and SFTP operations via stable server_id aliases without exposing passwords, private keys, or passphrases.

Category
访问服务器

README

AI Ops MCP

English | 简体中文

AI Ops MCP is a local SSH credential broker and stdio MCP server. It lets AI clients perform SSH and SFTP operations through stable server_id aliases without receiving passwords, private-key contents, or private-key passphrases.

[!WARNING] AI Ops MCP protects the authentication boundary; it does not classify, approve, or block remote commands. Every command runs with the configured SSH account's permissions. Use dedicated, least-privilege accounts and server-side controls.

Version 0.1.0 is distributed from source only. This project is not published to npm.

Features

  • Interactive server enrollment and trusted Host key pinning
  • SSH Agent, system credential store password, and private-key authentication
  • Windows Credential Manager, macOS Keychain, and Linux Secret Service integration
  • Connection pooling with per-server and global concurrency limits
  • Remote commands, uploads, downloads, and directory listings
  • Local and remote file path boundaries, timeouts, output limits, and file-size limits
  • Structured audit logs with stable public error codes

Security Model

Passwords and private-key passphrases are requested through hidden prompts and stored in the operating system credential store. Non-secret connection metadata is stored in a private local configuration file. Private keys remain files on the local machine and are read only when connecting. Host key fingerprints are confirmed during enrollment and later changes are rejected.

The MCP interface cannot enumerate or export credentials. By default, local file operations are limited to the MCP process working directory; additional local and remote roots can be configured per server. Audit logs may contain commands and paths, so protect them as operational data. See SECURITY.md for vulnerability reporting.

This model does not protect against a compromised local user account, malicious remote output, a compromised remote host, or destructive commands issued with valid SSH permissions.

Requirements

  • Node.js 22 or 24
  • Git and an accessible SSH server
  • A verified SSH Host key fingerprint
  • One supported authentication method
  • Linux password/passphrase users: a running Secret Service provider

Windows Credential Manager has been validated on Windows 10 with Node.js 24. macOS Keychain and Linux Secret Service need broader real-device feedback.

Install and Build

git clone https://github.com/Finn-Aigc/ai-ops-mcp.git
cd ai-ops-mcp
npm ci
npm run typecheck
npm test
npm run build
npm link
ai-ops doctor

npm link exposes ai-ops and ai-ops-mcp locally. Run npm run dev -- --help during CLI development, or npm start -- --help after building.

Authentication

SSH Agent

Load a key into your system Agent, then either run ai-ops add --auth agent or import effective OpenSSH metadata:

ai-ops import-ssh my-host-alias

System Credential Store Password

ai-ops add --id dev-box --host ssh.example.com --user deploy --auth password

The password is requested interactively and cannot be passed as a command-line value.

Private Key File

ai-ops add --id dev-key --host ssh.example.com --user deploy \
  --auth private-key --key <path-to-private-key>

The key stays at the provided path. If encrypted, its passphrase is requested interactively and stored in the system credential store.

CLI Reference

Command Purpose
ai-ops add Add a server and confirm its Host key
ai-ops import-ssh <alias> Import effective OpenSSH metadata for Agent auth
ai-ops list [--json] List aliases and credential readiness
ai-ops show <id> Show non-secret server metadata
ai-ops test <id> Test a connection
ai-ops edit <id> Update metadata, roots, or stored secrets
ai-ops remove <id> Remove metadata and stored credentials
ai-ops trust-host <id> Replace a verified Host key fingerprint
ai-ops doctor [--json] Diagnose configuration, keyring, and Agent access
ai-ops logs Read filtered audit events

Use ai-ops <command> --help for all options. Never automate password or passphrase entry through command arguments.

MCP Client Configuration

After npm link, configure any stdio MCP client with:

{
  "mcpServers": {
    "ai-ops": {
      "command": "ai-ops-mcp"
    }
  }
}

For development without linking, build first and use node with "<absolute-path-to-repository>/dist/mcp-entry.js" as the only argument.

MCP Tools

Tool Purpose
list_servers List configured aliases and readiness without credentials
test_connection Test one server_id
execute_command Run an arbitrary remote command
upload_file Upload a file from an allowed local root
download_file Download a file into an allowed local root
list_dir List an allowed remote directory

Defaults are 30 seconds per command, 10 MiB combined command output, 100 MiB per file, four concurrent operations per server, and 16 globally. Server settings can reduce or tailor these limits.

Troubleshooting

  • Run ai-ops doctor first for keyring, Agent, configuration, and server diagnostics.
  • HOST_KEY_MISMATCH: verify the new fingerprint out of band, then run ai-ops trust-host <id>.
  • AGENT_UNAVAILABLE: start an SSH Agent and load a key with ssh-add.
  • CREDENTIAL_STORE_UNAVAILABLE: unlock or start the platform credential service.
  • LOCAL_PATH_NOT_ALLOWED or REMOTE_PATH_NOT_ALLOWED: update roots with ai-ops edit <id> --allowed-local ... --allowed-remote ....
  • MCP process exits immediately: run npm run build and confirm the configured executable or absolute entry path.

Local Live E2E Tests

Live tests intentionally stay out of GitHub Actions. Use an isolated home and a dedicated, low-privilege server account that may create temporary files under /tmp and update its own ~/.ssh/authorized_keys:

$env:AI_OPS_HOME = "<isolated-ai-ops-home>"
$env:AI_OPS_E2E_SERVER_ID = "test-server"
npm run build
npm run test:e2e:core
npm run test:e2e:mcp
npm run test:e2e:auth
npm run test:e2e:agent
npm run test:e2e:cleanup

Each test uses unique resources and cleans them in finally blocks. Never use production credentials or configuration. See CONTRIBUTING.md, docs/PRD.md, and docs/IMPLEMENTATION_PLAN.md.

License

MIT © 2026 AI Ops MCP contributors.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选