Synapse RMCP

ai.dinglebear由 dinglebear.ai 发布v0.5.4更新于 Oct 24, 2026

Rust MCP and CLI server for Docker, host inspection, SSH, logs, ZFS, and safe file operations.

发布方自己的服务:RMCP

概览

AI 生成的概览

本地 MCP 服务器,为助手提供两个工具,用于检查和管理 Docker、Compose、主机、SSH、ZFS、日志与文件。

可以做什么
通过 flux 工具检查和管理 Docker 守护进程、镜像、网络、卷与容器,包括启动、停止、重启、重建和执行命令。列出、启动、停止、重启、重建 Docker Compose 项目并读取其日志。检查主机状态、操作系统、运行时间、资源、服务、网络、挂载、端口并运行诊断。通过 scout 工具检查 SSH 与本地主机:列出节点、读取文件与目录、查找文件、列出进程、比较文件、执行白名单命令、多主机执行与文件传输。读取 ZFS 池、数据集与快照,并获取 syslog、journal、dmesg 与认证日志。
适用场景
适合家庭实验室或服务器运维人员,让助手查看 Docker 与 Compose 状态、检查主机健康、读取日志和 ZFS 信息,或通过 SSH 执行少量只读命令;写操作受确认机制约束。
运行要求
以 stdio 在本地运行,通常通过 npx 从 npm 包启动。flux 操作需要 Docker CLI 与 Compose,以及可访问的 Docker socket 或经 SSH 转发的 socket;远程主机需要 SSH 访问和 known_hosts 条目。主机拓扑通过 SYNAPSE_HOSTS_CONFIG 或 SYNAPSE_CONFIG_FILE 提供,另有可选的 SYNAPSE_HOME、RUST_LOG 和发布下载覆盖变量。
安装前请注意
写操作具有破坏性:容器停止、重建与执行命令,Compose down 与重启,镜像删除与清理,白名单命令执行,多主机 emit 与文件传输。破坏性操作需要明确的主机目标和确认策略,SYNAPSE_MCP_ALLOW_DESTRUCTIVE 可在回环环境跳过提示。HTTP 模式使用 SYNAPSE_MCP_TOKEN bearer 认证或 OAuth,未加固前应仅限回环。SSH 信任依赖 OpenSSH known_hosts,Rust 版本缺少原版的 root 登录门禁。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Synapse RMCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

synapse-rmcp

Host, Docker, Compose, SSH, logs, ZFS, and file operations over MCP and CLI.

Synapse is a full-parity Rust port of synapse-mcp, built with the rmcp framework.

The server exposes two MCP tools (flux and scout) plus equivalent CLI commands, covering all 59 production actions from the original TypeScript server.

Contents

Naming

The repository is synapse-rmcp, the Rust crate is synapse, the MCP server identity is synapse, and the installed binary is synapse. The npm launcher package is synapse-rmcp.

Across most of the RMCP family, naming follows repo=<service>-rmcp, npm=<service>-rmcp, and CLI=r<service>. Synapse is an exception because it is a Rust port of the older TypeScript synapse-mcp project and keeps the operator-facing synapse binary.

Capabilities And Boundaries

Synapse provides local Docker, Compose, host, SSH, log, ZFS, and file-operation workflows through two MCP tools and the equivalent CLI:

  • flux manages Docker infrastructure, containers, Compose projects, and host inspection.
  • scout handles SSH/local host inspection, safe file reads, allowlisted command execution, bounded descriptor-confined file transfer, ZFS introspection, and log retrieval.
  • REST exists only as a compatibility shim for a subset of actions.
  • The web surface is a lightweight static admin shell, not a full dashboard.

Not for: arbitrary shell access, unaudited remote mutation, or bypassing host SSH trust. Destructive Docker/Compose/exec/file-transfer actions require explicit host targets and confirmation policy.

MCP callers never provide credentials, tokens, keys, or secrets as action arguments. Tokens, OAuth settings, host topology, SSH trust, and allowlists live in server-side configuration or the local SSH environment.

Install

Use the npm launcher for stdio MCP or CLI access without a manual binary install:

bash
npx -y @dinglebear/synapse --helpnpx -y @dinglebear/synapse mcp

For a permanent command:

bash
npm i -g @dinglebear/synapsesynapse --version

The npm package downloads the synapse binary from GitHub Releases during postinstall, keeping the release tag aligned with packages/synapse-rmcp/package.json.

From source:

bash
cargo build --release

The production image includes Python 3 plus the official Docker CLI/Compose plugin because Scout's remote descriptor wrappers and Flux Compose operations invoke those runtime tools. The image does not contain a Docker daemon; Flux uses the mounted socket or SSH-forwarded remote socket. Persistent appdata lives at ~/.synapse on the host and /data in the container.

