@usex/mikrotik-mcp 5.18.0 → 5.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -445,11 +445,11 @@ recall, API and dashboard regression tests.
445
445
  **Shared memory.** The **Memory → Shared memory** tab assigns an explicit scope to a knowledge
446
446
  entity, with a preview of who inherits its existing and future memories:
447
447
 
448
- | Scope | Intended knowledge | Included when recalling a device |
449
- | --- | --- | --- |
450
- | Device (default) | Its IPs, routes, MTUs, firmware and measured outcomes | Only for that exact entity |
451
- | Group | Policies for an explicit set of device entities | Only for listed members; no nested groups |
452
- | Shared | Fleet-wide safeguards, preferences and reusable lessons | Automatically for every selected device |
448
+ | Scope | Intended knowledge | Included when recalling a device |
449
+ | ---------------- | ------------------------------------------------------- | ----------------------------------------- |
450
+ | Device (default) | Its IPs, routes, MTUs, firmware and measured outcomes | Only for that exact entity |
451
+ | Group | Policies for an explicit set of device entities | Only for listed members; no nested groups |
452
+ | Shared | Fleet-wide safeguards, preferences and reusable lessons | Automatically for every selected device |
453
453
 
454
454
  Create a **dedicated policy entity**, not a copy of a router's observations. For example, after
455
455
  creating `fleet-policy` with `memory_create_entities`, read `memory_get_scope` and pass its
@@ -654,6 +654,50 @@ HTTP transports expose `POST /mcp` and `GET /health` with DNS-rebinding protecti
654
654
 
655
655
  ## Configuration
656
656
 
657
+ ### Update MCP settings through tools
658
+
659
+ The **MCP Settings** module (`mcp-settings`) manages host-side settings without
660
+ contacting a router, even when the dashboard is disabled:
661
+
662
+ | Tool | Purpose |
663
+ | ------------------------- | ---------------------------------------------------------------------- |
664
+ | `get_mcp_settings` | Read editable settings, revision, config path and pending change |
665
+ | `get_mcp_settings_schema` | Discover allowed fields and validation limits |
666
+ | `preview_mcp_settings` | Validate a partial patch and inspect its diff and restart requirements |
667
+ | `update_mcp_settings` | Back up and atomically save an approved patch, with timed rollback |
668
+ | `confirm_mcp_settings` | Keep the pending tool-created change after readback |
669
+ | `rollback_mcp_settings` | Restore its local backup before confirmation |
670
+
671
+ Editable fields cover MCP tool pagination, App views and capability gating;
672
+ SSH pooling; dashboard retention/body capture/redaction; Memory enablement; and
673
+ startup update checks. Partial patches preserve omitted settings. For example,
674
+ preview `{"changes":{"ssh":{"keepAlive":true,"idleTimeout":60000}}}`,
675
+ then apply the same changes with the returned `revision` and `confirm:true` only
676
+ after user approval. Read back and confirm using the **new** revision and
677
+ `pending_id` (the update result's `pendingId`, also `pending.id` in readback).
678
+
679
+ Writes are unavailable in read-only mode. Devices, credentials, listener addresses,
680
+ file paths, access ceilings, tool restrictions and probe allowlists remain
681
+ operator-managed. These tools cannot disable redaction; enabling body capture
682
+ requires redaction. They return no credential values. Config files and backups
683
+ are written with owner-only permissions (`0600` on POSIX).
684
+
685
+ Dashboard and tool edits in the same process share one pending transaction; stale revisions and
686
+ conflicting edits are rejected. Unconfirmed tool updates roll back after **60s**
687
+ by default (configurable from 30–600s) **while the process remains alive**.
688
+ Never restart with a pending update: confirm first, then restart separately if
689
+ the preview requires it. MCP presentation, dashboard recorder and update-check
690
+ changes need a restart for full activation. Memory enablement is checked on the
691
+ next operation; SSH settings affect subsequent calls/new connections and new idle
692
+ timers without forcibly disconnecting existing sessions.
693
+
694
+ The saved config path is returned by the tools. If the server was started from
695
+ environment variables alone, use `--config <path>` on future starts; CLI/env
696
+ overrides can still take precedence. A configured value is not evidence of a
697
+ restart or of router connectivity.
698
+
699
+ ### Environment and CLI
700
+
657
701
  Settings come from `MIKROTIK_*` env vars or matching CLI flags (defaults → env → flags):
658
702
 
659
703
  | Variable | Flag | Default | Purpose |