hawkeye-mcp-server 1.4.0 → 1.4.1

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.
Files changed (99) hide show
  1. package/README.md +246 -340
  2. package/build/index.js +8 -0
  3. package/build/index.js.map +1 -1
  4. package/build/services/connection.service.d.ts +51 -0
  5. package/build/services/connection.service.js +160 -0
  6. package/build/services/connection.service.js.map +1 -0
  7. package/build/services/guidance.service.d.ts +69 -0
  8. package/build/services/guidance.service.js +592 -0
  9. package/build/services/guidance.service.js.map +1 -0
  10. package/build/services/project.service.d.ts +24 -0
  11. package/build/services/project.service.js +140 -0
  12. package/build/services/project.service.js.map +1 -1
  13. package/build/services/session.service.d.ts +5 -0
  14. package/build/services/session.service.js +36 -0
  15. package/build/services/session.service.js.map +1 -1
  16. package/build/tools/add-connection-to-project.d.ts +25 -0
  17. package/build/tools/add-connection-to-project.js +84 -0
  18. package/build/tools/add-connection-to-project.js.map +1 -0
  19. package/build/tools/apply-session-instruction.d.ts +31 -0
  20. package/build/tools/apply-session-instruction.js +82 -0
  21. package/build/tools/apply-session-instruction.js.map +1 -0
  22. package/build/tools/create-connection.d.ts +88 -0
  23. package/build/tools/create-connection.js +94 -0
  24. package/build/tools/create-connection.js.map +1 -0
  25. package/build/tools/create-project-instruction.d.ts +32 -0
  26. package/build/tools/create-project-instruction.js +130 -0
  27. package/build/tools/create-project-instruction.js.map +1 -0
  28. package/build/tools/create-project.d.ts +28 -0
  29. package/build/tools/create-project.js +48 -0
  30. package/build/tools/create-project.js.map +1 -0
  31. package/build/tools/delete-project-instruction.d.ts +22 -0
  32. package/build/tools/delete-project-instruction.js +44 -0
  33. package/build/tools/delete-project-instruction.js.map +1 -0
  34. package/build/tools/delete-project.d.ts +31 -0
  35. package/build/tools/delete-project.js +67 -0
  36. package/build/tools/delete-project.js.map +1 -0
  37. package/build/tools/discover-project-resources.d.ts +29 -0
  38. package/build/tools/discover-project-resources.js +136 -0
  39. package/build/tools/discover-project-resources.js.map +1 -0
  40. package/build/tools/get-connection-info.d.ts +22 -0
  41. package/build/tools/get-connection-info.js +46 -0
  42. package/build/tools/get-connection-info.js.map +1 -0
  43. package/build/tools/get-guidance.d.ts +25 -0
  44. package/build/tools/get-guidance.js +28 -0
  45. package/build/tools/get-guidance.js.map +1 -0
  46. package/build/tools/get-project-details.d.ts +22 -0
  47. package/build/tools/get-project-details.js +60 -0
  48. package/build/tools/get-project-details.js.map +1 -0
  49. package/build/tools/index.d.ts +4 -0
  50. package/build/tools/index.js +869 -1
  51. package/build/tools/index.js.map +1 -1
  52. package/build/tools/list-connection-resource-types.d.ts +25 -0
  53. package/build/tools/list-connection-resource-types.js +58 -0
  54. package/build/tools/list-connection-resource-types.js.map +1 -0
  55. package/build/tools/list-connection-resources.d.ts +37 -0
  56. package/build/tools/list-connection-resources.js +108 -0
  57. package/build/tools/list-connection-resources.js.map +1 -0
  58. package/build/tools/list-connection-types.d.ts +9 -0
  59. package/build/tools/list-connection-types.js +132 -0
  60. package/build/tools/list-connection-types.js.map +1 -0
  61. package/build/tools/list-connections.d.ts +22 -0
  62. package/build/tools/list-connections.js +43 -0
  63. package/build/tools/list-connections.js.map +1 -0
  64. package/build/tools/list-project-connections.d.ts +22 -0
  65. package/build/tools/list-project-connections.js +81 -0
  66. package/build/tools/list-project-connections.js.map +1 -0
  67. package/build/tools/list-project-instructions.d.ts +31 -0
  68. package/build/tools/list-project-instructions.js +78 -0
  69. package/build/tools/list-project-instructions.js.map +1 -0
  70. package/build/tools/list-sessions.js +11 -1
  71. package/build/tools/list-sessions.js.map +1 -1
  72. package/build/tools/remove-connection-from-project.d.ts +25 -0
  73. package/build/tools/remove-connection-from-project.js +60 -0
  74. package/build/tools/remove-connection-from-project.js.map +1 -0
  75. package/build/tools/rerun-session.d.ts +31 -0
  76. package/build/tools/rerun-session.js +140 -0
  77. package/build/tools/rerun-session.js.map +1 -0
  78. package/build/tools/update-project-instruction-status.d.ts +26 -0
  79. package/build/tools/update-project-instruction-status.js +59 -0
  80. package/build/tools/update-project-instruction-status.js.map +1 -0
  81. package/build/tools/update-project.d.ts +41 -0
  82. package/build/tools/update-project.js +64 -0
  83. package/build/tools/update-project.js.map +1 -0
  84. package/build/tools/validate-instruction.d.ts +31 -0
  85. package/build/tools/validate-instruction.js +88 -0
  86. package/build/tools/validate-instruction.js.map +1 -0
  87. package/build/tools/wait-for-connection-sync.d.ts +28 -0
  88. package/build/tools/wait-for-connection-sync.js +51 -0
  89. package/build/tools/wait-for-connection-sync.js.map +1 -0
  90. package/build/types/hawkeye.d.ts +221 -0
  91. package/build/types/hawkeye.js +81 -0
  92. package/build/types/hawkeye.js.map +1 -1
  93. package/build/utils/connection-builders.d.ts +41 -0
  94. package/build/utils/connection-builders.js +203 -0
  95. package/build/utils/connection-builders.js.map +1 -0
  96. package/build/utils/validation.d.ts +2 -2
  97. package/package.json +2 -2
  98. package/INSTALLATION.md +0 -852
  99. package/USAGE.md +0 -1093
