mne-docs-mcp 1.0.18 → 1.0.20

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 (2) hide show
  1. package/README.md +67 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -11,7 +11,8 @@ cd mne-docs-mcp
11
11
  npm install
12
12
 
13
13
  # Set GitHub token (required)
14
- export MNE_GITHUB_TOKEN=ghp_your_token_here
14
+ export MNE_GITHUB_TOKEN=ghp_your_token_here # Linux/macOS
15
+ $env:MNE_GITHUB_TOKEN="ghp_your_token_here" # Windows PowerShell
15
16
 
16
17
  # Start server
17
18
  npm start
@@ -19,6 +20,8 @@ npm start
19
20
 
20
21
  Server runs on `http://localhost:8000`. Verify with `curl http://localhost:8000/health`.
21
22
 
23
+ > **Prerequisites:** Node.js ≥ 20 and Python 3 (used for AST parsing — no pip packages required).
24
+
22
25
  ## MCP Client Integration
23
26
 
24
27
  ### Claude Desktop / Kiro / Claude Code
@@ -70,6 +73,14 @@ MNE_TRANSPORT=http npm start
70
73
  # Connect to http://localhost:8000/mcp
71
74
  ```
72
75
 
76
+ **HTTP endpoints:**
77
+
78
+ | Endpoint | Description |
79
+ |----------|-------------|
80
+ | `POST /mcp` | MCP protocol (JSON-RPC) |
81
+ | `GET /health` | Health check — returns `{"status":"ok"}` |
82
+ | `GET /metrics` | Runtime metrics (request counts, cache hit rate, GitHub rate limit) |
83
+
73
84
  ### Docker
74
85
 
75
86
  ```bash
@@ -128,14 +139,15 @@ All tools support a `package` parameter to query across the MNE ecosystem: `mne-
128
139
 
129
140
  | Variable | Description | Default |
130
141
  |----------|-------------|---------|
131
- | `MNE_GITHUB_TOKEN` | GitHub PAT (required) | - |
132
- | `MNE_PORT` | Server port | `8000` |
142
+ | `MNE_GITHUB_TOKEN` | GitHub PAT (**required**) | |
143
+ | `MNE_PORT` | Server port (HTTP mode) | `8000` |
133
144
  | `MNE_TRANSPORT` | `http` or `stdio` | `http` |
134
145
  | `MNE_DEFAULT_PACKAGE` | Default MNE package | `mne-python` |
135
- | `MNE_PYTHON_PATH` | Python executable | `python` (Win) / `python3` (Unix) |
136
- | `MNE_LOG_LEVEL` | `debug`/`info`/`warn`/`error` | `info` |
146
+ | `MNE_PYTHON_PATH` | Python executable path | `python` (Win) / `python3` (Unix) |
147
+ | `MNE_LOG_LEVEL` | `debug` / `info` / `warn` / `error` | `info` |
148
+ | `MNE_LOG_JSON` | Emit logs as JSON (useful for log aggregators) | `false` |
137
149
 
138
- See `.env.example` for all options including cache TTLs and timeouts.
150
+ See `.env.example` for advanced options: cache TTLs (`MNE_CACHE_TTL_MINUTES`, `MNE_SYMBOL_CACHE_TTL_MINUTES`, `MNE_FILE_CACHE_TTL_MINUTES`), timeouts (`MNE_GITHUB_TIMEOUT`, `MNE_PARSER_TIMEOUT`, `MNE_FORUM_TIMEOUT`), and API base URLs.
139
151
 
140
152
  ## Architecture
141
153
 
@@ -166,26 +178,65 @@ npm run lint # ESLint
166
178
 
167
179
  ## Releasing
168
180
 
169
- First-time setup (one-time only):
181
+ ### One-command release
182
+
170
183
  ```bash
171
- npm login
172
- npm publish
184
+ npm run release:patch # 1.0.0 → 1.0.1 (bug fixes)
185
+ npm run release:minor # 1.0.0 → 1.1.0 (new features)
186
+ npm run release:major # 1.0.0 → 2.0.0 (breaking changes)
173
187
  ```
174
188
 
175
- Then for all future releases:
176
- ```bash
177
- npm run release:patch # 1.0.0 → 1.0.1
178
- npm run release:minor # 1.0.0 1.1.0
179
- npm run release:major # 1.0.0 2.0.0
189
+ This script (`scripts/release.js`) does everything locally:
190
+ 1. Bumps version in `package.json` and `server.json`
191
+ 2. Commits both files
192
+ 3. Creates a `v*` git tag
193
+ 4. Pushes the commit and tag
194
+
195
+ Pushing the tag triggers the release pipeline automatically — no further action needed.
196
+
197
+ ### CI/CD pipeline
198
+
199
+ Two GitHub Actions workflows handle all automation:
200
+
201
+ **`ci.yml`** — runs on every push and pull request:
202
+ - TypeScript type checking + ESLint
203
+ - Full test suite (Vitest)
204
+ - Build verification
205
+ - Docker image build test (no push)
206
+
207
+ **`release.yml`** — runs only when a `v*` tag is pushed:
208
+
209
+ ```
210
+ test ──┬── docker (linux/amd64) ──┐
211
+ │ ├── docker manifest (semver tags) ──┐
212
+ │── docker (linux/arm64) ──┘ ├── GitHub Release
213
+ │ │
214
+ ├── npm publish ── MCP Registry ──────────────────────────────┘
180
215
  ```
181
216
 
182
- This bumps versions, commits, tags, and pushes. GitHub Actions then publishes to npm and MCP Registry automatically.
217
+ Published artefacts per release:
218
+
219
+ | Platform | Tag / identifier |
220
+ |----------|-----------------|
221
+ | GHCR Docker | `ghcr.io/weiyongxu/mne-docs-mcp:1.x.y`, `:1.x`, `:latest` |
222
+ | npm | `mne-docs-mcp@1.x.y` |
223
+ | MCP Registry | `io.github.weiyongxu/mne-docs@1.x.y` |
224
+ | GitHub Releases | auto-generated changelog |
225
+
226
+ ### Required repository secrets
227
+
228
+ | Secret | Purpose |
229
+ |--------|---------|
230
+ | `NPM_TOKEN` | Publish to npm registry |
231
+ | `GITHUB_TOKEN` | Push Docker to GHCR + create GitHub Release (auto-provided) |
232
+
233
+ OIDC is used for MCP Registry authentication (no extra secret needed).
183
234
 
184
235
  ## Troubleshooting
185
236
 
186
237
  - **Rate limits:** Ensure `MNE_GITHUB_TOKEN` is set
187
238
  - **Parser fails:** Check Python 3 is installed (path auto-detected per platform)
188
- - **Test setup:** Run `npx tsx examples/mcp-client.ts` to verify
239
+ - **Test setup:** Run `npx tsx examples/mcp-client.ts` to verify (requires dev dependencies — run `npm install` first)
189
240
 
190
241
  ## Security
191
242
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mne-docs-mcp",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "mcpName": "io.github.weiyongxu/mne-docs",
5
5
  "description": "MCP server providing access to MNE-Python documentation, source code, GitHub issues, and community forum",
6
6
  "type": "module",