You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No unit tests exist yet. CI runs license checks, lint, and docker build.
35
+
Unit tests exist for selected transport/context behavior. CI runs license checks, lint, and docker build.
36
36
37
37
## Architecture
38
38
@@ -41,12 +41,11 @@ No unit tests exist yet. CI runs license checks, lint, and docker build.
41
41
Three MCP transport modes as cobra subcommands: `stdio`, `sse`, `streamable`.
42
42
43
43
The SkyWalking OAP URL is resolved in priority order:
44
-
-**stdio**: `set_skywalking_url` session tool > `--sw-url` flag > `http://localhost:12800/graphql`
45
-
-**SSE/HTTP**: `SW-URL` HTTP header > `--sw-url` flag > `http://localhost:12800/graphql`
44
+
-**All transports**: `--sw-url` flag > `http://localhost:12800/graphql`
46
45
47
-
The `set_skywalking_url` tool is only available in stdio mode (single client, well-defined session). SSE and HTTP transports use per-request headers instead.
46
+
SSE and HTTP transports always use the configured server URL.
48
47
49
-
Basic auth is configured via `--sw-username` / `--sw-password` flags. Both flags (and the `set_skywalking_url` tool) support `${ENV_VAR}` syntax to resolve credentials from environment variables (e.g. `--sw-password ${MY_SECRET}`).
48
+
Basic auth is configured via `--sw-username` / `--sw-password` flags. The startup flags support `${ENV_VAR}` syntax to resolve credentials from environment variables (e.g. `--sw-password ${MY_SECRET}`).
50
49
51
50
Each transport injects the OAP URL and auth into the request context via `WithSkyWalkingURLAndInsecure()` and `WithSkyWalkingAuth()`. Tools extract them downstream using `skywalking-cli`'s `contextkey.BaseURL{}`, `contextkey.Username{}`, and `contextkey.Password{}`.
52
51
@@ -99,4 +98,4 @@ Tool handlers should return `(mcp.NewToolResultError(...), nil)` for expected qu
99
98
100
99
## CI & Merge Policy
101
100
102
-
Squash-merge only. PRs to `main` require 1 approval and passing `Required` status check (license + lint + docker build). Go 1.25.
101
+
Squash-merge only. PRs to `main` require 1 approval and passing `Required` status check (license + lint + docker build). Go 1.25.
|**Session**|`set_skywalking_url`| Set the SkyWalking OAP server URL and optional basic auth credentials for the current session (stdio mode only). Supports `${ENV_VAR}` syntax for credentials. |
132
136
|**Trace**|`query_traces`| Query traces with multi-condition filtering (service, endpoint, state, tags, and time range via start/end/step). Supports `full`, `summary`, and `errors_only` views with performance insights. |
133
137
|**Log**|`query_logs`| Query logs with filters for service, instance, endpoint, trace ID, tags, and time range. Supports cold storage and pagination. |
134
138
|**MQE**|`execute_mqe_expression`| Execute MQE (Metrics Query Expression) to query and calculate metrics data. Supports calculations, aggregations, TopN, trend analysis, and multiple result types. |
@@ -176,4 +180,4 @@ SkyWalking MCP provides the following prompts for guided analysis workflows:
0 commit comments