midnight-mcp 0.2.2 → 0.2.4
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 +32 -25
- package/dist/bin.js +3 -3
- package/dist/{chunk-S7G4OHA4.js → chunk-5DMOVW6Q.js} +1007 -18
- package/dist/{chunk-HOWO4K5A.js → chunk-KB6HV57P.js} +46 -6
- package/dist/db-K7ADM57F.js +7 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/db-YDGUWI5K.js +0 -7
package/README.md
CHANGED
|
@@ -8,6 +8,33 @@
|
|
|
8
8
|
|
|
9
9
|
MCP server that gives AI assistants access to Midnight blockchain—search contracts, analyze code, and explore documentation.
|
|
10
10
|
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- **Node.js 20+** (LTS recommended)
|
|
14
|
+
|
|
15
|
+
Check your version: `node --version`
|
|
16
|
+
|
|
17
|
+
<details>
|
|
18
|
+
<summary><strong>Using nvm?</strong> Click for Claude Desktop setup</summary>
|
|
19
|
+
|
|
20
|
+
If you use nvm, Claude Desktop may not see your nvm-managed Node. Use this config instead:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"midnight": {
|
|
26
|
+
"command": "/bin/sh",
|
|
27
|
+
"args": [
|
|
28
|
+
"-c",
|
|
29
|
+
"source ~/.nvm/nvm.sh && nvm use 20 >/dev/null 2>&1 && npx -y midnight-mcp@latest"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
</details>
|
|
37
|
+
|
|
11
38
|
## Quick Start
|
|
12
39
|
|
|
13
40
|
### Claude Desktop
|
|
@@ -71,44 +98,24 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
|
71
98
|
|
|
72
99
|
**No API keys required.** Restart your editor after adding the config.
|
|
73
100
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Using `midnight-mcp@latest` in your config ensures you get updates automatically on restart.
|
|
77
|
-
|
|
78
|
-
**Already using an older version without `@latest`?** Update your config manually:
|
|
79
|
-
|
|
80
|
-
```diff
|
|
81
|
-
- "args": ["-y", "midnight-mcp"]
|
|
82
|
-
+ "args": ["-y", "midnight-mcp@latest"]
|
|
83
|
-
```
|
|
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.
|
|
101
|
+
> **Why `@latest`?** Unlike cached npx packages that never auto-update, `@latest` ensures you get new features and fixes on each restart. If upgrading from an older config without `@latest`, also clear your npx cache: `rm -rf ~/.npm/_npx`
|
|
95
102
|
|
|
96
103
|
---
|
|
97
104
|
|
|
98
105
|
## What's Included
|
|
99
106
|
|
|
100
|
-
###
|
|
107
|
+
### 28 Tools
|
|
101
108
|
|
|
102
109
|
| Category | Tools | Description |
|
|
103
110
|
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
104
|
-
| **Search** | `search-compact`, `search-typescript`, `search-docs`
|
|
111
|
+
| **Search** | `search-compact`, `search-typescript`, `search-docs`, `fetch-docs` | Semantic search + live docs fetching |
|
|
105
112
|
| **Analysis** | `analyze-contract`, `explain-circuit`, `extract-contract-structure` | Static analysis with 15+ checks (P0-P2 severity) |
|
|
106
113
|
| **Repository** | `get-file`, `list-examples`, `get-latest-updates` | Access files and examples |
|
|
107
114
|
| **Versioning** | `get-version-info`, `check-breaking-changes`, `get-migration-guide`, `get-file-at-version`, `compare-syntax`, `get-latest-syntax` | Version tracking and migration |
|
|
108
115
|
| **AI Generation** | `generate-contract`, `review-contract`, `document-contract` | AI-powered code generation _(requires sampling)_ |
|
|
109
116
|
| **Compound** | `upgrade-check`, `get-repo-context` | Multi-step operations _(saves 50-70% tokens)_ |
|
|
110
117
|
| **Health** | `health-check`, `get-status`, `check-version` | Server status and version checking |
|
|
111
|
-
| **Discovery** | `list-tool-categories`, `list-category-tools`
|
|
118
|
+
| **Discovery** | `list-tool-categories`, `list-category-tools`, `suggest-tool` | Explore available tools and get recommendations |
|
|
112
119
|
|
|
113
120
|
All tools are prefixed with `midnight-` (e.g., `midnight-search-compact`).
|
|
114
121
|
|
|
@@ -116,7 +123,7 @@ All tools are prefixed with `midnight-` (e.g., `midnight-search-compact`).
|
|
|
116
123
|
|
|
117
124
|
| Capability | Feature |
|
|
118
125
|
| --------------- | ----------------------------------------------- |
|
|
119
|
-
| **Tools** |
|
|
126
|
+
| **Tools** | 28 tools with `listChanged` notifications |
|
|
120
127
|
| **Resources** | 9 embedded resources with subscription support |
|
|
121
128
|
| **Prompts** | 5 workflow prompts |
|
|
122
129
|
| **Logging** | Client-controllable log level |
|
package/dist/bin.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
startHttpServer,
|
|
4
4
|
startServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5DMOVW6Q.js";
|
|
6
6
|
import {
|
|
7
7
|
setOutputFormat
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KB6HV57P.js";
|
|
9
9
|
|
|
10
10
|
// src/bin.ts
|
|
11
11
|
import { config } from "dotenv";
|
|
@@ -13,7 +13,7 @@ import { resolve } from "path";
|
|
|
13
13
|
import yargs from "yargs";
|
|
14
14
|
import { hideBin } from "yargs/helpers";
|
|
15
15
|
config({ path: resolve(process.cwd(), ".env") });
|
|
16
|
-
var CURRENT_VERSION = "0.2.
|
|
16
|
+
var CURRENT_VERSION = "0.2.4";
|
|
17
17
|
process.on("uncaughtException", (error) => {
|
|
18
18
|
console.error("Uncaught exception:", error);
|
|
19
19
|
process.exit(1);
|