|
1 | 1 | # Datadog MCP Server
|
2 | 2 |
|
3 |
| -MCP server for interacting with Datadog API |
| 3 | +MCP server for the Datadog API, enabling incident management and more. |
4 | 4 |
|
5 |
| -This is a TypeScript-based MCP server that implements a simple notes system. It demonstrates core MCP concepts by providing: |
| 5 | +## Features |
6 | 6 |
|
7 |
| -- Resources representing text notes with URIs and metadata |
8 |
| -- Tools for creating new notes |
9 |
| -- Prompts for generating summaries of notes |
| 7 | +- **Incident Management**: Enable listing and retrieving Datadog incidents through dedicated tools. |
| 8 | +- **Extensible Design**: Intended for future integrations with additional Datadog APIs. |
10 | 9 |
|
11 |
| -## Features |
| 10 | +## Tools |
12 | 11 |
|
13 |
| -### Resources |
| 12 | +1. `list_incidents` |
14 | 13 |
|
15 |
| -- List and access notes via `note://` URIs |
16 |
| -- Each note has a title, content and metadata |
17 |
| -- Plain text mime type for simple content access |
| 14 | + - Retrieve a list of incidents from Datadog. |
| 15 | + - **Inputs**: |
| 16 | + - `filter` (optional string): Filter parameters for incidents (e.g., status, priority). |
| 17 | + - `pagination` (optional object): Pagination details like page size/offset. |
| 18 | + - **Returns**: Array of Datadog incidents and associated metadata. |
18 | 19 |
|
19 |
| -### Tools |
| 20 | +2. `get_incident` |
20 | 21 |
|
21 |
| -- `create_note` - Create new text notes |
22 |
| - - Takes title and content as required parameters |
23 |
| - - Stores note in server state |
| 22 | + - Retrieve detailed information about a specific Datadog incident. |
| 23 | + - **Inputs**: |
| 24 | + - `incident_id` (string): Incident ID to fetch details for. |
| 25 | + - **Returns**: Detailed incident information (title, status, timestamps, etc.). |
24 | 26 |
|
25 |
| -### Prompts |
| 27 | +3. _(Planned)_: Additional tools for creating, updating, or resolving incidents, as well as for managing other Datadog resources (e.g., dashboards, monitors). |
26 | 28 |
|
27 |
| -- `summarize_notes` - Generate a summary of all stored notes |
28 |
| - - Includes all note contents as embedded resources |
29 |
| - - Returns structured prompt for LLM summarization |
| 29 | +## Setup |
30 | 30 |
|
31 |
| -## Development |
| 31 | +### Datadog Credentials |
32 | 32 |
|
33 |
| -Install dependencies: |
| 33 | +You need valid Datadog API credentials to use this MCP server: |
34 | 34 |
|
35 |
| -```bash |
36 |
| -npm install |
37 |
| -``` |
| 35 | +- `DATADOG_API_KEY`: Your Datadog API key |
| 36 | +- `DATADOG_APP_KEY`: Your Datadog Application key |
| 37 | +- `DATADOG_SITE` (optional): The Datadog site (e.g. `datadoghq.eu`) |
38 | 38 |
|
39 |
| -Build the server: |
| 39 | +Export them in your environment before running the server: |
40 | 40 |
|
41 | 41 | ```bash
|
42 |
| -npm run build |
| 42 | +export DATADOG_API_KEY="your_api_key" |
| 43 | +export DATADOG_APP_KEY="your_app_key" |
| 44 | +export DATADOG_SITE="your_datadog_site" |
43 | 45 | ```
|
44 | 46 |
|
45 |
| -For development with auto-rebuild: |
| 47 | +## Installation |
46 | 48 |
|
47 | 49 | ```bash
|
48 |
| -npm run watch |
| 50 | +pnpm install |
| 51 | +pnpm build |
| 52 | +pnpm watch # for development with auto-rebuild |
49 | 53 | ```
|
50 | 54 |
|
51 |
| -## Installation |
| 55 | +## Usage with Claude Desktop |
52 | 56 |
|
53 |
| -To use with Claude Desktop, add the server config: |
| 57 | +To use this with Claude Desktop, add the following to your `claude_desktop_config.json`: |
54 | 58 |
|
55 |
| -On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json` |
| 59 | +On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json` |
56 | 60 | On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
|
57 | 61 |
|
| 62 | +```json |
| 63 | +{ |
| 64 | + "mcpServers": { |
| 65 | + "github": { |
| 66 | + "command": "npx", |
| 67 | + "args": ["-y", "@modelcontextprotocol/server-github"], |
| 68 | + "env": { |
| 69 | + "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | +} |
| 74 | +``` |
| 75 | + |
| 76 | +```json |
| 77 | +{ |
| 78 | + "mcpServers": { |
| 79 | + "datadog": { |
| 80 | + "command": "/path/to/mcp-server-datadog/build/index.js", |
| 81 | + "env": { |
| 82 | + "DATADOG_API_KEY": "<YOUR_API_KEY>", |
| 83 | + "DATADOG_APP_KEY": "<YOUR_APP_KEY>", |
| 84 | + "DATADOG_SITE": "<YOUR_SITE>" // Optional |
| 85 | + } |
| 86 | + } |
| 87 | + } |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +Or specify via `npx`: |
| 92 | + |
58 | 93 | ```json
|
59 | 94 | {
|
60 | 95 | "mcpServers": {
|
61 | 96 | "mcp-server-datadog": {
|
62 |
| - "command": "/path/to/mcp-server-datadog/build/index.js" |
| 97 | + "command": "npx", |
| 98 | + "args": ["-y", "@winor30/mcp-server-datadog"], |
| 99 | + "env": { |
| 100 | + "DATADOG_API_KEY": "<YOUR_API_KEY>", |
| 101 | + "DATADOG_APP_KEY": "<YOUR_APP_KEY>", |
| 102 | + "DATADOG_SITE": "<YOUR_SITE>" // Optional |
| 103 | + } |
63 | 104 | }
|
64 | 105 | }
|
65 | 106 | }
|
66 | 107 | ```
|
67 | 108 |
|
68 |
| -### Debugging |
| 109 | +## Debugging |
69 | 110 |
|
70 |
| -Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script: |
| 111 | +Because MCP servers communicate over standard input/output, debugging can sometimes be tricky. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector). You can run the inspector with: |
71 | 112 |
|
72 | 113 | ```bash
|
73 | 114 | npm run inspector
|
74 | 115 | ```
|
75 | 116 |
|
76 |
| -The Inspector will provide a URL to access debugging tools in your browser. |
| 117 | +The inspector will provide a URL you can open in your browser to see logs and send requests manually. |
| 118 | + |
| 119 | +## Contributing |
| 120 | + |
| 121 | +Contributions are welcome! Feel free to open an issue or a pull request if you have any suggestions, bug reports, or improvements to propose. |
| 122 | + |
| 123 | +## License |
| 124 | + |
| 125 | +This project is licensed under the [MIT License](./LICENSE). |
| 126 | + |
| 127 | +``` |
| 128 | +
|
| 129 | +``` |
0 commit comments