@wenyan-md/mcp 1.0.1 → 1.0.2
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 +34 -2
- package/package.json +1 -1
- package/dist/highlight/highlight/styles/atom-one-dark.min.css +0 -1
- package/dist/highlight/highlight/styles/atom-one-light.min.css +0 -1
- package/dist/highlight/highlight/styles/dracula.min.css +0 -8
- package/dist/highlight/highlight/styles/github-dark.min.css +0 -10
- package/dist/highlight/highlight/styles/github.min.css +0 -10
- package/dist/highlight/highlight/styles/monokai.min.css +0 -1
- package/dist/highlight/highlight/styles/solarized-dark.min.css +0 -8
- package/dist/highlight/highlight/styles/solarized-light.min.css +0 -8
- package/dist/highlight/highlight/styles/xcode.min.css +0 -1
- package/dist/highlight/styles/atom-one-dark.min.css +0 -1
- package/dist/highlight/styles/atom-one-light.min.css +0 -1
- package/dist/highlight/styles/dracula.min.css +0 -8
- package/dist/highlight/styles/github-dark.min.css +0 -10
- package/dist/highlight/styles/github.min.css +0 -10
- package/dist/highlight/styles/monokai.min.css +0 -1
- package/dist/highlight/styles/solarized-dark.min.css +0 -8
- package/dist/highlight/styles/solarized-light.min.css +0 -8
- package/dist/highlight/styles/xcode.min.css +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -118
- package/dist/mac_style.css +0 -8
- package/dist/main.js +0 -495
- package/dist/publish.d.ts +0 -2
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -142
- package/dist/resources.d.ts +0 -3
- package/dist/resources.d.ts.map +0 -1
- package/dist/resources.js +0 -42
- package/dist/theme.d.ts +0 -7
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -42
- package/dist/themes/default.css +0 -180
- package/dist/themes/lapis.css +0 -190
- package/dist/themes/maize.css +0 -190
- package/dist/themes/orangeheart.css +0 -180
- package/dist/themes/phycat.css +0 -331
- package/dist/themes/pie.css +0 -236
- package/dist/themes/purple.css +0 -179
- package/dist/themes/rainbow.css +0 -163
- package/dist/themes/themes/default.css +0 -180
- package/dist/themes/themes/lapis.css +0 -190
- package/dist/themes/themes/maize.css +0 -190
- package/dist/themes/themes/orangeheart.css +0 -180
- package/dist/themes/themes/phycat.css +0 -331
- package/dist/themes/themes/pie.css +0 -236
- package/dist/themes/themes/purple.css +0 -179
- package/dist/themes/themes/rainbow.css +0 -163
- package/dist/types.d.ts +0 -10
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,39 @@ https://github.com/user-attachments/assets/2c355f76-f313-48a7-9c31-f0f69e5ec207
|
|
|
27
27
|
|
|
28
28
|
## 使用方式
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### 方式一:本地安装(推荐)
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
npm install -g @wenyan-md/mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### 与 MCP Client 集成
|
|
37
|
+
|
|
38
|
+
在你的 MCP 配置文件中加入以下内容:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"wenyan-mcp": {
|
|
44
|
+
"name": "公众号助手",
|
|
45
|
+
"command": "wenyan-mcp",
|
|
46
|
+
"env": {
|
|
47
|
+
"WECHAT_APP_ID": "your_app_id",
|
|
48
|
+
"WECHAT_APP_SECRET": "your_app_secret"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> 说明:
|
|
56
|
+
>
|
|
57
|
+
> * `WECHAT_APP_ID` 微信公众号平台的 App ID
|
|
58
|
+
> * `WECHAT_APP_SECRET` 微信平台的 App Secret
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### 方式二:编译运行
|
|
31
63
|
|
|
32
64
|
#### 编译
|
|
33
65
|
|
|
@@ -70,7 +102,7 @@ npx tsc -b
|
|
|
70
102
|
|
|
71
103
|
---
|
|
72
104
|
|
|
73
|
-
###
|
|
105
|
+
### 方式三:使用 Docker 运行(推荐)
|
|
74
106
|
|
|
75
107
|
适合部署到服务器环境,或与本地 AI 工具链集成。
|
|
76
108
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenyan-md/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for Wenyan, a Markdown formatting tool that allows AI assistants to apply elegant built-in themes and publish articles directly to 微信公众号.",
|
|
5
5
|
"author": "Lei <caol64@gmail.com> (https://github.com/caol64)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#282c34}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#fafafa}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#282936}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Dracula
|
|
4
|
-
Author: Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#e9e9f4;background:#282936}.hljs ::selection,.hljs::selection{background-color:#4d4f68;color:#e9e9f4}.hljs-comment{color:#626483}.hljs-tag{color:#62d6e8}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#e9e9f4}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#ea51b2}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#b45bcf}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#00f769}.hljs-strong{font-weight:700;color:#00f769}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#ebff87}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#a1efe4}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#62d6e8}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#b45bcf}.hljs-emphasis{color:#b45bcf;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#00f769}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pre{background:#0d1117}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
|
-
Theme: GitHub Dark
|
|
3
|
-
Description: Dark theme as seen on github.com
|
|
4
|
-
Author: github.com
|
|
5
|
-
Maintainer: @Hirse
|
|
6
|
-
Updated: 2021-05-15
|
|
7
|
-
|
|
8
|
-
Outdated base version: https://github.com/primer/github-syntax-dark
|
|
9
|
-
Current colors taken from GitHub's CSS
|
|
10
|
-
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
|
-
Theme: GitHub
|
|
3
|
-
Description: Light theme as seen on github.com
|
|
4
|
-
Author: github.com
|
|
5
|
-
Maintainer: @Hirse
|
|
6
|
-
Updated: 2021-05-15
|
|
7
|
-
|
|
8
|
-
Outdated base version: https://github.com/primer/github-syntax-light
|
|
9
|
-
Current colors taken from GitHub's CSS
|
|
10
|
-
*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#272822}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-number,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attr,.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#002b36}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Solarized Dark
|
|
4
|
-
Author: Ethan Schoonover (modified by aramisgithub)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#93a1a1;background:#002b36}.hljs ::selection,.hljs::selection{background-color:#586e75;color:#93a1a1}.hljs-comment{color:#657b83}.hljs-tag{color:#839496}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#93a1a1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#fdf6e3}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Solarized Light
|
|
4
|
-
Author: Ethan Schoonover (modified by aramisgithub)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#586e75;background:#fdf6e3}.hljs ::selection,.hljs::selection{background-color:#93a1a1;color:#586e75}.hljs-comment{color:#839496}.hljs-tag{color:#657b83}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#586e75}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.xml .hljs-meta{color:silver}.hljs-comment,.hljs-quote{color:#007400}.hljs-attribute,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#aa0d91}.hljs-template-variable,.hljs-variable{color:#3f6e74}.hljs-code,.hljs-meta .hljs-string,.hljs-string{color:#c41a16}.hljs-link,.hljs-regexp{color:#0e0eff}.hljs-bullet,.hljs-number,.hljs-symbol,.hljs-title{color:#1c00cf}.hljs-meta,.hljs-section{color:#643820}.hljs-built_in,.hljs-class .hljs-title,.hljs-params,.hljs-title.class_,.hljs-type{color:#5c2699}.hljs-attr{color:#836c28}.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-selector-class,.hljs-selector-id{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#282c34}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#fafafa}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#282936}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Dracula
|
|
4
|
-
Author: Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (http://github.com/dracula)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#e9e9f4;background:#282936}.hljs ::selection,.hljs::selection{background-color:#4d4f68;color:#e9e9f4}.hljs-comment{color:#626483}.hljs-tag{color:#62d6e8}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#e9e9f4}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#ea51b2}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#b45bcf}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#00f769}.hljs-strong{font-weight:700;color:#00f769}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#ebff87}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#a1efe4}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#62d6e8}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#b45bcf}.hljs-emphasis{color:#b45bcf;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#00f769}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pre{background:#0d1117}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
|
-
Theme: GitHub Dark
|
|
3
|
-
Description: Dark theme as seen on github.com
|
|
4
|
-
Author: github.com
|
|
5
|
-
Maintainer: @Hirse
|
|
6
|
-
Updated: 2021-05-15
|
|
7
|
-
|
|
8
|
-
Outdated base version: https://github.com/primer/github-syntax-dark
|
|
9
|
-
Current colors taken from GitHub's CSS
|
|
10
|
-
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
|
-
Theme: GitHub
|
|
3
|
-
Description: Light theme as seen on github.com
|
|
4
|
-
Author: github.com
|
|
5
|
-
Maintainer: @Hirse
|
|
6
|
-
Updated: 2021-05-15
|
|
7
|
-
|
|
8
|
-
Outdated base version: https://github.com/primer/github-syntax-light
|
|
9
|
-
Current colors taken from GitHub's CSS
|
|
10
|
-
*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#272822}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-number,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attr,.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#002b36}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Solarized Dark
|
|
4
|
-
Author: Ethan Schoonover (modified by aramisgithub)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#93a1a1;background:#002b36}.hljs ::selection,.hljs::selection{background-color:#586e75;color:#93a1a1}.hljs-comment{color:#657b83}.hljs-tag{color:#839496}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#93a1a1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pre{background:#fdf6e3}
|
|
2
|
-
/*!
|
|
3
|
-
Theme: Solarized Light
|
|
4
|
-
Author: Ethan Schoonover (modified by aramisgithub)
|
|
5
|
-
License: ~ MIT (or more permissive) [via base16-schemes-source]
|
|
6
|
-
Maintainer: @highlightjs/core-team
|
|
7
|
-
Version: 2021.09.0
|
|
8
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#586e75;background:#fdf6e3}.hljs ::selection,.hljs::selection{background-color:#93a1a1;color:#586e75}.hljs-comment{color:#839496}.hljs-tag{color:#657b83}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#586e75}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#dc322f}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#cb4b16}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#b58900}.hljs-strong{font-weight:700;color:#b58900}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#859900}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#2aa198}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#268bd2}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6c71c4}.hljs-emphasis{color:#6c71c4;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d33682}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pre{background:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.xml .hljs-meta{color:silver}.hljs-comment,.hljs-quote{color:#007400}.hljs-attribute,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#aa0d91}.hljs-template-variable,.hljs-variable{color:#3f6e74}.hljs-code,.hljs-meta .hljs-string,.hljs-string{color:#c41a16}.hljs-link,.hljs-regexp{color:#0e0eff}.hljs-bullet,.hljs-number,.hljs-symbol,.hljs-title{color:#1c00cf}.hljs-meta,.hljs-section{color:#643820}.hljs-built_in,.hljs-class .hljs-title,.hljs-params,.hljs-title.class_,.hljs-type{color:#5c2699}.hljs-attr{color:#836c28}.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-selector-class,.hljs-selector-id{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}
|
package/dist/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* This is a template MCP server that implements a simple notes system.
|
|
4
|
-
* It demonstrates core MCP concepts like resources and tools by allowing:
|
|
5
|
-
* - Listing notes as resources
|
|
6
|
-
* - Reading individual notes
|
|
7
|
-
* - Creating new notes via a tool
|
|
8
|
-
* - Summarizing all notes via a prompt
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;GAOG"}
|
package/dist/index.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* This is a template MCP server that implements a simple notes system.
|
|
4
|
-
* It demonstrates core MCP concepts like resources and tools by allowing:
|
|
5
|
-
* - Listing notes as resources
|
|
6
|
-
* - Reading individual notes
|
|
7
|
-
* - Creating new notes via a tool
|
|
8
|
-
* - Summarizing all notes via a prompt
|
|
9
|
-
*/
|
|
10
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
11
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
13
|
-
import { getGzhContent } from "@wenyan-md/core/wrapper";
|
|
14
|
-
import { publishToDraft } from "@wenyan-md/core/publish";
|
|
15
|
-
import { themes } from "@wenyan-md/core/theme";
|
|
16
|
-
/**
|
|
17
|
-
* Create an MCP server with capabilities for resources (to list/read notes),
|
|
18
|
-
* tools (to create new notes), and prompts (to summarize notes).
|
|
19
|
-
*/
|
|
20
|
-
const server = new Server({
|
|
21
|
-
name: "wenyan-mcp",
|
|
22
|
-
version: "0.1.0",
|
|
23
|
-
}, {
|
|
24
|
-
capabilities: {
|
|
25
|
-
resources: {},
|
|
26
|
-
tools: {},
|
|
27
|
-
prompts: {},
|
|
28
|
-
// logging: {},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* Handler that lists available tools.
|
|
33
|
-
* Exposes a single "publish_article" tool that lets clients publish new article.
|
|
34
|
-
*/
|
|
35
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
36
|
-
return {
|
|
37
|
-
tools: [
|
|
38
|
-
{
|
|
39
|
-
name: "publish_article",
|
|
40
|
-
description: "Format a Markdown article using a selected theme and publish it to '微信公众号'.",
|
|
41
|
-
inputSchema: {
|
|
42
|
-
type: "object",
|
|
43
|
-
properties: {
|
|
44
|
-
content: {
|
|
45
|
-
type: "string",
|
|
46
|
-
description: "The original Markdown content to publish, preserving its frontmatter (if present).",
|
|
47
|
-
},
|
|
48
|
-
theme_id: {
|
|
49
|
-
type: "string",
|
|
50
|
-
description: "ID of the theme to use (e.g., default, orangeheart, rainbow, lapis, pie, maize, purple, phycat).",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
required: ["content"],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "list_themes",
|
|
58
|
-
description: "List the themes compatible with the 'publish_article' tool to publish an article to '微信公众号'.",
|
|
59
|
-
inputSchema: {
|
|
60
|
-
type: "object",
|
|
61
|
-
properties: {}
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
/**
|
|
68
|
-
* Handler for the publish_article tool.
|
|
69
|
-
* Publish a new article with the provided title and content, and returns success message.
|
|
70
|
-
*/
|
|
71
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
72
|
-
if (request.params.name === "publish_article") {
|
|
73
|
-
// server.sendLoggingMessage({
|
|
74
|
-
// level: "debug",
|
|
75
|
-
// data: JSON.stringify(request.params.arguments),
|
|
76
|
-
// });
|
|
77
|
-
const content = String(request.params.arguments?.content || "");
|
|
78
|
-
const themeId = String(request.params.arguments?.theme_id || "");
|
|
79
|
-
const gzhContent = await getGzhContent(content, themeId, "solarized-light", true);
|
|
80
|
-
const title = gzhContent.title ?? "this is title";
|
|
81
|
-
const cover = gzhContent.cover ?? "";
|
|
82
|
-
const response = await publishToDraft(title, gzhContent.content, cover);
|
|
83
|
-
return {
|
|
84
|
-
content: [
|
|
85
|
-
{
|
|
86
|
-
type: "text",
|
|
87
|
-
text: `Your article was successfully published to '公众号草稿箱'. The media ID is ${response.media_id}.`,
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
else if (request.params.name === "list_themes") {
|
|
93
|
-
const themeResources = Object.entries(themes).map(([id, theme]) => ({
|
|
94
|
-
type: "text",
|
|
95
|
-
text: JSON.stringify({
|
|
96
|
-
id: theme.id,
|
|
97
|
-
name: theme.name,
|
|
98
|
-
description: theme.description
|
|
99
|
-
}),
|
|
100
|
-
}));
|
|
101
|
-
return {
|
|
102
|
-
content: themeResources,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
throw new Error("Unknown tool");
|
|
106
|
-
});
|
|
107
|
-
/**
|
|
108
|
-
* Start the server using stdio transport.
|
|
109
|
-
* This allows the server to communicate via standard input/output streams.
|
|
110
|
-
*/
|
|
111
|
-
async function main() {
|
|
112
|
-
const transport = new StdioServerTransport();
|
|
113
|
-
await server.connect(transport);
|
|
114
|
-
}
|
|
115
|
-
main().catch((error) => {
|
|
116
|
-
console.error("Server error:", error);
|
|
117
|
-
process.exit(1);
|
|
118
|
-
});
|
package/dist/mac_style.css
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#wenyan pre::before {
|
|
2
|
-
display: block;
|
|
3
|
-
content: "";
|
|
4
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="12" viewBox="0 0 450 130"><ellipse cx="65" cy="65" rx="50" ry="52" stroke="rgb(220,60,54)" stroke-width="2" fill="rgb(237,108,96)"/><ellipse cx="225" cy="65" rx="50" ry="52" stroke="rgb(218,151,33)" stroke-width="2" fill="rgb(247,193,81)"/><ellipse cx="385" cy="65" rx="50" ry="52" stroke="rgb(27,161,37)" stroke-width="2" fill="rgb(100,200,86)"/></svg>');
|
|
5
|
-
background-repeat: no-repeat;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 16px;
|
|
8
|
-
}
|