Quickstart

The first-screen 30-second path is:

bash
npx -y @dinglebear/synapse mcp

Then configure an MCP client with stdio:

json
{  "mcpServers": {    "synapse": {      "command": "npx",      "args": ["-y", "synapse-rmcp", "mcp"]    }  }}

Start with a read-only call:

json
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "scout",    "arguments": {      "action": "nodes"    }  }}

Client Configuration

stdio is preferred for local MCP clients:

json
{  "mcpServers": {    "synapse": {      "command": "synapse",      "args": ["mcp"]    }  }}

Streamable HTTP uses /mcp on the configured host and port:

json
{  "mcpServers": {    "synapse": {      "url": "http://127.0.0.1:40080/mcp",      "headers": {        "Authorization": "Bearer ${SYNAPSE_MCP_TOKEN}"      }    }  }}

Plugin Packages

plugins/synapse/ ships Claude Code, Codex, and Gemini CLI manifests that all point at the same HTTP MCP endpoint and the same shared skill.

These packages contain no lifecycle hooks. Connecting to a server that is already running needs no setup — the manifests substitute your server_url and api_token directly. If this machine also runs the server, bootstrap it once by hand:

bash
synapse setup install                  # put/refresh the binary on PATHsynapse setup plugin-hook              # check, then repair on blocking failuressynapse setup plugin-hook --no-repair  # audit only; never mutates appdata

Export the relevant SYNAPSE_* variables (or write them to ~/.synapse/.env) first; plugins/README.md maps each plugin option to its variable. Re-run synapse setup install after a plugin update.

Runtime Surfaces

SurfaceStatusPurpose
MCPRequiredAgent-facing flux and scout tools
CLIRequiredScriptable parity surface for operators
RESTCompatibilityThin local action endpoint for 14 of 59 actions
WebPresentLightweight static admin shell

MCP Tool Reference

Synapse exposes two MCP tools:

  • flux: Docker daemon, container, host, and Compose operations.
  • scout: SSH/local host inspection, filesystem reads, allowlisted exec, multi-host emit, file beam, ZFS, and logs.

Both tools use an action-dispatched JSON shape:

json
{"name":"flux","arguments":{"action":"docker","subaction":"info"}}{"name":"scout","arguments":{"action":"nodes"}}

The detailed action tables below are curated README reference material. The generated runtime MCP schema and the Rust action definitions are the source of truth for the live tool contract.

CLI Reference

Common commands:

bash
synapse flux docker infosynapse flux container listsynapse flux compose list --host myhostsynapse scout nodessynapse scout exec --host myhost --command hostnamesynapse scout zfs pools --host myhostsynapse scout logs journal --host myhost --unit docker

Authentication

Mounted HTTP supports bearer and Google OAuth modes. Loopback stdio/local dev can run without mounted HTTP auth. Important variables:

bash
SYNAPSE_MCP_HOST=127.0.0.1SYNAPSE_MCP_PORT=40080SYNAPSE_MCP_TOKEN=change-meSYNAPSE_MCP_AUTH_MODE=bearer

See Configuration and docs/CONFIG.md for the full auth matrix.

Safety And Trust Model

Synapse separates read and write scopes (synapse:read, synapse:write) and uses confirmation gates for destructive operations. SYNAPSE_MCP_ALLOW_DESTRUCTIVE can skip prompts only in loopback-safe contexts. Host protocol is authoritative and defaults to SSH when omitted; local execution requires the explicit built-in local host or protocol: "local". SSH host trust is delegated to OpenSSH known-hosts behavior, and command execution uses execvp/argv semantics without shell interpolation. scout beam enforces both endpoints' configured read roots, blocks sensitive and symlinked paths, and caps each transfer at 64 MiB.

scout exec and scout emit accept only these 18 typed commands (ALLOWED_READ_COMMANDS in src/synapse/command_policy.rs):

cat, head, tail, grep, rg, ls, tree, wc, uniq, diff, stat, file, du, df, pwd, hostname, uptime, whoami

git is deliberately excluded, as are shells, interpreters, network clients, and mutating tools (EXEC_DENYLIST). There is no find or sort in the allowlist — use the dedicated scout find action for filesystem search. Per-host custom commands may be enabled via execAllowlist, but receive a zero-argument policy until a typed argument policy is registered.

Distribution Contract

The source of truth for release identity is the version shared by Cargo.toml, .release-please-manifest.json, packages/synapse-rmcp/package.json, release artifacts, and server.json.