package/README.md CHANGED
@@ -6,291 +6,148 @@
6
6
 
7
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
8
 
9
- ## What is it?
9
+ ## What is Hawkeye MCP?
10
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.
11
+ Hawkeye MCP Server enables AI assistants (like Claude) to interact with [NeuBird's Hawkeye platform](https://neubird.ai) for autonomous incident investigation and root cause analysis.
12
12
 
13
13
  **Stop context-switching. Investigate incidents without leaving your IDE.**
14
14
 
15
15
  ## ✨ Key Features
16
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
- - 📝 **Comprehensive RCA** - Get formatted analysis with timeline, root cause, and **corrective actions** (including bash scripts)
21
- - ⏱️ **Time Savings Metrics** - See exactly how much time Hawkeye saved vs manual investigation
22
- - 📈 **Analytics & Reporting** - Get organization-wide incident statistics, MTTR, and time-saved metrics
23
- - 🎖️ **Quality Scoring** - Evaluate investigation quality with accuracy and completeness scores
24
- - 💬 **Follow-up Questions** - Continue investigations with contextual follow-up prompts
25
- - 🚀 **Real-time Updates** - Stream investigation progress in real-time
26
- - 🌐 **Cross-platform** - Works on macOS, Linux, and Windows
27
- - 🔌 **Easy Integration** - Works with Claude Desktop, Cursor.ai, and any MCP-compatible AI agent
17
+ - 🔍 **AI-Powered RCA** - Automated root cause analysis with corrective actions (including bash scripts)
18
+ - 🎯 **39 Tools** - Complete API for projects, connections, investigations, instructions, and analytics
19
+ - 📊 **Time Savings** - Track MTTR and time saved vs manual investigation
20
+ - 🧪 **Test Instructions** - Unique workflow to test investigation instructions before deployment
21
+ - 🔌 **Multi-Cloud** - Connect AWS, Azure, GCP, Datadog, PagerDuty, and more
22
+ - 🤖 **Any MCP Client** - Works with Claude Desktop, Claude Code, Cursor, Continue, and more
28
23
 
29
24
  ## 🚀 Quick Start
30
25
 
31
26
  ### Installation
32
27
 
33
28
  ```bash
34
- # Install globally with npm
29
+ # Install globally
35
30
  npm install -g hawkeye-mcp-server
36
31
 
37
- # Or use directly with npx (no installation required)
32
+ # Or use directly with npx (no installation)
38
33
  npx hawkeye-mcp-server
39
34
  ```
40
35
 
41
- ### Quick Setup for Cursor Users
42
-
43
- **Configuration file location:**
44
- - **macOS/Linux:** `~/.cursor/mcp.json`
45
- - **Windows:** `%APPDATA%\Cursor\mcp.json`
46
-
47
- If the file doesn't exist, create it with this content:
48
-
49
- ```json
50
- {
51
- "mcpServers": {
52
- "hawkeye": {
53
- "command": "npx",
54
- "args": ["hawkeye-mcp-server"],
55
- "env": {
56
- "HAWKEYE_EMAIL": "your-email@example.com",
57
- "HAWKEYE_PASSWORD": "your-password",
58
- "HAWKEYE_BASE_URL": "https://your-instance.app.neubird.ai/api"
59
- }
60
- }
61
- }
62
- }
63
- ```
64
-
65
- Then reload Cursor (`Cmd/Ctrl+Shift+P` → "Developer: Reload Window") and start investigating!
66
-
67
36
  ### Configuration
68
37
 
69
- 1. Set up your environment variables:
70
-
71
- ```bash
72
- # Create a .env file or set environment variables
73
- export HAWKEYE_EMAIL="your-email@example.com"
74
- export HAWKEYE_PASSWORD="your-password"
75
- export HAWKEYE_BASE_URL="https://your-instance.app.neubird.ai/api"
76
- ```
77
-
78
- 2. Configure your AI agent:
38
+ Add to your MCP client configuration:
79
39
 
80
- **For Claude Code** (Recommended - add to `~/.config/claude-code/mcp_settings.json`):
40
+ **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
81
41
 
82
42
  ```json
83
43
  {
84
44
  "mcpServers": {
85
45
  "hawkeye": {
86
46
  "command": "npx",
87
- "args": ["hawkeye-mcp-server"],
47
+ "args": ["-y", "hawkeye-mcp-server"],
88
48
  "env": {
89
- "HAWKEYE_EMAIL": "your-email@example.com",
49
+ "HAWKEYE_EMAIL": "your-email@company.com",
90
50
  "HAWKEYE_PASSWORD": "your-password",
91
- "HAWKEYE_BASE_URL": "https://your-instance.app.neubird.ai/api"
51
+ "HAWKEYE_BASE_URL": "https://app.neubird.ai/api"
92
52
  }
93
53
  }
94
54
  }
95
55
  }
96
56
  ```
97
57
 
98
- **For Claude Desktop** (add to `~/Library/Application Support/Claude/claude_desktop_config.json`):
58
+ **Cursor** (`~/.cursor/mcp.json`):
99
59
 
100
60
  ```json
101
61
  {
102
62
  "mcpServers": {
103
63
  "hawkeye": {
104
64
  "command": "npx",
105
- "args": ["hawkeye-mcp-server"],
65
+ "args": ["-y", "hawkeye-mcp-server"],
106
66
  "env": {
107
- "HAWKEYE_EMAIL": "your-email@example.com",
67
+ "HAWKEYE_EMAIL": "your-email@company.com",
108
68
  "HAWKEYE_PASSWORD": "your-password",
109
- "HAWKEYE_BASE_URL": "https://your-instance.app.neubird.ai/api"
69
+ "HAWKEYE_BASE_URL": "https://app.neubird.ai/api"
110
70
  }
111
71
  }
112
72
  }
113
73
  }
114
74
  ```
115
75
 
116
- **For Cursor** (add to `~/.cursor/mcp.json`):
117
-
118
- ```json
119
- {
120
- "mcpServers": {
121
- "hawkeye": {
122
- "command": "npx",
123
- "args": ["hawkeye-mcp-server"],
124
- "env": {
125
- "HAWKEYE_EMAIL": "your-email@example.com",
126
- "HAWKEYE_PASSWORD": "your-password",
127
- "HAWKEYE_BASE_URL": "https://your-instance.app.neubird.ai/api"
128
- }
129
- }
130
- }
131
- }
132
- ```
133
-
134
- After adding the configuration, reload Cursor:
135
- - Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
136
- - Type "Developer: Reload Window"
137
- - Press Enter
138
-
139
- 3. Start using it! Ask your AI agent:
140
-
141
- ```
142
- "Show me all uninvestigated incidents from the HTM-Azure project"
143
- ```
76
+ Restart your MCP client and start investigating!
144
77
 
145
78
  ## 📖 Documentation
146
79
 
147
- - **[Installation Guide](./INSTALLATION.md)** - Detailed installation instructions for all platforms and AI agents
148
- - **[Usage Guide](./USAGE.md)** - Complete usage examples and workflows
149
- - **[API Reference](./SPECIFICATION.md)** - Technical specification of all MCP tools
150
-
151
- ## 🎯 Common Use Cases
80
+ **Complete documentation is available at: [https://neubirdai.github.io/hawkeye-mcp-docs](https://neubirdai.github.io/hawkeye-mcp-docs)**
152
81
 
153
- ### 1. List Uninvestigated Incidents
82
+ - **[Installation Guide](https://neubirdai.github.io/hawkeye-mcp-docs/getting-started/installation/)** - Detailed setup for all platforms
83
+ - **[Quick Start](https://neubirdai.github.io/hawkeye-mcp-docs/getting-started/quickstart/)** - 5-minute getting started guide
84
+ - **[Complete Onboarding](https://neubirdai.github.io/hawkeye-mcp-docs/guides/onboarding/)** - End-to-end setup guide
85
+ - **[Tool Reference](https://neubirdai.github.io/hawkeye-mcp-docs/reference/overview/)** - All 39 tools documented
86
+ - **[Examples](https://neubirdai.github.io/hawkeye-mcp-docs/examples/complete-setup/)** - Real-world usage examples
87
+ - **[Troubleshooting](https://neubirdai.github.io/hawkeye-mcp-docs/troubleshooting/)** - Common issues and solutions
154
88
 
155
- Find incidents that haven't been analyzed yet:
89
+ ## 🎯 Example Usage
156
90
 
157
91
  ```
158
- "List all uninvestigated incidents in my default project"
159
- ```
92
+ You: "Show me uninvestigated alerts from the last 24 hours"
160
93
 
161
- The MCP server will call `hawkeye_list_sessions` with:
162
- ```json
163
- {
164
- "only_uninvestigated": true
165
- }
166
- ```
94
+ Claude: *Lists uninvestigated incidents*
167
95
 
168
- ### 2. Search for Specific Incidents
169
-
170
- Search for incidents by keywords in the title:
171
-
172
- ```
173
- "List all investigations into load avg issues"
174
- ```
175
-
176
- The MCP server will call `hawkeye_list_sessions` with:
177
- ```json
178
- {
179
- "search_term": "load avg",
180
- "only_uninvestigated": true
181
- }
182
- ```
183
-
184
- You can search for any keyword like "database", "timeout", "disk space", etc. Works with both investigated and uninvestigated incidents.
185
-
186
- ### 3. Investigate an Alert
187
-
188
- Analyze a specific alert by ID:
189
-
190
- ```
191
- "Investigate alert /subscriptions/.../alerts/08f9c803-..."
192
- ```
193
-
194
- The server automatically finds existing investigations or creates a new one.
96
+ You: "Investigate the first one"
195
97
 
196
- ### 4. Get Investigation RCA
98
+ Claude: *Runs investigation and returns comprehensive RCA including:*
99
+ - Root cause analysis
100
+ - Timeline of events
101
+ - Corrective actions with bash scripts
102
+ - Preventive measures
103
+ - Business impact
104
+ - Time saved (e.g., "45 minutes saved: Manual 50min → Hawkeye 5min")
197
105
 
198
- View the comprehensive Root Cause Analysis (recommended first step):
106
+ You: "Why did this happen? Has it happened before?"
199
107
 
200
- ```
201
- "Show me the RCA for session abc-123-def-456"
108
+ Claude: *Uses follow-up investigation to provide deeper analysis*
202
109
  ```
203
110
 
204
- The server returns a formatted analysis including:
205
- - **Summary** and incident description
206
- - **Timeline** of events
207
- - **Root cause** analysis
208
- - **Corrective actions** with executable bash scripts
209
- - **Time savings** metrics (e.g., "Saved 17 minutes: Manual 25min → Hawkeye 8min")
111
+ ## 🛠️ Tool Categories
210
112
 
211
- ### 5. View Analytics
113
+ | Category | Tools | Description |
114
+ |----------|-------|-------------|
115
+ | **Projects** | 5 | Create and manage Hawkeye projects |
116
+ | **Connections** | 10 | Connect AWS, Azure, GCP, Datadog, PagerDuty, etc. |
117
+ | **Investigations** | 10 | Investigate alerts, get RCA, ask follow-ups |
118
+ | **Instructions** | 7 | Create, test, and manage investigation instructions |
119
+ | **Analytics** | 4 | MTTR, time saved, quality scores, incident statistics |
120
+ | **Discovery** | 2 | Explore available resources and data sources |
121
+ | **Help** | 1 | Interactive guidance system |
212
122
 
213
- Get organization-wide incident statistics:
123
+ **Total: 39 tools**
214
124
 
215
- ```
216
- "Show me the incident report with MTTR and time saved metrics"
217
- ```
125
+ See the [Tool Reference](https://neubirdai.github.io/hawkeye-mcp-docs/reference/overview/) for complete documentation.
218
126
 
219
- ### 6. Continue an Investigation
127
+ ## 🧪 Unique Features
220
128
 
221
- Ask follow-up questions on an existing investigation:
129
+ ### Instruction Testing Workflow
222
130
 
223
- ```
224
- "Can you dig deeper into the network policy issues you found?"
225
- ```
131
+ Hawkeye MCP is the only incident investigation tool that lets you **test instructions before deploying them**:
226
132
 
227
- ### 7. Switch Hawkeye Instances
133
+ 1. Apply instruction to a past investigation
134
+ 2. Rerun that investigation with the new instruction
135
+ 3. Compare the new RCA with the original
136
+ 4. Only add to project if it improves results
228
137
 
229
- Switch between different Hawkeye environments or customer instances with flexible URL formats:
138
+ This prevents bad instructions from affecting all your investigations.
230
139
 
231
- ```
232
- "Switch to the production instance"
233
- "Switch to customerA deployment"
234
- "Switch to staging.app.neubird.ai"
235
- ```
140
+ Learn more: [Testing Instructions Guide](https://neubirdai.github.io/hawkeye-mcp-docs/guides/testing-instructions/)
236
141
 
237
- The tool accepts multiple URL formats and automatically normalizes them:
142
+ ## 🤝 Supported AI Clients
238
143
 
239
- **Supported Formats:**
240
- - **Just subdomain**: `"prod"` → `https://prod.app.neubird.ai/api`
241
- - **Subdomain name**: `"customerA"` → `https://customerA.app.neubird.ai/api`
242
- - **Partial URL**: `"prod.app.neubird.ai"` → `https://prod.app.neubird.ai/api`
243
- - **URL without protocol**: `"staging.app.neubird.ai"` → `https://staging.app.neubird.ai/api`
244
- - **Full URL without path**: `"https://prod.app.neubird.ai"` → `https://prod.app.neubird.ai/api`
245
- - **Complete URL**: `"https://prod.app.neubird.ai/api"` → `https://prod.app.neubird.ai/api` (no change)
246
- - **Custom domains**: `"custom.domain.com/api"` → `https://custom.domain.com/api`
247
-
248
- **Example:**
249
- ```json
250
- {
251
- "base_url": "prod"
252
- }
253
- ```
144
+ Works with any MCP-compatible client:
254
145
 
255
- Useful for users managing multiple environments (dev, staging, production) or multiple customer instances. Automatically clears authentication tokens and project cache, requiring re-authentication on the next API call.
256
-
257
- ## 🛠️ Available Tools
258
-
259
- The Hawkeye MCP Server provides the following tools to AI agents:
260
-
261
- ### Investigation Tools
262
- | Tool | Description |
263
- |------|-------------|
264
- | `hawkeye_investigate_alert` | Investigate a specific alert/incident by ID |
265
- | `hawkeye_get_investigation_status` | Check the status of an ongoing investigation |
266
- | `hawkeye_continue_investigation` | Ask follow-up questions on an investigation |
267
-
268
- ### Session Management & Analysis
269
- | Tool | Description |
270
- |------|-------------|
271
- | `hawkeye_list_sessions` | List sessions with filtering (uninvestigated, date range, search, etc.) |
272
- | `hawkeye_inspect_session` | Get session metadata and prompt cycle IDs |
273
- | `hawkeye_get_rca` | **⭐ RECOMMENDED** Get comprehensive RCA with corrective actions, timeline, and time savings |
274
- | `hawkeye_get_rca_score` | **NEW** Get quality scores (accuracy, completeness, qualitative feedback) |
275
- | `hawkeye_get_chain_of_thought` | Get investigation reasoning steps |
276
- | `hawkeye_get_investigation_queries` | Get query execution logs |
277
- | `hawkeye_get_investigation_sources` | Get data sources consulted |
278
- | `hawkeye_get_follow_up_suggestions` | Get suggested follow-up questions |
279
-
280
- ### Analytics & Reporting
281
- | Tool | Description |
282
- |------|-------------|
283
- | `hawkeye_get_session_report` | Get summary reports with time-saved metrics |
284
- | `hawkeye_get_session_summary` | Get detailed quality scores and analysis metrics |
285
- | `hawkeye_get_incident_report` | Get organization-wide incident analytics |
286
-
287
- ### Configuration
288
- | Tool | Description |
289
- |------|-------------|
290
- | `hawkeye_list_projects` | List all available Hawkeye projects |
291
- | `hawkeye_switch_instance` | Switch to a different Hawkeye instance (dev/staging/prod) |
292
-
293
- See the [API Reference](./SPECIFICATION.md) for detailed documentation on each tool.
146
+ - **Claude Desktop** (macOS, Windows)
147
+ - ✅ **Claude Code** (CLI - macOS, Windows, Linux)
148
+ - **Cursor** (macOS, Windows, Linux)
149
+ - ✅ **Continue** (VS Code extension)
150
+ - Any other MCP-compatible client
294
151
 
295
152
  ## 🔧 Configuration Options
296
153
 
@@ -300,161 +157,213 @@ See the [API Reference](./SPECIFICATION.md) for detailed documentation on each t
300
157
  |----------|-------------|
301
158
  | `HAWKEYE_EMAIL` | Your Hawkeye account email |
302
159
  | `HAWKEYE_PASSWORD` | Your Hawkeye account password |
303
- | `HAWKEYE_BASE_URL` | Hawkeye API base URL |
160
+ | `HAWKEYE_BASE_URL` | Hawkeye API endpoint (e.g., `https://app.neubird.ai/api`) |
304
161
 
305
162
  ### Optional Environment Variables
306
163
 
307
164
  | Variable | Default | Description |
308
165
  |----------|---------|-------------|
309
- | `HAWKEYE_DEFAULT_PROJECT_UUID` | None | Default project for investigations |
310
- | `HAWKEYE_DEFAULT_ORGANIZATION_UUID` | `ORGANIZATION_NAME_ROOT` | Default organization |
311
- | `HAWKEYE_MAX_POLL_ATTEMPTS` | `30` | Max attempts when polling for completion |
312
- | `HAWKEYE_POLL_INTERVAL_MS` | `2000` | Interval between polling attempts (ms) |
313
- | `HAWKEYE_ENABLE_STREAMING` | `true` | Enable real-time streaming |
314
- | `HAWKEYE_LOG_ENABLED` | `true` | Enable logging |
166
+ | `HAWKEYE_DEFAULT_PROJECT_UUID` | None | Default project UUID |
315
167
  | `HAWKEYE_LOG_LEVEL` | `info` | Log level (debug, info, warn, error) |
168
+ | `HAWKEYE_MAX_POLL_ATTEMPTS` | `30` | Max polling attempts |
169
+ | `HAWKEYE_POLL_INTERVAL_MS` | `2000` | Polling interval (ms) |
170
+
171
+ ## 👥 Contributing
172
+
173
+ We welcome contributions from NeuBird team members! This section is for internal developers.
174
+
175
+ ### Development Setup
176
+
177
+ 1. **Clone the repository:**
178
+ ```bash
179
+ git clone https://github.com/neubird/hawkeye-mcp.git
180
+ cd hawkeye-mcp
181
+ ```
182
+
183
+ 2. **Install dependencies:**
184
+ ```bash
185
+ npm install
186
+ ```
187
+
188
+ 3. **Set up environment variables:**
189
+ ```bash
190
+ cp .env.example .env
191
+ # Edit .env with your Hawkeye credentials
192
+ ```
193
+
194
+ 4. **Build the project:**
195
+ ```bash
196
+ npm run build
197
+ ```
198
+
199
+ 5. **Run in development mode:**
200
+ ```bash
201
+ npm run dev
202
+ ```
203
+
204
+ ### Project Structure
205
+
206
+ ```
207
+ hawkeye-mcp/
208
+ ├── src/
209
+ │ ├── index.ts # Main MCP server entry point
210
+ │ ├── hawkeye-client.ts # Hawkeye API client
211
+ │ ├── tools/ # MCP tool implementations
212
+ │ ├── utils/ # Utility functions
213
+ │ └── types/ # TypeScript type definitions
214
+ ├── build/ # Compiled JavaScript (gitignored)
215
+ ├── tests/ # Test files
216
+ ├── package.json
217
+ ├── tsconfig.json
218
+ └── README.md
219
+ ```
220
+
221
+ ### Development Workflow
222
+
223
+ 1. **Create a feature branch:**
224
+ ```bash
225
+ git checkout -b feature/your-feature-name
226
+ ```
227
+
228
+ 2. **Make your changes:**
229
+ - Add new tools in `src/tools/`
230
+ - Update types in `src/types/`
231
+ - Add tests for new functionality
232
+ - Update CHANGELOG.md
233
+
234
+ 3. **Test your changes:**
235
+ ```bash
236
+ # Build
237
+ npm run build
238
+
239
+ # Test with MCP Inspector
240
+ npx @modelcontextprotocol/inspector node build/index.js
241
+
242
+ # Or test with your MCP client
243
+ ```
244
+
245
+ 4. **Commit your changes:**
246
+ ```bash
247
+ git add .
248
+ git commit -m "feat: add new feature"
249
+ ```
250
+
251
+ **Commit message format:**
252
+ - `feat:` New features
253
+ - `fix:` Bug fixes
254
+ - `docs:` Documentation changes
255
+ - `refactor:` Code refactoring
256
+ - `test:` Test additions/changes
257
+ - `chore:` Maintenance tasks
258
+
259
+ 5. **Push and create PR:**
260
+ ```bash
261
+ git push origin feature/your-feature-name
262
+ ```
263
+
264
+ Create a pull request on GitHub with:
265
+ - Clear description of changes
266
+ - Testing steps performed
267
+ - Any breaking changes noted
268
+
269
+ ### Testing
316
270
 
317
- ## 🤝 Supported AI Agents
318
-
319
- The Hawkeye MCP Server works with any MCP-compatible AI agent:
320
-
321
- - ✅ **Cursor** (macOS, Windows, Linux) - **Recommended for IDE integration**
322
- - ✅ **Claude Code** (CLI tool - macOS, Windows, Linux) - **Recommended for terminal workflows**
323
- - ✅ **Claude Desktop** (macOS, Windows)
324
- - ✅ **Continue.dev** (VS Code extension)
325
- - ✅ Any other MCP-compatible agent
326
-
327
- See the [Installation Guide](./INSTALLATION.md) for setup instructions for each agent.
328
-
329
- ## 🐛 Troubleshooting
330
-
331
- ### Authentication Errors
332
-
333
- If you see authentication errors:
334
-
335
- 1. Verify your `HAWKEYE_EMAIL` and `HAWKEYE_PASSWORD` are correct
336
- 2. Check that `HAWKEYE_BASE_URL` points to the correct Hawkeye instance
337
- 3. Ensure your account has API access
338
-
339
- ### Connection Issues
340
-
341
- If the MCP server isn't connecting:
342
-
343
- 1. Make sure Node.js >= 20.0.0 is installed: `node --version`
344
- 2. Verify the server is accessible: test with `npx hawkeye-mcp-server`
345
- 3. Check your AI agent's MCP configuration
346
- 4. Review logs for detailed error messages
347
-
348
- ### Investigation Timeouts
349
-
350
- If investigations are timing out:
351
-
352
- 1. Increase `HAWKEYE_MAX_POLL_ATTEMPTS` in your environment
353
- 2. Check your network connection
354
- 3. Verify the investigation is running in Hawkeye
355
-
356
- For more troubleshooting tips, see the [Installation Guide](./INSTALLATION.md#troubleshooting).
357
-
358
- ## 📊 Examples
359
-
360
- ### Example 1: Using in Cursor IDE
361
-
362
- ```
363
- You: "List all my Hawkeye projects"
364
-
365
- Cursor: *Shows your available projects with sync status*
366
-
367
- You: "Show me all uninvestigated incidents from the Variation1 project"
368
-
369
- Cursor: *Lists uninvestigated incidents*
370
-
371
- You: "Investigate the most recent one"
372
-
373
- Cursor: *Creates investigation and returns detailed RCA*
271
+ ```bash
272
+ # Run all tests
273
+ npm test
374
274
 
375
- You: "Can you dig deeper into the network issues mentioned?"
275
+ # Test specific file
276
+ node tests/test-your-feature.js
376
277
 
377
- Cursor: *Continues investigation with follow-up analysis*
278
+ # Test with MCP Inspector (interactive)
279
+ npx @modelcontextprotocol/inspector node build/index.js
378
280
  ```
379
281
 
380
- ### Example 2: Find and Investigate Uninvestigated Incidents
282
+ ### Building and Publishing
381
283
 
284
+ **Building:**
285
+ ```bash
286
+ npm run build
382
287
  ```
383
- You: "Show me all uninvestigated P1 incidents from last week"
384
288
 
385
- Agent: *Lists uninvestigated P1 incidents*
289
+ **Publishing to npm:**
290
+ ```bash
291
+ # Update version in package.json
292
+ npm version patch # or minor, or major
386
293
 
387
- You: "Investigate the first one"
294
+ # Build
295
+ npm run build
388
296
 
389
- Agent: *Creates investigation and returns RCA*
297
+ # Publish
298
+ npm publish
390
299
  ```
391
300
 
392
- ### Example 2: Get Project Analytics
301
+ **Note:** Only maintainers can publish to npm.
393
302
 
394
- ```
395
- You: "What's our MTTR and how much time has Hawkeye saved us?"
303
+ ### Code Style
396
304
 
397
- Agent: *Returns incident report with metrics*
305
+ - Use TypeScript for all new code
306
+ - Follow existing code patterns
307
+ - Add JSDoc comments for public APIs
308
+ - Use meaningful variable names
309
+ - Keep functions focused and small
398
310
 
399
- Result:
400
- - Average MTTR: 45 minutes
401
- - Total time saved: 234 hours
402
- - Noise reduction: 67%
403
- - Total investigations: 156
404
- ```
311
+ ### Adding New Tools
405
312
 
406
- ### Example 3: Get RCA with Corrective Actions
313
+ 1. **Create tool file in `src/tools/`:**
314
+ ```typescript
315
+ export const toolName = {
316
+ name: 'hawkeye_tool_name',
317
+ description: 'Tool description',
318
+ inputSchema: {
319
+ type: 'object',
320
+ properties: {
321
+ // Define parameters
322
+ },
323
+ required: []
324
+ }
325
+ };
326
+ ```
407
327
 
408
- ```
409
- You: "Show me the RCA for session abc-123"
410
-
411
- Agent: *Returns comprehensive analysis including:*
412
-
413
- **Root Cause:** Application querying non-existent table "ghosts" from IP 172.31.64.56
414
-
415
- **Corrective Actions:**
416
- ```sh
417
- # Example of checking application deployment or configuration
418
- ssh user@172.31.64.56
419
- # Locate and examine the application's database query configuration
420
- grep -r 'ghosts' /path/to/application/
421
- # Update configuration to reference the correct table
422
- vi /path/to/application/config/database.cfg
423
- # Restart application to apply changes
424
- systemctl restart app_service
425
- ```
328
+ 2. **Implement handler in `src/index.ts`:**
329
+ ```typescript
330
+ case 'hawkeye_tool_name':
331
+ // Implementation
332
+ break;
333
+ ```
426
334
 
427
- **Time Savings:** 17 minutes (Manual: 25min → Hawkeye: 8min)
335
+ 3. **Update documentation:**
336
+ - Add to TOOLS_REFERENCE.md
337
+ - Update tool count in README.md
338
+ - Add examples if needed
428
339
 
429
- You: "What's the quality score for this investigation?"
340
+ 4. **Add tests:**
341
+ - Create test file in `tests/`
342
+ - Test both success and error cases
430
343
 
431
- Agent: *Uses hawkeye_get_rca_score - Returns:*
432
- - Accuracy: 66% (Root cause ✓ | Impact ✗ | Timeline ✓)
433
- - Completeness: 57% (Data sources: 80% | Remediation: 70%)
434
- - Trust without review: Maybe
435
- ```
344
+ ### Documentation Updates
436
345
 
437
- ### Example 4: Deep Dive into Investigation Reasoning
346
+ If your changes affect the documentation site:
438
347
 
439
- ```
440
- You: "How did you arrive at that conclusion?"
348
+ 1. Documentation lives in separate repo: [neubirdai/hawkeye-mcp-docs](https://github.com/neubirdai/hawkeye-mcp-docs)
349
+ 2. Create PR there with documentation updates
350
+ 3. Link documentation PR in your code PR
441
351
 
442
- Agent: *Uses hawkeye_get_chain_of_thought - Returns reasoning steps*
352
+ ### Getting Help
443
353
 
444
- You: "What data sources did you check?"
354
+ - **Internal Slack:** #hawkeye-mcp channel
355
+ - **Code Questions:** Ask in PR comments
356
+ - **Design Discussions:** Create GitHub issue
445
357
 
446
- Agent: *Uses hawkeye_get_investigation_sources - Returns 24 sources*
447
- ```
358
+ ## 🐛 Troubleshooting
448
359
 
449
- For more examples, see the [Usage Guide](./USAGE.md).
360
+ For detailed troubleshooting, see [Troubleshooting Guide](https://neubirdai.github.io/hawkeye-mcp-docs/troubleshooting/).
450
361
 
451
- ## 🔐 Security & Privacy
362
+ **Common issues:**
452
363
 
453
- - Credentials are only used for authentication with your Hawkeye instance
454
- - No data is sent to third parties
455
- - All communication is over HTTPS
456
- - Tokens are cached securely in memory only
457
- - See [SECURITY.md](./SECURITY.md) for our security policy (if applicable)
364
+ - **Authentication errors:** Verify `HAWKEYE_EMAIL`, `HAWKEYE_PASSWORD`, and `HAWKEYE_BASE_URL`
365
+ - **Tools not showing:** Restart MCP client completely
366
+ - **Investigation timeout:** Check connection sync status, increase `HAWKEYE_MAX_POLL_ATTEMPTS`
458
367
 
459
368
  ## 📝 Changelog
460
369
 
@@ -462,17 +371,15 @@ See [CHANGELOG.md](./CHANGELOG.md) for version history and release notes.
462
371
 
463
372
  ## 🤝 Support
464
373
 
465
- Need help? Have questions?
466
-
467
- - **Email**: support@neubird.ai
468
- - **Documentation**: [Full Documentation](./INSTALLATION.md)
469
- - **Issues**: For bug reports and feature requests, contact support@neubird.ai
374
+ - **Documentation:** [https://neubirdai.github.io/hawkeye-mcp-docs](https://neubirdai.github.io/hawkeye-mcp-docs)
375
+ - **Email:** support@neubird.ai
376
+ - **Website:** [https://neubird.ai](https://neubird.ai)
470
377
 
471
378
  ## 📄 License
472
379
 
473
380
  MIT License - see [LICENSE](./LICENSE) file for details.
474
381
 
475
- Copyright (c) 2024 Neubird AI
382
+ Copyright © 2024 NeuBird AI
476
383
 
477
384
  ## 🙏 Acknowledgments
478
385
 
@@ -484,5 +391,4 @@ Built with:
484
391
 
485
392
  ---
486
393
 
487
- **Made with ❤️ by [Neubird AI](https://neubird.ai)** | Powered by Hawkeye
488
-
394
+ **Made with ❤️ by [NeuBird AI](https://neubird.ai)** | [Documentation](https://neubirdai.github.io/hawkeye-mcp-docs) | [npm](https://www.npmjs.com/package/hawkeye-mcp-server)