hawkeye-mcp-server 1.0.0
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.
- package/CHANGELOG.md +123 -0
- package/INSTALLATION.md +734 -0
- package/LICENSE +21 -0
- package/README.md +289 -0
- package/SPECIFICATION.md +1073 -0
- package/USAGE.md +849 -0
- package/build/config/config.d.ts +58 -0
- package/build/config/config.js +100 -0
- package/build/config/config.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +138 -0
- package/build/index.js.map +1 -0
- package/build/services/auth.service.d.ts +34 -0
- package/build/services/auth.service.js +96 -0
- package/build/services/auth.service.js.map +1 -0
- package/build/services/project.service.d.ts +50 -0
- package/build/services/project.service.js +136 -0
- package/build/services/project.service.js.map +1 -0
- package/build/services/session.service.d.ts +68 -0
- package/build/services/session.service.js +357 -0
- package/build/services/session.service.js.map +1 -0
- package/build/tools/continue-investigation.d.ts +10 -0
- package/build/tools/continue-investigation.js +84 -0
- package/build/tools/continue-investigation.js.map +1 -0
- package/build/tools/get-incident-report.d.ts +10 -0
- package/build/tools/get-incident-report.js +62 -0
- package/build/tools/get-incident-report.js.map +1 -0
- package/build/tools/get-session-report.d.ts +25 -0
- package/build/tools/get-session-report.js +46 -0
- package/build/tools/get-session-report.js.map +1 -0
- package/build/tools/get-session-summary.d.ts +22 -0
- package/build/tools/get-session-summary.js +41 -0
- package/build/tools/get-session-summary.js.map +1 -0
- package/build/tools/get-status.d.ts +10 -0
- package/build/tools/get-status.js +129 -0
- package/build/tools/get-status.js.map +1 -0
- package/build/tools/index.d.ts +29 -0
- package/build/tools/index.js +349 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/inspect-session.d.ts +28 -0
- package/build/tools/inspect-session.js +51 -0
- package/build/tools/inspect-session.js.map +1 -0
- package/build/tools/investigate-alert.d.ts +10 -0
- package/build/tools/investigate-alert.js +122 -0
- package/build/tools/investigate-alert.js.map +1 -0
- package/build/tools/list-sessions.d.ts +49 -0
- package/build/tools/list-sessions.js +79 -0
- package/build/tools/list-sessions.js.map +1 -0
- package/build/types/errors.d.ts +61 -0
- package/build/types/errors.js +76 -0
- package/build/types/errors.js.map +1 -0
- package/build/types/hawkeye.d.ts +238 -0
- package/build/types/hawkeye.js +8 -0
- package/build/types/hawkeye.js.map +1 -0
- package/build/types/mcp.d.ts +125 -0
- package/build/types/mcp.js +6 -0
- package/build/types/mcp.js.map +1 -0
- package/build/utils/errors.d.ts +20 -0
- package/build/utils/errors.js +125 -0
- package/build/utils/errors.js.map +1 -0
- package/build/utils/http-client.d.ts +51 -0
- package/build/utils/http-client.js +133 -0
- package/build/utils/http-client.js.map +1 -0
- package/build/utils/logger.d.ts +35 -0
- package/build/utils/logger.js +77 -0
- package/build/utils/logger.js.map +1 -0
- package/build/utils/validation.d.ts +134 -0
- package/build/utils/validation.js +68 -0
- package/build/utils/validation.js.map +1 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Neubird AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Hawkeye MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/hawkeye-mcp-server)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
> Model Context Protocol (MCP) server that brings Hawkeye's AI-powered incident investigation and root cause analysis directly into your AI coding environment.
|
|
8
|
+
|
|
9
|
+
## What is it?
|
|
10
|
+
|
|
11
|
+
The Hawkeye MCP Server enables developers to investigate cloud incidents, analyze alerts, and perform automated root cause analysis directly from AI-powered development tools like Claude Desktop and Cursor.ai. It bridges the gap between your code editor and Hawkeye's powerful cloud telemetry analysis platform.
|
|
12
|
+
|
|
13
|
+
**Stop context-switching. Investigate incidents without leaving your IDE.**
|
|
14
|
+
|
|
15
|
+
## ✨ Key Features
|
|
16
|
+
|
|
17
|
+
- 🔍 **Alert Investigation** - Find existing RCAs or create new investigations for specific alert IDs
|
|
18
|
+
- 📊 **Session Management** - List, filter, and inspect investigation sessions with advanced filtering
|
|
19
|
+
- 🎯 **Uninvestigated Incidents** - Quickly find incidents that haven't been analyzed yet
|
|
20
|
+
- 📈 **Analytics & Reporting** - Get organization-wide incident statistics, MTTR, and time-saved metrics
|
|
21
|
+
- 💬 **Follow-up Questions** - Continue investigations with contextual follow-up prompts
|
|
22
|
+
- 🚀 **Real-time Updates** - Stream investigation progress in real-time
|
|
23
|
+
- 🌐 **Cross-platform** - Works on macOS, Linux, and Windows
|
|
24
|
+
- 🔌 **Easy Integration** - Works with Claude Desktop, Cursor.ai, and any MCP-compatible AI agent
|
|
25
|
+
|
|
26
|
+
## 🚀 Quick Start
|
|
27
|
+
|
|
28
|
+
### Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Install globally with npm
|
|
32
|
+
npm install -g hawkeye-mcp-server
|
|
33
|
+
|
|
34
|
+
# Or use directly with npx (no installation required)
|
|
35
|
+
npx hawkeye-mcp-server
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Configuration
|
|
39
|
+
|
|
40
|
+
1. Set up your environment variables:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Create a .env file or set environment variables
|
|
44
|
+
export HAWKEYE_EMAIL="your-email@example.com"
|
|
45
|
+
export HAWKEYE_PASSWORD="your-password"
|
|
46
|
+
export HAWKEYE_BASE_URL="https://your-instance.app.neubird.ai/api"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. Configure your AI agent (example for Claude Desktop):
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"hawkeye": {
|
|
55
|
+
"command": "npx",
|
|
56
|
+
"args": ["hawkeye-mcp-server"],
|
|
57
|
+
"env": {
|
|
58
|
+
"HAWKEYE_EMAIL": "your-email@example.com",
|
|
59
|
+
"HAWKEYE_PASSWORD": "your-password",
|
|
60
|
+
"HAWKEYE_BASE_URL": "https://your-instance.app.neubird.ai/api"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
3. Start using it! Ask your AI agent:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
"Show me all uninvestigated incidents from the HTM-Azure project"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 📖 Documentation
|
|
74
|
+
|
|
75
|
+
- **[Installation Guide](./INSTALLATION.md)** - Detailed installation instructions for all platforms and AI agents
|
|
76
|
+
- **[Usage Guide](./USAGE.md)** - Complete usage examples and workflows
|
|
77
|
+
- **[API Reference](./SPECIFICATION.md)** - Technical specification of all MCP tools
|
|
78
|
+
|
|
79
|
+
## 🎯 Common Use Cases
|
|
80
|
+
|
|
81
|
+
### 1. List Uninvestigated Incidents
|
|
82
|
+
|
|
83
|
+
Find incidents that haven't been analyzed yet:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
"List all uninvestigated incidents in my default project"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The MCP server will call `hawkeye_list_sessions` with:
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"only_uninvestigated": true
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 2. Investigate an Alert
|
|
97
|
+
|
|
98
|
+
Analyze a specific alert by ID:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
"Investigate alert /subscriptions/.../alerts/08f9c803-..."
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The server automatically finds existing investigations or creates a new one.
|
|
105
|
+
|
|
106
|
+
### 3. Get Investigation Details
|
|
107
|
+
|
|
108
|
+
Deep dive into a specific investigation:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
"Show me the full analysis from session abc-123-def-456"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 4. View Analytics
|
|
115
|
+
|
|
116
|
+
Get organization-wide incident statistics:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
"Show me the incident report with MTTR and time saved metrics"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 5. Continue an Investigation
|
|
123
|
+
|
|
124
|
+
Ask follow-up questions on an existing investigation:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
"Can you dig deeper into the network policy issues you found?"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## 🛠️ Available Tools
|
|
131
|
+
|
|
132
|
+
The Hawkeye MCP Server provides the following tools to AI agents:
|
|
133
|
+
|
|
134
|
+
| Tool | Description |
|
|
135
|
+
|------|-------------|
|
|
136
|
+
| `hawkeye_list_projects` | List all available Hawkeye projects |
|
|
137
|
+
| `hawkeye_investigate_alert` | Investigate a specific alert/incident by ID |
|
|
138
|
+
| `hawkeye_get_investigation_status` | Check the status of an ongoing investigation |
|
|
139
|
+
| `hawkeye_continue_investigation` | Ask follow-up questions on an investigation |
|
|
140
|
+
| `hawkeye_list_sessions` | List sessions with filtering (uninvestigated, date range, etc.) |
|
|
141
|
+
| `hawkeye_inspect_session` | Get detailed information about a specific session |
|
|
142
|
+
| `hawkeye_get_session_report` | Get summary reports with time-saved metrics |
|
|
143
|
+
| `hawkeye_get_session_summary` | Get quality scores and analysis metrics |
|
|
144
|
+
| `hawkeye_get_incident_report` | Get organization-wide incident analytics |
|
|
145
|
+
|
|
146
|
+
See the [API Reference](./SPECIFICATION.md) for detailed documentation on each tool.
|
|
147
|
+
|
|
148
|
+
## 🔧 Configuration Options
|
|
149
|
+
|
|
150
|
+
### Required Environment Variables
|
|
151
|
+
|
|
152
|
+
| Variable | Description |
|
|
153
|
+
|----------|-------------|
|
|
154
|
+
| `HAWKEYE_EMAIL` | Your Hawkeye account email |
|
|
155
|
+
| `HAWKEYE_PASSWORD` | Your Hawkeye account password |
|
|
156
|
+
| `HAWKEYE_BASE_URL` | Hawkeye API base URL |
|
|
157
|
+
|
|
158
|
+
### Optional Environment Variables
|
|
159
|
+
|
|
160
|
+
| Variable | Default | Description |
|
|
161
|
+
|----------|---------|-------------|
|
|
162
|
+
| `HAWKEYE_DEFAULT_PROJECT_UUID` | None | Default project for investigations |
|
|
163
|
+
| `HAWKEYE_DEFAULT_ORGANIZATION_UUID` | `ORGANIZATION_NAME_ROOT` | Default organization |
|
|
164
|
+
| `HAWKEYE_MAX_POLL_ATTEMPTS` | `30` | Max attempts when polling for completion |
|
|
165
|
+
| `HAWKEYE_POLL_INTERVAL_MS` | `2000` | Interval between polling attempts (ms) |
|
|
166
|
+
| `HAWKEYE_ENABLE_STREAMING` | `true` | Enable real-time streaming |
|
|
167
|
+
| `HAWKEYE_LOG_ENABLED` | `true` | Enable logging |
|
|
168
|
+
| `HAWKEYE_LOG_LEVEL` | `info` | Log level (debug, info, warn, error) |
|
|
169
|
+
|
|
170
|
+
## 🤝 Supported AI Agents
|
|
171
|
+
|
|
172
|
+
The Hawkeye MCP Server works with any MCP-compatible AI agent:
|
|
173
|
+
|
|
174
|
+
- ✅ **Claude Desktop** (macOS, Windows)
|
|
175
|
+
- ✅ **Cursor.ai** (macOS, Windows, Linux)
|
|
176
|
+
- ✅ **Continue.dev** (VS Code extension)
|
|
177
|
+
- ✅ Any other MCP-compatible agent
|
|
178
|
+
|
|
179
|
+
See the [Installation Guide](./INSTALLATION.md) for setup instructions for each agent.
|
|
180
|
+
|
|
181
|
+
## 🐛 Troubleshooting
|
|
182
|
+
|
|
183
|
+
### Authentication Errors
|
|
184
|
+
|
|
185
|
+
If you see authentication errors:
|
|
186
|
+
|
|
187
|
+
1. Verify your `HAWKEYE_EMAIL` and `HAWKEYE_PASSWORD` are correct
|
|
188
|
+
2. Check that `HAWKEYE_BASE_URL` points to the correct Hawkeye instance
|
|
189
|
+
3. Ensure your account has API access
|
|
190
|
+
|
|
191
|
+
### Connection Issues
|
|
192
|
+
|
|
193
|
+
If the MCP server isn't connecting:
|
|
194
|
+
|
|
195
|
+
1. Make sure Node.js >= 20.0.0 is installed: `node --version`
|
|
196
|
+
2. Verify the server is accessible: test with `npx hawkeye-mcp-server`
|
|
197
|
+
3. Check your AI agent's MCP configuration
|
|
198
|
+
4. Review logs for detailed error messages
|
|
199
|
+
|
|
200
|
+
### Investigation Timeouts
|
|
201
|
+
|
|
202
|
+
If investigations are timing out:
|
|
203
|
+
|
|
204
|
+
1. Increase `HAWKEYE_MAX_POLL_ATTEMPTS` in your environment
|
|
205
|
+
2. Check your network connection
|
|
206
|
+
3. Verify the investigation is running in Hawkeye
|
|
207
|
+
|
|
208
|
+
For more troubleshooting tips, see the [Installation Guide](./INSTALLATION.md#troubleshooting).
|
|
209
|
+
|
|
210
|
+
## 📊 Examples
|
|
211
|
+
|
|
212
|
+
### Example 1: Find and Investigate Uninvestigated Incidents
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
You: "Show me all uninvestigated P1 incidents from last week"
|
|
216
|
+
|
|
217
|
+
Agent: *Lists uninvestigated P1 incidents*
|
|
218
|
+
|
|
219
|
+
You: "Investigate the first one"
|
|
220
|
+
|
|
221
|
+
Agent: *Creates investigation and returns RCA*
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Example 2: Get Project Analytics
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
You: "What's our MTTR and how much time has Hawkeye saved us?"
|
|
228
|
+
|
|
229
|
+
Agent: *Returns incident report with metrics*
|
|
230
|
+
|
|
231
|
+
Result:
|
|
232
|
+
- Average MTTR: 45 minutes
|
|
233
|
+
- Total time saved: 234 hours
|
|
234
|
+
- Noise reduction: 67%
|
|
235
|
+
- Total investigations: 156
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Example 3: Deep Dive into an Investigation
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
You: "Show me session abc-123 with all sources and chain of thought"
|
|
242
|
+
|
|
243
|
+
Agent: *Returns detailed analysis including:*
|
|
244
|
+
- All prompt cycles
|
|
245
|
+
- Chain of thoughts (reasoning steps)
|
|
246
|
+
- Data sources consulted
|
|
247
|
+
- Follow-up suggestions
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
For more examples, see the [Usage Guide](./USAGE.md).
|
|
251
|
+
|
|
252
|
+
## 🔐 Security & Privacy
|
|
253
|
+
|
|
254
|
+
- Credentials are only used for authentication with your Hawkeye instance
|
|
255
|
+
- No data is sent to third parties
|
|
256
|
+
- All communication is over HTTPS
|
|
257
|
+
- Tokens are cached securely in memory only
|
|
258
|
+
- See [SECURITY.md](./SECURITY.md) for our security policy (if applicable)
|
|
259
|
+
|
|
260
|
+
## 📝 Changelog
|
|
261
|
+
|
|
262
|
+
See [CHANGELOG.md](./CHANGELOG.md) for version history and release notes.
|
|
263
|
+
|
|
264
|
+
## 🤝 Support
|
|
265
|
+
|
|
266
|
+
Need help? Have questions?
|
|
267
|
+
|
|
268
|
+
- **Email**: support@neubird.ai
|
|
269
|
+
- **Documentation**: [Full Documentation](./INSTALLATION.md)
|
|
270
|
+
- **Issues**: For bug reports and feature requests, contact support@neubird.ai
|
|
271
|
+
|
|
272
|
+
## 📄 License
|
|
273
|
+
|
|
274
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
275
|
+
|
|
276
|
+
Copyright (c) 2024 Neubird AI
|
|
277
|
+
|
|
278
|
+
## 🙏 Acknowledgments
|
|
279
|
+
|
|
280
|
+
Built with:
|
|
281
|
+
- [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/sdk) - MCP Protocol implementation
|
|
282
|
+
- [TypeScript](https://www.typescriptlang.org/) - Type-safe JavaScript
|
|
283
|
+
- [Axios](https://axios-http.com/) - HTTP client
|
|
284
|
+
- [Zod](https://zod.dev/) - Runtime validation
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
**Made with ❤️ by [Neubird AI](https://neubird.ai)** | Powered by Hawkeye
|
|
289
|
+
|