Skip to content

Commit 36eb1ce

Browse files
authored
Initial commit
0 parents  commit 36eb1ce

40 files changed

+14234
-0
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PORT=8401

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
if: github.repository == 'my-mcp-hub/node-mcp-server'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Install Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 22
22+
cache: npm
23+
24+
- name: Install Package
25+
run: npm i
26+
27+
- name: Build Package
28+
run: npm run build
29+
30+
- name: Test Package
31+
run: npm run coverage
32+
33+
- name: Coveralls
34+
uses: coverallsapp/github-action@v2

.github/workflows/npm-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: npm-publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
if: github.repository == 'my-mcp-hub/node-mcp-server'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
registry-url: https://registry.npmjs.org/
25+
cache: npm
26+
27+
- name: Install Package
28+
run: npm i
29+
30+
- name: Build Package
31+
run: npm run build
32+
33+
- name: Publish NPM Package
34+
run: npm publish --provenance --access public
35+
env:
36+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
.DS_Store
2+
.idea/
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
lerna-debug.log*
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
#.env
75+
.env.test
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
/docs/.vitepress/cache/
109+
110+
stats.html
111+
112+
build/

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tabWidth": 2,
3+
"printWidth": 120,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false,
10+
"arrowParens": "avoid"
11+
}

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
## [0.0.2](https://github.com/my-mcp-hub/node-mcp-server/compare/v0.0.1...v0.0.2) (2025-07-25)
2+
3+
4+
### 🎫 Chores | 其他更新
5+
6+
* bump version to 0.0.2 ([6dc5470](https://github.com/my-mcp-hub/node-mcp-server/commit/6dc5470c14975e3d3f4e8e8df74f4ee21b141b5a))
7+
* update dependencies ([7b87b6c](https://github.com/my-mcp-hub/node-mcp-server/commit/7b87b6c10e10f831bf01f9de92231200aff9ab43))
8+
9+
10+
### 📝 Documentation | 文档
11+
12+
* update npm package links in README ([6929a04](https://github.com/my-mcp-hub/node-mcp-server/commit/6929a04ee9b36c12a751811cd415858b63396439))
13+
14+
15+
16+
## [0.0.1](https://github.com/my-mcp-hub/node-mcp-server/compare/6791303db2203b56355c928563f51863d0fc86a0...v0.0.1) (2025-07-24)
17+
18+
19+
### ♻ Code Refactoring | 代码重构
20+
21+
* update test client name and type assertion in vitest setup ([f1b5cfe](https://github.com/my-mcp-hub/node-mcp-server/commit/f1b5cfe54d1618529715503946d42311d13fdcf4))
22+
* update text in registerGetData ([554760f](https://github.com/my-mcp-hub/node-mcp-server/commit/554760f44b0042ccb90b6aace660c8b7d9055cd2))
23+
* update tool registration syntax in README ([92cc396](https://github.com/my-mcp-hub/node-mcp-server/commit/92cc39633704f20fad2e0685b62978e8ec8d768f))
24+
* use path aliases for imports to improve maintainability ([4da4665](https://github.com/my-mcp-hub/node-mcp-server/commit/4da46659f4446280d3e3ff0b6a84069126b5e588))
25+
26+
27+
### ✅ Tests | 测试
28+
29+
* add coverage reporters to vitest setup ([8488e0b](https://github.com/my-mcp-hub/node-mcp-server/commit/8488e0b7e7bd6c6e47f30dd38127b7560eaa0996))
30+
* remove async from describe blocks in test files ([d41cc35](https://github.com/my-mcp-hub/node-mcp-server/commit/d41cc35725a2e866b58046fb220b3170d156897e))
31+
* update test description to be more generic ([477c11d](https://github.com/my-mcp-hub/node-mcp-server/commit/477c11d15fcf72d1f2aca302b8d8487d2052fc2c))
32+
* update test setup ([4fa009a](https://github.com/my-mcp-hub/node-mcp-server/commit/4fa009aecacd4fdca2843307489e075b74a8ba95))
33+
34+
35+
### ✨ Features | 新功能
36+
37+
* add echo prompt registration for message processing ([0a293f8](https://github.com/my-mcp-hub/node-mcp-server/commit/0a293f817da05cf092caf7c93d85c4b5a020f21a))
38+
* add name and version to options interface and initialization ([7f1183d](https://github.com/my-mcp-hub/node-mcp-server/commit/7f1183ddbff6868f166cb14cec649e183954d5ad))
39+
* add search resource ([71b3bcc](https://github.com/my-mcp-hub/node-mcp-server/commit/71b3bcc0e7addc8abf7c621e8ade105718a92aec))
40+
* add vitest setup and test cases for getData ([5caad21](https://github.com/my-mcp-hub/node-mcp-server/commit/5caad21fa09164bfb1fcb7be99418c4d2d3357e3))
41+
* initialize node mcp server with core functionality ([6791303](https://github.com/my-mcp-hub/node-mcp-server/commit/6791303db2203b56355c928563f51863d0fc86a0))
42+
* refactor GetData tool ([1571a81](https://github.com/my-mcp-hub/node-mcp-server/commit/1571a815bc3df870773fbc30c6e1229c25f1f289))
43+
44+
45+
### 🎫 Chores | 其他更新
46+
47+
* add tree-kill dependency for process termination ([08ad03d](https://github.com/my-mcp-hub/node-mcp-server/commit/08ad03d6ba10ddf9553449b42ca6ee004a86f6f8))
48+
* disable auto-open browser after first launch ([9226251](https://github.com/my-mcp-hub/node-mcp-server/commit/922625124cf1336c3f431d63776c9283c5c29913))
49+
* rename package ([7ef07ca](https://github.com/my-mcp-hub/node-mcp-server/commit/7ef07caedc348ddcc4c8b9132f67daaa7ea7e804))
50+
* update dependencies ([70f6daa](https://github.com/my-mcp-hub/node-mcp-server/commit/70f6daaf6bddb1d0037dc537fbc178281f3f089f))
51+
* update dependencies ([e7f28be](https://github.com/my-mcp-hub/node-mcp-server/commit/e7f28bec15f6dc8775ce446702753ffdb9666442))
52+
* update dependencies ([834ca75](https://github.com/my-mcp-hub/node-mcp-server/commit/834ca754e121e8878eae5e0e75953517c49e3411))
53+
* update dependencies ([1bcfd16](https://github.com/my-mcp-hub/node-mcp-server/commit/1bcfd167709f388e4f670e524d585f235bb6c4a5))
54+
* update dependencies ([d373629](https://github.com/my-mcp-hub/node-mcp-server/commit/d37362944c422dc89afef592d4196e4ca1ce0c5a))
55+
* update dependencies ([a8e37ce](https://github.com/my-mcp-hub/node-mcp-server/commit/a8e37cea8f5d77e1c4c9d731198a982620ef31bc))
56+
* update dependencies ([192c193](https://github.com/my-mcp-hub/node-mcp-server/commit/192c1932b69e34d2029ad5f7151b73838149017b))
57+
* update dependencies ([06466fb](https://github.com/my-mcp-hub/node-mcp-server/commit/06466fb7a259d956eff62458f39f62495527c910))
58+
* update package name to include [@my-mcp-hub](https://github.com/my-mcp-hub) scope ([528e32c](https://github.com/my-mcp-hub/node-mcp-server/commit/528e32ce31f2db2e0a63aa77d2dbfa8a05d858a3))
59+
60+
61+
### 🐛 Bug Fixes | Bug 修复
62+
63+
* include test files in eslint config and fix formatting ([6004989](https://github.com/my-mcp-hub/node-mcp-server/commit/600498978d13862d7873544cbe8d6de933e659c0))
64+
* swap before/after hooks and add env var for inspector ([55d5c31](https://github.com/my-mcp-hub/node-mcp-server/commit/55d5c31f59787a6e2f5500eca797429939de8945))
65+
66+
67+
### 👷‍ Build System | 构建
68+
69+
* replace c8 with nyc for test coverage ([47ec8a8](https://github.com/my-mcp-hub/node-mcp-server/commit/47ec8a8901f3e6960b5a9401911a7c18a6e15e7b))
70+
* update coverage command to include lcov reporter ([f6b7a59](https://github.com/my-mcp-hub/node-mcp-server/commit/f6b7a5922898c830c97162538bbf2b1f8dd0c40a))
71+
72+
73+
### 📝 Documentation | 文档
74+
75+
* add badge links to README for better visibility ([6f3b2cf](https://github.com/my-mcp-hub/node-mcp-server/commit/6f3b2cf38373b72df9086d377db8fd3ffb48bc34))
76+
* add repository url to package.json ([d78f7f9](https://github.com/my-mcp-hub/node-mcp-server/commit/d78f7f90eeb9b8f322f9c77ceb836db3eb6081a7))
77+
* update README ([291e2f0](https://github.com/my-mcp-hub/node-mcp-server/commit/291e2f0d5fb7dc67ae5194eb9ab42b95f2256644))
78+
79+
80+
### 🔧 Continuous Integration | CI 配置
81+
82+
* add provenance and public access flags to npm publish ([b6e35c5](https://github.com/my-mcp-hub/node-mcp-server/commit/b6e35c56acc885a00579b9a1a7e6fa3ede5ebb82))
83+
* add test coverage configuration and workflow ([fe30153](https://github.com/my-mcp-hub/node-mcp-server/commit/fe3015364f2e24f6505b2596fb8c7a5d43a92704))
84+
* update node version and replace codecov with coveralls ([200c96c](https://github.com/my-mcp-hub/node-mcp-server/commit/200c96cc372a38bc2a275e5e0f820aeb78bedc31))
85+
86+
87+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 my-mcp-hub
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)