mn-docs-mcp 0.1.0 → 0.1.7
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/.github/workflows/release.yml +28 -0
- package/README.md +19 -35
- package/package.json +14 -13
- package/src/definitions/JSBPopupMenu.h +0 -0
- package/src/definitions/JSBPopupMenuItem.h +0 -0
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -11
- /package/{scripts/mcp → mcp}/build-index.mjs +0 -0
- /package/{scripts/mcp → mcp}/cli.mjs +0 -0
- /package/{scripts/mcp → mcp}/lib.mjs +0 -0
- /package/{scripts/mcp → mcp}/server-http.mjs +0 -0
- /package/{scripts/mcp → mcp}/server.mjs +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Required for OIDC
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: '24'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
22
|
+
- uses: pnpm/action-setup@v4
|
|
23
|
+
with:
|
|
24
|
+
version: '10'
|
|
25
|
+
- run: pnpm install --frozen-lockfile
|
|
26
|
+
- run: pnpm publish --provenance --access public --no-git-checks
|
|
27
|
+
env:
|
|
28
|
+
NODE_AUTH_TOKEN: ""
|
package/README.md
CHANGED
|
@@ -24,54 +24,38 @@ pnpm preview # 预览构建结果
|
|
|
24
24
|
|
|
25
25
|
## 本地MCP搜索
|
|
26
26
|
|
|
27
|
-
本项目内置一个本地MCPServer,支持stdio与
|
|
27
|
+
本项目内置一个本地MCPServer,支持stdio与HTTPStream两种方式,返回纯文本片段,适合AI直接调用。
|
|
28
28
|
|
|
29
29
|
embedding模型使用本地BGE-small-zh-v1.5(ONNX),首次启动会自动下载到 `.mcp/models`。模型文件约95.8MB,向量维度为512。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
### 快速开始(npx)
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
MCP_HTTP_PORT=8788
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
如果你需要代理或镜像下载模型:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
export HTTPS_PROXY=http://127.0.0.1:7890
|
|
41
|
-
export HF_ENDPOINT=https://hf-mirror.com
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 启动stdio版MCP
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
pnpm mcp
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 启动HTTP版MCP
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
pnpm mcp-http
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
以上两种启动方式会在检测到文档更新时自动重建索引。
|
|
33
|
+
### MCP配置示例(npx)
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"mn-docs": {
|
|
39
|
+
"command": "npx",
|
|
40
|
+
"args": [
|
|
41
|
+
"mn-docs-mcp"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
62
46
|
```
|
|
63
47
|
|
|
64
|
-
### MCP
|
|
48
|
+
### MCP配置示例(本地clone)
|
|
65
49
|
|
|
66
50
|
```json
|
|
67
51
|
{
|
|
68
52
|
"mcpServers": {
|
|
69
|
-
"mn-docs": {
|
|
70
|
-
"command": "
|
|
53
|
+
"mn-docs-local": {
|
|
54
|
+
"command": "node",
|
|
71
55
|
"args": [
|
|
72
|
-
"mcp"
|
|
56
|
+
"mcp/cli.mjs"
|
|
73
57
|
],
|
|
74
|
-
"cwd": "path/to/this/repository"
|
|
58
|
+
"cwd": "/path/to/this/repository"
|
|
75
59
|
}
|
|
76
60
|
}
|
|
77
61
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mn-docs-mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"
|
|
6
|
-
"
|
|
4
|
+
"version": "0.1.7",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Temsys-Shen/marginnote-addon-docs.git"
|
|
7
8
|
},
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"start": "astro dev",
|
|
11
|
-
"build": "astro build",
|
|
12
|
-
"preview": "astro preview",
|
|
13
|
-
"astro": "astro",
|
|
14
|
-
"mcp": "MCP_STDIO=1 MCP_SILENT=1 node scripts/mcp/server.mjs",
|
|
15
|
-
"mcp-http": "node scripts/mcp/server-http.mjs",
|
|
16
|
-
"mcp:force-build": "node scripts/mcp/build-index.mjs"
|
|
9
|
+
"bin": {
|
|
10
|
+
"mn-docs-mcp": "mcp/cli.mjs"
|
|
17
11
|
},
|
|
18
12
|
"dependencies": {
|
|
19
13
|
"@astrojs/starlight": "^0.37.4",
|
|
@@ -26,5 +20,12 @@
|
|
|
26
20
|
"sharp": "^0.34.2",
|
|
27
21
|
"undici": "^6.19.8",
|
|
28
22
|
"zod": "^3.25.76"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "astro dev",
|
|
26
|
+
"start": "astro dev",
|
|
27
|
+
"build": "astro build",
|
|
28
|
+
"preview": "astro preview",
|
|
29
|
+
"astro": "astro"
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
+
}
|
|
File without changes
|
|
File without changes
|
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|