midnight-mcp 0.1.37 → 0.1.38
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/README.md +15 -6
- package/dist/server.js +15 -14
- package/dist/tools/health.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,19 +71,28 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
|
71
71
|
|
|
72
72
|
**No API keys required.** Restart your editor after adding the config.
|
|
73
73
|
|
|
74
|
-
###
|
|
74
|
+
### Updating to Latest Version
|
|
75
75
|
|
|
76
|
-
Using `midnight-mcp@latest` ensures you
|
|
76
|
+
Using `midnight-mcp@latest` in your config ensures you get updates automatically on restart.
|
|
77
77
|
|
|
78
|
-
**
|
|
79
|
-
|
|
80
|
-
Or manually update your config:
|
|
78
|
+
**Already using an older version without `@latest`?** Update your config manually:
|
|
81
79
|
|
|
82
80
|
```diff
|
|
83
81
|
- "args": ["-y", "midnight-mcp"]
|
|
84
82
|
+ "args": ["-y", "midnight-mcp@latest"]
|
|
85
83
|
```
|
|
86
84
|
|
|
85
|
+
**Then clear npm cache and restart:**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Clear npx cache (required to fetch new version)
|
|
89
|
+
rm -rf ~/.npm/_npx
|
|
90
|
+
|
|
91
|
+
# Restart your editor (Cmd+Q on Mac, then reopen)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **Note:** AI agents cannot auto-update your config because they run in a sandboxed environment without access to your local filesystem.
|
|
95
|
+
|
|
87
96
|
---
|
|
88
97
|
|
|
89
98
|
## What's Included
|
|
@@ -98,7 +107,7 @@ Or manually update your config:
|
|
|
98
107
|
| **Versioning** | `get-version-info`, `check-breaking-changes`, `get-migration-guide`, `get-file-at-version`, `compare-syntax`, `get-latest-syntax` | Version tracking and migration |
|
|
99
108
|
| **AI Generation** | `generate-contract`, `review-contract`, `document-contract` | AI-powered code generation _(requires sampling)_ |
|
|
100
109
|
| **Compound** | `upgrade-check`, `get-repo-context` | Multi-step operations _(saves 50-70% tokens)_ |
|
|
101
|
-
| **Health** | `health-check`, `get-status`, `check-version
|
|
110
|
+
| **Health** | `health-check`, `get-status`, `check-version` | Server status and version checking |
|
|
102
111
|
| **Discovery** | `list-tool-categories`, `list-category-tools` | Explore available tools |
|
|
103
112
|
|
|
104
113
|
All tools are prefixed with `midnight-` (e.g., `midnight-search-compact`).
|
package/dist/server.js
CHANGED
|
@@ -354,24 +354,25 @@ function registerToolHandlers(server) {
|
|
|
354
354
|
// Include prominent update prompt in ALL responses when outdated
|
|
355
355
|
const updateWarning = getUpdateWarning();
|
|
356
356
|
if (updateWarning && versionCheckResult.isOutdated) {
|
|
357
|
-
// Prepend
|
|
357
|
+
// Prepend update notice with MANUAL instructions (auto-update not possible in sandbox)
|
|
358
358
|
const updatePrompt = {
|
|
359
|
-
"🚨
|
|
360
|
-
message: `You are using
|
|
361
|
-
|
|
362
|
-
instruction: "
|
|
363
|
-
tool: "midnight-auto-update-config",
|
|
359
|
+
"🚨 UPDATE AVAILABLE": {
|
|
360
|
+
message: `You are using v${CURRENT_VERSION} but v${versionCheckResult.latestVersion} is available.`,
|
|
361
|
+
userAction: {
|
|
362
|
+
instruction: "Tell the user to update manually. Auto-update is NOT possible because you run in a sandboxed environment without access to local files.",
|
|
364
363
|
steps: [
|
|
365
|
-
"1.
|
|
366
|
-
"2.
|
|
367
|
-
"3.
|
|
368
|
-
"4. Save the file",
|
|
369
|
-
"5. Tell user: 'I've updated your config! Please restart your editor to use the latest version.'",
|
|
364
|
+
"1. Edit config file to use 'midnight-mcp@latest' instead of 'midnight-mcp'",
|
|
365
|
+
"2. Run: rm -rf ~/.npm/_npx (to clear npm cache)",
|
|
366
|
+
"3. Restart the editor completely (Cmd+Q on Mac, then reopen)",
|
|
370
367
|
],
|
|
368
|
+
configLocations: {
|
|
369
|
+
claudeDesktop: "~/Library/Application Support/Claude/claude_desktop_config.json",
|
|
370
|
+
cursor: ".cursor/mcp.json",
|
|
371
|
+
vscode: ".vscode/mcp.json",
|
|
372
|
+
windsurf: "~/.codeium/windsurf/mcp_config.json",
|
|
373
|
+
},
|
|
371
374
|
},
|
|
372
|
-
|
|
373
|
-
ifAutoUpdateFails: "Ask user to manually update config to use midnight-mcp@latest",
|
|
374
|
-
},
|
|
375
|
+
note: "If user already has @latest in config, they just need to clear cache (rm -rf ~/.npm/_npx) and restart.",
|
|
375
376
|
},
|
|
376
377
|
result,
|
|
377
378
|
};
|
package/dist/tools/health.js
CHANGED
|
@@ -332,9 +332,9 @@ export const healthTools = [
|
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
334
|
name: "midnight-auto-update-config",
|
|
335
|
-
description: "
|
|
336
|
-
"
|
|
337
|
-
"
|
|
335
|
+
description: "⚠️ DEPRECATED: Auto-update is NOT possible because AI agents run in sandboxed environments without access to local filesystems. " +
|
|
336
|
+
"Instead, tell users to manually update their config to use midnight-mcp@latest, then run: rm -rf ~/.npm/_npx && restart their editor. " +
|
|
337
|
+
"This tool only returns config file paths for reference.",
|
|
338
338
|
inputSchema: {
|
|
339
339
|
type: "object",
|
|
340
340
|
properties: {},
|