refactor: consolidate MCP service scripts

Replace per-command shell wrappers with a single scripts/mcp_service.sh entrypoint that forwards subcommands to manage_mcp_service.py.

Update docs and tests so remote MCP service management stays on the consolidated command surface.
This commit is contained in:
Codex
2026-07-05 11:38:49 +00:00
parent 31b0e8dba2
commit baa8c0beae
9 changed files with 28 additions and 31 deletions
+7 -7
View File
@@ -364,19 +364,19 @@ Client configuration example:
For long-running access from another machine, use the managed user service:
```bash
bash scripts/new_mcp_service_token.sh
bash scripts/start_mcp_service.sh
bash scripts/mcp_service.sh new-token
bash scripts/mcp_service.sh start
```
`new_mcp_service_token.sh` writes `.runtime/obsidian-wiki-mcp.env` with `0600` permissions and prints the remote URL, `Authorization` header, and client JSON. `start_mcp_service.sh` writes `~/.config/systemd/user/obsidian-wiki-mcp.service` and starts it. The service defaults to `0.0.0.0:8765/mcp` because it is intended for remote clients, but it still requires the bearer token. Prefer SSH tunnel, Tailscale, WireGuard, or another trusted network boundary instead of directly exposing the port to the public internet.
`mcp_service.sh new-token` writes `.runtime/obsidian-wiki-mcp.env` with `0600` permissions and prints the remote URL, `Authorization` header, and client JSON. `mcp_service.sh start` writes `~/.config/systemd/user/obsidian-wiki-mcp.service` and starts it. The service defaults to `0.0.0.0:8765/mcp` because it is intended for remote clients, but it still requires the bearer token. Prefer SSH tunnel, Tailscale, WireGuard, or another trusted network boundary instead of directly exposing the port to the public internet.
Useful service commands:
```bash
bash scripts/show_mcp_service_config.sh
bash scripts/stop_mcp_service.sh
bash scripts/uninstall_mcp_service.sh
python3 scripts/manage_mcp_service.py status
bash scripts/mcp_service.sh show-config
bash scripts/mcp_service.sh stop
bash scripts/mcp_service.sh uninstall
bash scripts/mcp_service.sh status
```
### `_raw/` Staging Directory