From 0d446003ddbb376e7fdc69c668bfec3a41dbc628 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Wed, 3 Jun 2026 14:40:49 -0400 Subject: [PATCH] Add Deco config diagnostics --- README.md | 1 + src/integrations/deco.js | 11 +++++++++++ src/server.js | 9 ++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe34823..e3f2b55 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ and stays on the local machine. | `contacts_search` | Search contact names and organizations without disclosing contact methods | | `contacts_read` | Read phone and email details for one selected contact | | `contacts_create` | Create a contact with optional email and phone details | +| `deco_get_config_status` | Show Deco connection config without revealing the password | | `deco_get_overview` | Read TP-Link Deco overview stats and firmware | | `deco_list_clients` | List online Deco clients and current traffic speeds | | `deco_get_ipv4_status` | Read WAN/LAN IPv4 status | diff --git a/src/integrations/deco.js b/src/integrations/deco.js index aaab10b..4871908 100644 --- a/src/integrations/deco.js +++ b/src/integrations/deco.js @@ -28,3 +28,14 @@ export async function getDecoStats(action) { throw new Error(`Deco stats request failed. ${detail}`); } } + +export function getDecoConfigStatus() { + return { + host: process.env.DECO_HOST || "(default gateway)", + username: process.env.DECO_USERNAME || "admin", + passwordConfigured: Boolean(process.env.DECO_PASSWORD), + passwordLength: process.env.DECO_PASSWORD?.length || 0, + verifySsl: process.env.DECO_VERIFY_SSL ?? "true", + timeout: process.env.DECO_TIMEOUT || "10", + }; +} diff --git a/src/server.js b/src/server.js index ae999d8..9aa9ae4 100644 --- a/src/server.js +++ b/src/server.js @@ -11,7 +11,7 @@ import { readContact, searchContacts, } from "./integrations/contacts.js"; -import { getDecoStats } from "./integrations/deco.js"; +import { getDecoConfigStatus, getDecoStats } from "./integrations/deco.js"; import { createNote, listNotes, readNote } from "./integrations/notes.js"; import { createReminder, @@ -191,6 +191,13 @@ export function createMacMiniMcpServer() { }), ); + server.tool( + "deco_get_config_status", + "Show TP-Link Deco connection configuration without revealing the password.", + {}, + handled(getDecoConfigStatus), + ); + server.tool( "deco_get_overview", "Read TP-Link Deco overview stats: WAN/LAN addresses, CPU/memory usage, client counts, Wi-Fi enablement, and firmware.",