Distribution/version invariants:

  • The npm package downloads the matching GitHub Release binary.
  • The installed binary remains synapse.
  • server.json must point at ghcr.io/dinglebear-ai/synapse:<version>.
  • Plugin manifests stay versionless where marketplaces derive identity from git state.
  • Generated docs and schemas must come from source-controlled generation inputs; curated README/docs should point at source-of-truth files for details.

Verification

bash
just validate-plugin          # plugin manifests, MCP config, monitors, skillsnpm --prefix packages/synapse-rmcp run checkcargo fmt --checkcargo checkcargo testgit diff --check

Deployment

For a persistent mounted HTTP server:

bash
SYNAPSE_MCP_HOST=0.0.0.0 \SYNAPSE_MCP_PORT=40080 \SYNAPSE_MCP_TOKEN=change-me \synapse serve

Use bearer or OAuth before exposing the endpoint beyond loopback. Production Docker/Compose notes live in docs/DEPLOYMENT.md and docs/DOCKER.md when present; local operator usage can stay on stdio.

Troubleshooting

  • 401 or 403 from /mcp: check bearer/OAuth settings and gateway headers.
  • no hosts appear: check SYNAPSE_HOSTS_CONFIG, SYNAPSE_CONFIG_FILE, and ~/.ssh/config.
  • destructive actions are refused: confirm the host target and confirmation policy.
  • SSH errors: verify OpenSSH known_hosts, mux/socket availability, and host reachability outside Synapse first.

Tools and Actions

flux — Docker infrastructure management

flux docker — Docker daemon operations (9 actions)
SubactionScopeDescription
infosynapse:readDocker daemon information
dfsynapse:readDocker disk usage
imagessynapse:readList Docker images; dangling_only to filter untagged
networkssynapse:readList Docker networks
volumessynapse:readList Docker volumes
pullsynapse:writePull a Docker image; requires host, image
buildsynapse:writeBuild a Docker image; requires host, context, tag; optional dockerfile, no_cache
rmisynapse:writeRemove a Docker image; requires host, image, force=true
prunesynapse:writeRemove unused resources; requires host, prune_target, force=true
flux container — Container lifecycle + inspection (14 actions)
SubactionScopeDescription
listsynapse:readList containers; optional state, name_filter, image_filter, label_filter
inspectsynapse:readDetailed container info; requires container_id; optional summary
logssynapse:readContainer logs; requires container_id; optional lines, since, until, grep, stream
statssynapse:readResource usage stats; optional container_id
topsynapse:readShow running processes; requires container_id
searchsynapse:readFull-text search by name/image/labels; requires query
startsynapse:writeStart a stopped container; requires host, container_id
stopsynapse:writeStop a running container (destructive); requires host, container_id
restartsynapse:writeRestart a container; requires host, container_id
pausesynapse:writePause a running container; requires host, container_id
resumesynapse:writeResume a paused container; requires host, container_id
pullsynapse:writePull latest image for a container; requires host, container_id
recreatesynapse:writeRecreate container with image pull (destructive); requires host, container_id; optional pull (default true)
execsynapse:writeExecute command inside container (destructive, execvp); requires host, container_id, command array
flux host — Host inspection (9 actions)
SubactionScopeDescription
statussynapse:readCheck Docker connectivity on a host
infosynapse:readOS, kernel, architecture
uptimesynapse:readSystem uptime
resourcessynapse:readCPU, memory, disk usage
servicessynapse:readSystemd service status; requires host; optional state, service
networksynapse:readNetwork interfaces
mountssynapse:readMounted filesystems; requires host
portssynapse:readPort mappings; requires host; optional protocol, limit, offset
doctorsynapse:readDiagnostic checks; requires host; optional checks (comma-separated)
flux compose — Docker Compose project management (10 actions)
SubactionScopeDescription
listsynapse:readList all Docker Compose projects; requires host
statussynapse:readGet project service status; requires host, project; optional service
upsynapse:writeStart a compose project; requires host, project
downsynapse:writeStop a compose project (destructive); requires host, project; optional remove_volumes, force
restartsynapse:writeRestart a compose project (destructive); requires host, project
recreatesynapse:writeRecreate compose containers (destructive); requires host, project
logssynapse:readGet project logs; requires host, project; optional service, lines, since
buildsynapse:writeBuild compose project images; requires host, project; optional service
pullsynapse:writePull compose project images; requires host, project; optional service
refreshsynapse:readRefresh compose project cache; requires host
flux help — Auto-generated flux docs
ActionScopeDescription
helppublicReturn flux action reference; optional topic (e.g. "container:list"), format (markdown|json)

