@j0hanz/cortex-mcp 0.1.3 → 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/README.md +93 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cortex MCP
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/cortex-mcp) [](https://nodejs.org) [](https://www.typescriptlang.org) [](https://modelcontextprotocol.io) [](LICENSE)
|
|
3
|
+
[](https://www.npmjs.com/package/@j0hanz/cortex-mcp) [](https://github.com/j0hanz/cortex-mcp/pkgs/container/cortex-mcp) [](https://nodejs.org) [](https://www.typescriptlang.org) [](https://modelcontextprotocol.io) [](LICENSE)
|
|
4
4
|
|
|
5
5
|
[](vscode:mcp/install?config=%7B%22name%22%3A%22cortex-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22cortex-mcp%40latest%22%5D%7D) [](vscode-insiders:mcp/install?config=%7B%22name%22%3A%22cortex-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22cortex-mcp%40latest%22%5D%7D) [](https://cursor.com/install-mcp?name=cortex-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNvcnRleC1tY3BAbGF0ZXN0Il19)
|
|
6
6
|
|
|
@@ -74,6 +74,13 @@ npx -y cortex-mcp@latest
|
|
|
74
74
|
npx -y cortex-mcp@latest
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
### Docker
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
docker pull ghcr.io/j0hanz/cortex-mcp:latest
|
|
81
|
+
docker run --rm -i ghcr.io/j0hanz/cortex-mcp:latest
|
|
82
|
+
```
|
|
83
|
+
|
|
77
84
|
### From Source
|
|
78
85
|
|
|
79
86
|
```bash
|
|
@@ -226,6 +233,22 @@ Add to your Cursor MCP settings:
|
|
|
226
233
|
|
|
227
234
|
</details>
|
|
228
235
|
|
|
236
|
+
<details>
|
|
237
|
+
<summary><strong>Docker</strong></summary>
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"mcpServers": {
|
|
242
|
+
"cortex-mcp": {
|
|
243
|
+
"command": "docker",
|
|
244
|
+
"args": ["run", "--rm", "-i", "ghcr.io/j0hanz/cortex-mcp:latest"]
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
</details>
|
|
251
|
+
|
|
229
252
|
## Security
|
|
230
253
|
|
|
231
254
|
- **Stdio Isolation**: The server writes all logs to `stderr` to avoid corrupting the JSON-RPC stream on `stdout`.
|
|
@@ -258,6 +281,75 @@ The project uses a custom task runner (`scripts/tasks.mjs`) for build orchestrat
|
|
|
258
281
|
- **Build**: `npm run build` generates artifacts in `dist/`.
|
|
259
282
|
- **Publish**: `npm run prepublishOnly` ensures linting, type-checking, and building before publish.
|
|
260
283
|
|
|
284
|
+
### Automated Releases
|
|
285
|
+
|
|
286
|
+
Releases are fully automated via a single GitHub Actions workflow (`release.yml`). No manual version edits are needed.
|
|
287
|
+
|
|
288
|
+
**Trigger a release:**
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Via GitHub CLI
|
|
292
|
+
gh workflow run release.yml -f bump=patch # or minor / major
|
|
293
|
+
|
|
294
|
+
# Custom pre-release version
|
|
295
|
+
gh workflow run release.yml -f custom_version=2.0.0-beta.1
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Or use the GitHub UI: **Actions** → **Release** → **Run workflow** → select bump type.
|
|
299
|
+
|
|
300
|
+
**What the workflow does:**
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
workflow_dispatch (patch/minor/major)
|
|
304
|
+
│
|
|
305
|
+
▼
|
|
306
|
+
release ── bump versions → validate → commit → tag → GitHub Release
|
|
307
|
+
│
|
|
308
|
+
├──► publish-npm ──► publish-mcp (sequential: MCP Registry needs npm package)
|
|
309
|
+
│
|
|
310
|
+
└──► publish-docker (parallel with npm)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
1. **Bump** — Updates `package.json`, `package-lock.json`, and `server.json` atomically
|
|
314
|
+
2. **Validate** — Runs lint, type-check, tests, and build
|
|
315
|
+
3. **Tag & Release** — Commits, creates a git tag, and a GitHub Release with auto-generated notes
|
|
316
|
+
4. **Publish to npm** — Uses OIDC Trusted Publishing (no `NPM_TOKEN` secret needed), with `--provenance` for signed SLSA attestations
|
|
317
|
+
5. **Publish to MCP Registry** — Registers the new version via `mcp-publisher` with GitHub OIDC
|
|
318
|
+
6. **Publish to Docker** — Builds and pushes a multi-platform image (`linux/amd64`, `linux/arm64`) to `ghcr.io/j0hanz/cortex-mcp`
|
|
319
|
+
|
|
320
|
+
### Docker Image
|
|
321
|
+
|
|
322
|
+
The project includes a multi-stage `Dockerfile` optimized for MCP servers:
|
|
323
|
+
|
|
324
|
+
- **Builder stage**: Installs dependencies with `--ignore-scripts` (avoids `prepare` running before source is copied), rebuilds native modules, compiles TypeScript, then prunes dev dependencies
|
|
325
|
+
- **Release stage**: Minimal `node:24-alpine` image running as non-root `mcp` user
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
# Build locally
|
|
329
|
+
docker build -t cortex-mcp .
|
|
330
|
+
|
|
331
|
+
# Run locally
|
|
332
|
+
docker run --rm -i cortex-mcp
|
|
333
|
+
|
|
334
|
+
# Or use docker-compose
|
|
335
|
+
docker compose up --build
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Verify a release
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# npm
|
|
342
|
+
npm view @j0hanz/cortex-mcp dist-tags
|
|
343
|
+
|
|
344
|
+
# Docker
|
|
345
|
+
docker pull ghcr.io/j0hanz/cortex-mcp:latest
|
|
346
|
+
|
|
347
|
+
# MCP protocol handshake
|
|
348
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \
|
|
349
|
+
| npx -y @j0hanz/cortex-mcp@latest 2>/dev/null \
|
|
350
|
+
| head -1 | jq .result.serverInfo
|
|
351
|
+
```
|
|
352
|
+
|
|
261
353
|
## Troubleshooting
|
|
262
354
|
|
|
263
355
|
- **No output**: The server uses `stdio`. Ensure your client is capturing `stdout` correctly. Check `stderr` for logs.
|