dynatrace-mcp
Copilot instructions137 starsChanged 17 months agoMITArchived repositoryView on GitHub
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. The repository is structured as follows: Please try to follow basic TypeScript and Node.js coding conventions, especially mtypescript.instructions.md. The following dependencies are allowed: Avoid installing any other dependencies, unless explicitly approved. For authentication, we are using OAuth Client…
The file
We split this copilot-instructions.md into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Follow the user's requirements carefully & to the letter.
- Distinctive: line 13
Leave NO todo's, placeholders or missing pieces.
- Distinctive: line 16
If you think there might not be a correct answer, you say so.
- Distinctive: line 17
If you do not know the answer, say so, instead of guessing.
- Distinctive: line 18
When the user asks you to solve a bug in the project, consider adding a test case.
- Distinctive: line 45
Avoid installing any other dependencies, unless explicitly approved.
- Distinctive: line 50
Make sure to not just update the code, but also update README.md with those required scopes.
- Distinctive: line 56
Use the same scope names and maintain consistent descriptions
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
- Focus on easy and readable code, over being performant.
- Fully implement all requested functionality.
- Leave NO todo's, placeholders or missing pieces.
- 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, especially mtypescript.instructions.md.
Dependencies
The following dependencies are allowed:
- Core MCP SDK (
@modelcontextprotocol/sdk), - ZOD schema validation (
zod-to-json-schema), - the Dynatrace app framework (
dt-app), vite/vite-plugin-singlefileandreactfor the UI part of the project,- and
@dynatraceas well as@dynatrace-sdkpackages.
Avoid installing any other dependencies, unless explicitly approved.
Authentication
For authentication, we are using OAuth Client ID and Secrets from Dynatrace. We are making use of @dynatrace-sdk packages, which always take an 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.
Important: OAuth scopes must always be kept in sync between implementation and documentation:
- Implementation:
src/index.tsdefines all scopes in theallRequiredScopesarray - Documentation:
README.mdsection "Scopes for Authentication" lists all scopes with descriptions - Use the same scope names and maintain consistent descriptions
Building and Running
See build.instructions.md for instructions on how to build and run the MCP server.
Commit Messages and PR Titles
This project uses Conventional Commits (semantic commits). All commit messages and PR titles must follow the format:
<type>(<optional scope>): <description>Common types: feat, fix, docs, chore, refactor, test, ci, perf, build, revert.
Examples:
feat(tools): add new problem analysis toolfix(auth): handle token refresh race conditionchore(deps): bump @modelcontextprotocol/sdk from 1.25.0 to 1.26.0
Changelog
See changelog.instructions.md for full guidance on what to include and how to format changelog entries.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