scout — SSH/local host inspection

Scout simple actions (9 actions)
ActionScopeDescription
nodessynapse:readList all configured SSH hosts
peeksynapse:readRead a file or directory listing; requires host, path; optional tree, depth
findsynapse:readFind files by glob; requires host, path, pattern; optional depth, limit
pssynapse:readList processes; requires host; optional sort (cpu|mem|pid|time), grep, user, limit
dfsynapse:readDisk usage; requires host; optional path
deltasynapse:readCompare files or content; requires source_host, source_path; then either target_host+target_path or content
execsynapse:writeExecute allowlisted command (destructive, execvp); requires host, command; optional path, args, timeout_secs
emitsynapse:writeMulti-host execution (destructive); requires targets array, command; optional args, timeout_secs
beamsynapse:writeBounded root-confined file transfer (destructive); requires source_host, source_path, dest_host, dest_path; both paths must be under configured Scout/Compose roots
scout zfs — ZFS introspection (3 subactions)
SubactionScopeDescription
poolssynapse:readList ZFS pools; requires host; optional pool name filter
datasetssynapse:readList ZFS datasets; requires host; optional pool, dataset_type, recursive
snapshotssynapse:readList ZFS snapshots; requires host; optional pool, dataset, limit
scout logs — Log retrieval (4 subactions)
SubactionScopeDescription
syslogsynapse:readRead /var/log/syslog (falls back to /var/log/messages); requires host; optional lines, grep
journalsynapse:readRead systemd journal; requires host; optional lines, unit, priority, since, until, grep
dmesgsynapse:readRead kernel ring buffer; requires host; optional lines, grep
authsynapse:readRead /var/log/auth.log (falls back to /var/log/secure); requires host; optional lines, grep
scout help — Auto-generated scout docs
ActionScopeDescription
helppublicReturn scout action reference; optional topic (e.g. "zfs:pools"), format (markdown|json)

Known Parity Gaps

synapse achieves action-level parity with synapse-mcp — all 59 production actions from synapse-mcp/docs/INVENTORY.md are implemented. However, the following features from the original TypeScript server are not yet ported:

Not ported

FeatureDescription
claude/channel notificationsOriginal forwards Docker events and log tails as notifications/claude/channel MCP notifications. No equivalent exists in Rust.
Templated MCP resourcesOriginal exposes synapse://hosts/{host}, synapse://hosts/{host}/stacks, synapse://stacks, synapse://stacks/{host}/{stack}, synapse://stacks/{host}/{stack}/env, synapse://containers/{host}, synapse://containers/{host}/{id}. Rust exposes tool-specific schema and help resources plus read-scoped synapse://hosts, synapse://compose/projects, synapse://status, and synapse://activity.
Root SSH login gateOriginal gates sshUser=root through elicitation unless SYNAPSE_ALLOW_ROOT_LOGIN=true. Rust has destructive-operation elicitation but no root-login gate.
TOFU fingerprint storeOriginal persists fingerprints to ~/.config/synapse/known_hosts.json and rejects changed fingerprints. Rust uses strict OpenSSH known_hosts with wildcard warnings — different operator behavior.
SYNAPSE_EXCLUDE_HOSTSOriginal env var to exclude hosts from fleet discovery is absent in Rust.
SYNAPSE_MCP_ALLOW_YOLOOriginal "skip all confirmation gates" mode. Rust has SYNAPSE_MCP_ALLOW_DESTRUCTIVE (per-restart override, loopback-only), which is not identical.
SYNAPSE_DEBUG_ERRORSOriginal opt-in mode that returns full internal error detail. Rust always sanitizes internal tool errors.
git in exec allowlistOriginal includes git in ALLOWED_READ_COMMANDS with flag guards. Rust deliberately excludes git.

Configuration

bash
SYNAPSE_MCP_HOST=127.0.0.1SYNAPSE_MCP_PORT=40080SYNAPSE_MCP_TOKEN=change-me

Key environment variables:

VariableDefaultDescription
SYNAPSE_MCP_HOST127.0.0.1Bind host for HTTP transport.
SYNAPSE_MCP_PORT40080Bind port for HTTP transport.
SYNAPSE_MCP_TOKENunsetStatic bearer token for auth.
SYNAPSE_MCP_NO_AUTHfalseDisable auth for loopback development only.
SYNAPSE_NOAUTHfalseDelegate auth/authz to an isolated trusted upstream gateway.
SYNAPSE_MCP_ALLOW_DESTRUCTIVEfalseSkip destructive-operation confirmation prompts (loopback only).
SYNAPSE_MCP_MAX_CONCURRENCY50Maximum simultaneous in-flight operational requests. Excess requests receive HTTP 429 with Retry-After. Set to 0 to disable. Public probes, OAuth discovery, and static assets are exempt from concurrency shedding.
SYNAPSE_MCP_PUBLIC_URLunsetOAuth public URL; HTTPS required except loopback development.
SYNAPSE_HOSTS_CONFIGunsetInline host topology. Omitted host protocols default to SSH; local execution requires protocol: "local".

