Add Deco config diagnostics
This commit is contained in:
@@ -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 |
|
||||
|
||||
@@ -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",
|
||||
};
|
||||
}
|
||||
|
||||
+8
-1
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user