Skip to content

Commit 46692eb

Browse files
committed
Enhance documentation and build process for MCP server
- Update the build process to improve development efficiency using `tsup`. - Revise README to provide clearer instructions and enhance understanding of MCP server capabilities. - Include new details and features related to incident management and Datadog integration. Signed-off-by: katsumata <12413150+winor30@users.noreply.github.com>
1 parent 84180f9 commit 46692eb

File tree

2 files changed

+88
-35
lines changed

2 files changed

+88
-35
lines changed

README.md

+87-34
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,129 @@
11
# Datadog MCP Server
22

3-
MCP server for interacting with Datadog API
3+
MCP server for the Datadog API, enabling incident management and more.
44

5-
This is a TypeScript-based MCP server that implements a simple notes system. It demonstrates core MCP concepts by providing:
5+
## Features
66

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.
109

11-
## Features
10+
## Tools
1211

13-
### Resources
12+
1. `list_incidents`
1413

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.
1819

19-
### Tools
20+
2. `get_incident`
2021

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.).
2426

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).
2628

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
3030

31-
## Development
31+
### Datadog Credentials
3232

33-
Install dependencies:
33+
You need valid Datadog API credentials to use this MCP server:
3434

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`)
3838

39-
Build the server:
39+
Export them in your environment before running the server:
4040

4141
```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"
4345
```
4446

45-
For development with auto-rebuild:
47+
## Installation
4648

4749
```bash
48-
npm run watch
50+
pnpm install
51+
pnpm build
52+
pnpm watch # for development with auto-rebuild
4953
```
5054

51-
## Installation
55+
## Usage with Claude Desktop
5256

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`:
5458

55-
On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
59+
On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
5660
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
5761

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+
5893
```json
5994
{
6095
"mcpServers": {
6196
"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+
}
63104
}
64105
}
65106
}
66107
```
67108

68-
### Debugging
109+
## Debugging
69110

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:
71112

72113
```bash
73114
npm run inspector
74115
```
75116

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+
```

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"build": "tsup && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
2727
"prepare": "npm run build",
28-
"watch": "tsc --watch",
28+
"watch": "tsup --watch",
2929
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
3030
"lint": "eslint . --ext .ts,.js",
3131
"format": "prettier --write ."

0 commit comments

Comments
 (0)