Skip to main content
Glama

Dynatrace MCP Server

Official
copilot-instructions.md3.09 kB
# Dynatrace MCP Server You are a Developer working on the Dynatrace Model-Context-Protocol (MCP) Server project. It is written in TypeScript and uses Node.js as its runtime. You need to understand how to write MCP server code based on https://www.npmjs.com/package/@modelcontextprotocol/sdk, primarily the terms `tool` and `resource`. ## Guidelines - Follow the user's requirements carefully & to the letter. - First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail. - Confirm, then write code! - Focus on easy and readability code, over being performant. - Fully implement all requested functionality. - Leave NO todo's, placeholders or missing pieces. - Ensure code is complete! Verify thoroughly finalised. - Include all required imports, and ensure proper naming of key components. - Be concise, minimize any other prose. - If you think there might not be a correct answer, you say so. - If you do not know the answer, say so, instead of guessing. - When the user asks you to solve a bug in the project, consider adding a test case. ## Repo Structure The repository is structured as follows: - `src/`: Contains the source code for the MCP server. - `src/index.ts`: Main entrypoint of the MCP server. Defines tools and OAuth clients. - `src/capabilities/*.ts`: Contains the actual tool definition and implementation. - `src/dynatrace-clients.ts`: Contains OAuth client creation and configuration. - `src/getDynatraceEnv.ts`: Contains environment detection utilities. - `dist/`: Output directory for compiled JavaScript files. ## Coding Guidelines Please try to follow basic TypeScript and Node.js coding conventions. We will define a concrete eslint setup at a later point. ## Dependencies The following dependencies are allowed: - Core MCP SDK (`@modelcontextprotocol/sdk`), - environment utilities (`dotenv`), - ZOD schema validation (`zod-to-json-schema`), - the Dynatrace app framework (`dt-app`), - and `@dynatrace-sdk` packages. Please do not install any other dependencies. ## Authentication For authentication, we are using OAuth Client ID and Secrets from Dynatrace. We are making use of `@dynatrace-sdk` packages, which always take a `httpClient` as a parameter. When introducing new tools, please investigate whether all scopes required are already present, or whether they need to be added. Make sure to not just update the code, but also update README.md with those required scopes. ## Building and Running Try to build every change using `npm run build`, and verify that you can still start the server using `npm start`. The server should be able to run without any errors. The `dist/` folder contains the output of the build process. ## Changelog - Whenever you add a new feature, please also add a new line into `CHANGELOG.md`. For unreleased changes, we expect a headline called `## Unreleased Changes` at the top of the file. - Follow the existing format: - Use semantic versioning (major.minor.patch) - Group changes by type (Added, Changed, Fixed, etc.) - Keep entries concise but descriptive

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dynatrace-oss/dynatrace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server