See .env.example for the full list of variables, docs/CONFIG.md for configuration details, and docs/SECURITY.md for transport, path, transfer, container, and CI runner trust boundaries.

Run

bash
# Start MCP server (stdio transport)cargo run -- mcp
# Start HTTP servercargo run -- serve
# CLI examplescargo run -- flux docker infocargo run -- flux container listcargo run -- flux compose list --host myhostcargo run -- scout nodescargo run -- scout exec --host myhost --command hostnamecargo run -- scout zfs pools --host myhostcargo run -- scout logs journal --host myhost --unit docker

MCP examples:

json
{"name":"flux","arguments":{"action":"docker","subaction":"info"}}{"name":"flux","arguments":{"action":"container","subaction":"list","state":"running"}}{"name":"flux","arguments":{"action":"compose","subaction":"status","host":"myhost","project":"mystack"}}{"name":"scout","arguments":{"action":"nodes"}}{"name":"scout","arguments":{"action":"exec","host":"myhost","command":"hostname"}}{"name":"scout","arguments":{"action":"zfs","subaction":"pools","host":"myhost"}}{"name":"scout","arguments":{"action":"logs","subaction":"journal","host":"myhost","unit":"docker"}}

Architecture

text
FluxService   (src/flux_service/)  Docker/container/compose/host opsScoutService  (src/scout_service/) SSH/exec/fs/zfs/logs ops      ↓ via SynapseService facade (src/app.rs)MCP shims     (src/mcp/tools.rs)  tool args → service → ValueCLI shim      (src/cli.rs)        argv → service → stdoutREST layer    (src/api.rs)        POST /v1/synapse → service → JSON

Development

bash
cargo fmt --checkcargo testcargo clippy -- -D warningscargo build --release
just dev     # serve with no auth (loopback, dev mode)just test    # cargo testjust lint    # clippyjust fmt     # cargo fmt

Useful docs:

  • docs/API.md for full tool contracts
  • docs/CONFIG.md for environment and auth
  • docs/QUICKSTART.md for local smoke tests
  • plugins/synapse/skills/synapse/SKILL.md for agent usage guidance
  • tests/parity.rs for automated parity verification against synapse-mcp INVENTORY

Documentation

This README is curated for first-run orientation and high-level action discovery. Source-of-truth docs and code are split as follows:

  • docs/API.md for the curated action contract reference.
  • docs/MCP_SCHEMA.md for MCP schema shape and drift expectations.
  • docs/CONFIG.md for environment and auth policy.
  • docs/QUICKSTART.md for local smoke tests.
  • docs/PLUGINS.md and plugins/synapse/skills/synapse/SKILL.md for agent and marketplace usage.
  • docs/generated/openapi.json for generated OpenAPI output.
  • src/flux_service/, src/scout_service/, and src/mcp/ for runtime source of truth.

Related Servers

  • runifi - UniFi controller REST API bridge.
  • rtailscale - Tailscale API bridge for devices, users, and tailnet operations.
  • unraid / runraid - Unraid GraphQL bridge for NAS and server management.
  • rapprise - Apprise notification fan-out bridge for many delivery backends.
  • rgotify - Gotify push notification bridge for sends, messages, apps, and clients.
  • rarcane - Arcane Docker management bridge for containers and related resources.
  • yarr - Media-stack bridge for Sonarr, Radarr, Prowlarr, Plex, and related services.
  • rytdl - Media download and metadata workflow server.
  • cortex - Syslog and homelab log aggregation MCP server.
  • axon - RAG, crawl, scrape, extract, and semantic search project.
  • labby - Homelab control plane and Labby gateway project.
  • lumen - Local semantic code search MCP server.
  • nugs - Project/package management helper for local agent workflows.
  • agentcast - Agent transcript and activity publishing project.
  • soma - RMCP scaffold/runtime template for new provider-backed servers.

License

Original Dinglebear-authored portions of this project are licensed under AGPL-3.0-only. Separate commercial licensing is available for organizations that need terms outside the AGPL. Third-party material remains under its original license. See LICENSING.md.

来源:README.md,提交 cf3bdde

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.5.4最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Rmcp 集成