@dynatrace-oss/dynatrace-mcp-server 0.6.0 → 0.6.1

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.
Files changed (3) hide show
  1. package/README.md +37 -0
  2. package/dist/index.js +14 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -277,6 +277,43 @@ The [Amazon Q Developer CLI](https://docs.aws.amazon.com/amazonq/latest/qdevelop
277
277
 
278
278
  This configuration should be stored in `<your-repo>/.amazonq/mcp.json`.
279
279
 
280
+ **Google Gemini CLI**
281
+
282
+ The [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) is Google's official command-line AI assistant that supports MCP server integration. You can add the Dynatrace MCP server using either the built-in management commands or manual configuration.
283
+
284
+ Using `gemini` CLI directly (recommended):
285
+
286
+ ```bash
287
+ gemini extensions install https://github.com/dynatrace-oss/dynatrace-mcp
288
+ export DT_PLATFORM_TOKEN=...
289
+ export DT_ENVIRONMENT=https://...
290
+ ```
291
+
292
+ and verify that the server is running via
293
+
294
+ ```bash
295
+ gemini mcp list
296
+ ```
297
+
298
+ Or manually in your `~/.gemini/settings.json` or `.gemini/settings.json`:
299
+
300
+ ```json
301
+ {
302
+ "mcpServers": {
303
+ "dynatrace": {
304
+ "command": "npx",
305
+ "args": ["@dynatrace-oss/dynatrace-mcp-server@latest"],
306
+ "env": {
307
+ "DT_PLATFORM_TOKEN": "",
308
+ "DT_ENVIRONMENT": ""
309
+ },
310
+ "timeout": 30000,
311
+ "trust": false
312
+ }
313
+ }
314
+ }
315
+ ```
316
+
280
317
  ### HTTP Server Mode (Alternative)
281
318
 
282
319
  For scenarios where you need to run the MCP server as an HTTP service instead of using stdio (e.g., for stateful sessions, load balancing, or integration with web clients), you can use the HTTP server mode:
package/dist/index.js CHANGED
@@ -27,7 +27,20 @@ const davis_copilot_1 = require("./capabilities/davis-copilot");
27
27
  const getDynatraceEnv_1 = require("./getDynatraceEnv");
28
28
  const telemetry_openkit_1 = require("./utils/telemetry-openkit");
29
29
  const grail_budget_tracker_1 = require("./utils/grail-budget-tracker");
30
- (0, dotenv_1.config)();
30
+ // Load environment variables from .env file if available, and suppress warnings/logging to stdio
31
+ // as it breaks MCP communication when using stdio transport
32
+ const dotEnvOutput = (0, dotenv_1.config)({ quiet: true });
33
+ if (dotEnvOutput.error) {
34
+ // Only log error if it's not about missing .env file
35
+ if (dotEnvOutput.error.code !== 'ENOENT') {
36
+ console.error('Error loading .env file:', dotEnvOutput.error);
37
+ process.exit(1);
38
+ }
39
+ }
40
+ else {
41
+ // Successfully loaded .env file
42
+ console.error(`.env file loaded successfully - loaded ${dotEnvOutput.parsed ? Object.keys(dotEnvOutput.parsed).length : 0} environment variables: ${Object.keys(dotEnvOutput.parsed || {}).join(', ')}`);
43
+ }
31
44
  let scopesBase = [
32
45
  'app-engine:apps:run', // needed for environmentInformationClient
33
46
  'app-engine:functions:run', // needed for environmentInformationClient
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace-oss/dynatrace-mcp-server",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "mcpName": "io.github.dynatrace-oss/Dynatrace-mcp",
5
5
  "description": "Model Context Protocol (MCP) server for Dynatrace",
6
6
  "keywords": [