omada-mcp 1.2.2__py3-none-any.whl

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.
omada_mcp/__init__.py ADDED
@@ -0,0 +1,41 @@
1
+ """omada-mcp -- a zero-dependency MCP server for TP-Link Omada SDN controllers.
2
+
3
+ The package speaks the controller's internal **Web API v2** (the API the web UI
4
+ itself uses), so it works with a plain local account and needs no OAuth2 /
5
+ "Platform Integration" setup.
6
+
7
+ Public surface::
8
+
9
+ from omada_mcp import load_config, OmadaClient, Server
10
+
11
+ config = load_config() # OMADA_ENV_FILE -> ./.env -> ~/.config/omada-mcp/.env
12
+ server = Server(config) # JSON-RPC over stdio
13
+ server.serve()
14
+
15
+ CLI::
16
+
17
+ omada-mcp # run the MCP server on stdio
18
+ omada-mcp --doctor # self-test: env, TLS, login, version, site, tools
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ __version__ = "1.2.2"
24
+ __all__ = ["__version__", "Config", "ConfigError", "OmadaClient", "OmadaError",
25
+ "Server", "load_config"]
26
+
27
+
28
+ def __getattr__(name: str): # keep `import omada_mcp` cheap for --version
29
+ if name in ("Config", "ConfigError", "load_config"):
30
+ from . import config as _config
31
+
32
+ return getattr(_config, name)
33
+ if name in ("OmadaClient", "OmadaError"):
34
+ from . import client as _client
35
+
36
+ return getattr(_client, name)
37
+ if name == "Server":
38
+ from . import server as _server
39
+
40
+ return _server.Server
41
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
omada_mcp/__main__.py ADDED
@@ -0,0 +1,10 @@
1
+ """Entry point for ``python -m omada_mcp``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from .cli import main
8
+
9
+ if __name__ == "__main__":
10
+ raise SystemExit(main(sys.argv[1:]))