@mokoenterprises/mokoabs-mcp 1.3.0 → 4.2.1
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/.mokogit/workflows/auto-release.yml +21 -1
- package/.mokogit/workflows/pre-release.yml +20 -0
- package/AGENTS.md +3 -3
- package/CHANGELOG.md +1 -1
- package/CODE_OF_CONDUCT.md +4 -4
- package/CONTRIBUTING.md +6 -6
- package/LICENSE +3 -3
- package/Makefile +1 -1
- package/README.md +10 -10
- package/SECURITY.md +6 -6
- package/dist/index.js +3 -3
- package/package.json +34 -33
- package/sample/config.example.json +2 -2
- package/scripts/deploy-vendor-mcps.ps1 +1 -1
- package/source/client.ts +3 -3
- package/source/config.ts +3 -3
- package/source/credentialStore.ts +3 -3
- package/source/index.ts +3 -3
- package/source/tokenReader.ts +3 -3
- package/source/types.ts +3 -3
- package/tools/deploy.mjs +27 -0
|
@@ -1245,6 +1245,26 @@ jobs:
|
|
|
1245
1245
|
echo "branch=main" >> "$GITHUB_OUTPUT"
|
|
1246
1246
|
echo "Published version: ${VERSION}"
|
|
1247
1247
|
|
|
1248
|
+
- name: Deploy over SFTP to stable/prod (generic, presence-gated)
|
|
1249
|
+
if: ${{ steps.version.outputs.skip != 'true' && vars.SFTP_STABLE_HOST != '' }}
|
|
1250
|
+
env:
|
|
1251
|
+
DEPLOY_KEY: ${{ secrets.SFTP_STABLE_KEY }}
|
|
1252
|
+
KNOWN_HOSTS: ${{ vars.SFTP_STABLE_KNOWN_HOSTS }}
|
|
1253
|
+
SSH_USER: ${{ vars.SFTP_STABLE_USER }}
|
|
1254
|
+
SSH_HOST: ${{ vars.SFTP_STABLE_HOST }}
|
|
1255
|
+
SSH_PORT: ${{ vars.SFTP_STABLE_PORT }}
|
|
1256
|
+
DEST: ${{ vars.SFTP_STABLE_PATH }}
|
|
1257
|
+
run: |
|
|
1258
|
+
set -euo pipefail
|
|
1259
|
+
[ -n "$DEST" ] && [ "$DEST" != "/" ] || { echo "SFTP_STABLE_PATH empty/root; refusing"; exit 1; }
|
|
1260
|
+
install -d -m 700 ~/.ssh
|
|
1261
|
+
printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/id_sftp_deploy; chmod 600 ~/.ssh/id_sftp_deploy
|
|
1262
|
+
printf '%s\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts_sftp; chmod 644 ~/.ssh/known_hosts_sftp
|
|
1263
|
+
SSH="ssh -i $HOME/.ssh/id_sftp_deploy -p ${SSH_PORT:-22} -o UserKnownHostsFile=$HOME/.ssh/known_hosts_sftp -o StrictHostKeyChecking=yes -o IdentitiesOnly=yes"
|
|
1264
|
+
$SSH "$SSH_USER@$SSH_HOST" "rm -rf \"$DEST\" && mkdir -p \"$DEST\""
|
|
1265
|
+
tar czf - --exclude=.git --exclude=.mokogit --exclude=.github --exclude='*.token' --exclude='*.token.json' . | $SSH "$SSH_USER@$SSH_HOST" "tar xzf - -C \"$DEST\""
|
|
1266
|
+
echo "Deployed to stable: $SSH_HOST:$DEST"
|
|
1267
|
+
|
|
1248
1268
|
- name: "Deploy to prod (inline — replaces standalone deploy.yml, #1427)"
|
|
1249
1269
|
if: steps.gate.outputs.has_makefile == 'true' && steps.version.outputs.skip != 'true' && vars.PROD_SSH_USERNAME != ''
|
|
1250
1270
|
env:
|
|
@@ -1804,7 +1824,7 @@ jobs:
|
|
|
1804
1824
|
rm -f .npmrc; echo "$out"
|
|
1805
1825
|
if [ "$rc" -eq 0 ]; then echo "Published to npmjs.org."
|
|
1806
1826
|
elif printf '%s' "$out" | grep -qiE 'already exists|cannot publish over|EPUBLISHCONFLICT|409 Conflict'; then echo "::notice::npmjs.org already has this version - no-op."
|
|
1807
|
-
elif printf '%s' "$out" | grep -qiE 'not in this registry|ENEEDAUTH|EOTP|need auth|E401|E403|401 Unauthorized|403 Forbidden|404 Not Found|Forbidden'; then echo "::error::npmjs.org publish FAILED — authorization error (npm exit ${rc}). NPM_TOKEN lacks publish/create rights on the @
|
|
1827
|
+
elif printf '%s' "$out" | grep -qiE 'not in this registry|ENEEDAUTH|EOTP|need auth|E401|E403|401 Unauthorized|403 Forbidden|404 Not Found|Forbidden'; then echo "::error::npmjs.org publish FAILED — authorization error (npm exit ${rc}). NPM_TOKEN lacks publish/create rights on the @mokoenterprises scope (new-scoped-name first publish, an unauthorized token, or a revoked/expired token). Failing loud so a broken publish token cannot hide behind a green release — a 404 PUT is how npm masks an unauthorized scoped write."; exit "$rc"
|
|
1808
1828
|
else echo "::warning::npmjs.org publish failed (npm exit ${rc}) — transient/5xx/network issue; npmjs is the secondary mirror (MokoGIT registry is primary), not failing the run."; fi
|
|
1809
1829
|
|
|
1810
1830
|
# -- VS Code extension: build .vsix -> attach to the release (Template-Generic#515)
|
|
@@ -1138,6 +1138,26 @@ jobs:
|
|
|
1138
1138
|
--repo "${GIT_REPO}" --out "$RUNNER_TEMP" \
|
|
1139
1139
|
--stability "$STABILITY" --rolling
|
|
1140
1140
|
|
|
1141
|
+
- name: Deploy over SFTP to dev (generic, presence-gated)
|
|
1142
|
+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' && vars.SFTP_DEV_HOST != '' }}
|
|
1143
|
+
env:
|
|
1144
|
+
DEPLOY_KEY: ${{ secrets.SFTP_DEV_KEY }}
|
|
1145
|
+
KNOWN_HOSTS: ${{ vars.SFTP_DEV_KNOWN_HOSTS }}
|
|
1146
|
+
SSH_USER: ${{ vars.SFTP_DEV_USER }}
|
|
1147
|
+
SSH_HOST: ${{ vars.SFTP_DEV_HOST }}
|
|
1148
|
+
SSH_PORT: ${{ vars.SFTP_DEV_PORT }}
|
|
1149
|
+
DEST: ${{ vars.SFTP_DEV_PATH }}
|
|
1150
|
+
run: |
|
|
1151
|
+
set -euo pipefail
|
|
1152
|
+
[ -n "$DEST" ] && [ "$DEST" != "/" ] || { echo "SFTP_DEV_PATH empty/root; refusing"; exit 1; }
|
|
1153
|
+
install -d -m 700 ~/.ssh
|
|
1154
|
+
printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/id_sftp_deploy; chmod 600 ~/.ssh/id_sftp_deploy
|
|
1155
|
+
printf '%s\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts_sftp; chmod 644 ~/.ssh/known_hosts_sftp
|
|
1156
|
+
SSH="ssh -i $HOME/.ssh/id_sftp_deploy -p ${SSH_PORT:-22} -o UserKnownHostsFile=$HOME/.ssh/known_hosts_sftp -o StrictHostKeyChecking=yes -o IdentitiesOnly=yes"
|
|
1157
|
+
$SSH "$SSH_USER@$SSH_HOST" "rm -rf \"$DEST\" && mkdir -p \"$DEST\""
|
|
1158
|
+
tar czf - --exclude=.git --exclude=.mokogit --exclude=.github --exclude='*.token' --exclude='*.token.json' . | $SSH "$SSH_USER@$SSH_HOST" "tar xzf - -C \"$DEST\""
|
|
1159
|
+
echo "Deployed to dev: $SSH_HOST:$DEST"
|
|
1160
|
+
|
|
1141
1161
|
# updates.xml <downloadurl> is generated server-side by MokoGIT (the license
|
|
1142
1162
|
# server; being moved to MokoSuiteLicensing). It must reference the VERSIONED
|
|
1143
1163
|
# rolling asset (pkg_<ext>-<version>-dev.zip) that release_package.php now
|
package/AGENTS.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
Copyright 2026 Moko
|
|
2
|
+
Copyright 2026 Moko Enterprises
|
|
3
3
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
4
|
|
|
5
5
|
Brief: Agent instructions for the Template-NPM repository. This is the
|
|
@@ -41,8 +41,8 @@ and filled in for a specific server.
|
|
|
41
41
|
- Never commit real secrets — use `config.example.json` as the template only.
|
|
42
42
|
- Repository workflow/automation configuration belongs under `.mokogit/`.
|
|
43
43
|
- Attribute machine-authored commits with a trailer:
|
|
44
|
-
`Authored-by: Moko
|
|
44
|
+
`Authored-by: Moko Enterprises`.
|
|
45
45
|
- Because this is a Template-* repo, CI is guarded to skip template repos; the
|
|
46
46
|
npm/MCP CI it defines runs in the generated child repos.
|
|
47
47
|
- Standards: follow MokoCLI conventions —
|
|
48
|
-
https://git.
|
|
48
|
+
https://git.mokoenterprises.us/MokoEnterprises/mokocli/wiki/Home
|
package/CHANGELOG.md
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
- CI: retire the generic `ci-generic.yml` (npm-build-test.yml is the platform CI).
|
|
25
25
|
|
|
26
|
-
- Branding: Git -> MokoGIT in workflow DEFGROUP tags, committer identity (git-actions[bot] -> mokogit-actions[bot]), and platform prose. Functional tokens (GIT_TOKEN/GITHUB_TOKEN, GIT_ACTIONS_*, vars.GITEA_*, git.
|
|
26
|
+
- Branding: Git -> MokoGIT in workflow DEFGROUP tags, committer identity (git-actions[bot] -> mokogit-actions[bot]), and platform prose. Functional tokens (GIT_TOKEN/GITHUB_TOKEN, GIT_ACTIONS_*, vars.GITEA_*, git.mokoenterprises.us) preserved.
|
|
27
27
|
|
|
28
28
|
### Removed
|
|
29
29
|
- CI: stripped the retired GitHub Composer auth (`GH_MIRROR_TOKEN`/`GH_PAT` github-oauth) from the workflows — Composer installs the public dev-tools anonymously.
|
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<!-- Copyright (C) 2026 Moko
|
|
1
|
+
<!-- Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
|
|
3
|
-
This file is part of a Moko
|
|
3
|
+
This file is part of a Moko Enterprises project.
|
|
4
4
|
|
|
5
5
|
SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# FILE INFORMATION
|
|
14
14
|
DEFGROUP:
|
|
15
15
|
INGROUP: Project.Documentation
|
|
16
|
-
REPO:
|
|
16
|
+
REPO: MokoEnterprises/Template-NPM
|
|
17
17
|
VERSION: 04.02.00
|
|
18
18
|
PATH: ./CODE_OF_CONDUCT.md
|
|
19
19
|
BRIEF: Contributor Covenant Code of Conduct version 1.3.0
|
|
@@ -55,7 +55,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
|
|
55
55
|
|
|
56
56
|
## Enforcement
|
|
57
57
|
|
|
58
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@
|
|
58
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@mokoenterprises.us. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
|
59
59
|
|
|
60
60
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
|
61
61
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<!-- Copyright (C) 2026 Moko
|
|
1
|
+
<!-- Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
|
|
3
|
-
This file is part of a Moko
|
|
3
|
+
This file is part of a Moko Enterprises project.
|
|
4
4
|
|
|
5
5
|
SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# FILE INFORMATION
|
|
14
14
|
DEFGROUP:
|
|
15
15
|
INGROUP: Project.Documentation
|
|
16
|
-
REPO: https://git.
|
|
16
|
+
REPO: https://git.mokoenterprises.us/MokoEnterprises/Template-NPM
|
|
17
17
|
VERSION: 04.02.00
|
|
18
18
|
PATH: ./CONTRIBUTING.md
|
|
19
19
|
BRIEF: Contribution guidelines for the project
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
# Contributing to Template-NPM
|
|
23
23
|
|
|
24
|
-
> **Reporting issues:** This repository's issue tracker is disabled. All bugs, feature requests, and questions for
|
|
24
|
+
> **Reporting issues:** This repository's issue tracker is disabled. All bugs, feature requests, and questions for MokoEnterprises templates and shared tooling are tracked centrally in **[mokocli](https://git.mokoenterprises.us/MokoEnterprises/mokocli/issues)** — please open issues there, not in the individual template repos.
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
We appreciate your interest in contributing to this project! This document provides guidelines for contributing.
|
|
@@ -37,7 +37,7 @@ We appreciate your interest in contributing to this project! This document provi
|
|
|
37
37
|
|
|
38
38
|
## Code of Conduct
|
|
39
39
|
|
|
40
|
-
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hello@
|
|
40
|
+
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hello@mokoenterprises.us.
|
|
41
41
|
|
|
42
42
|
## Getting Started
|
|
43
43
|
|
|
@@ -131,7 +131,7 @@ If you have questions about contributing, feel free to open an issue or contact
|
|
|
131
131
|
|
|
132
132
|
## Infrastructure Standards
|
|
133
133
|
|
|
134
|
-
All repositories in the
|
|
134
|
+
All repositories in the MokoEnterprises org follow these conventions:
|
|
135
135
|
|
|
136
136
|
### Release Tags
|
|
137
137
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<!-- Copyright (C) 2025 Moko
|
|
1
|
+
<!-- Copyright (C) 2025 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
|
|
3
|
-
This file is part of a Moko
|
|
3
|
+
This file is part of a Moko Enterprises project.
|
|
4
4
|
|
|
5
5
|
SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# FILE INFORMATION
|
|
14
14
|
DEFGROUP: MokoCLI
|
|
15
15
|
INGROUP: MokoCLI.Documentation
|
|
16
|
-
REPO: https://git.
|
|
16
|
+
REPO: https://git.mokoenterprises.us/MokoEnterprises/mokocli/
|
|
17
17
|
VERSION: 05.00.00
|
|
18
18
|
PATH: ./LICENSE
|
|
19
19
|
BRIEF: Project license (GPL-3.0-or-later)
|
package/Makefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# NPM / Node Project Makefile
|
|
2
|
-
# Copyright (C) 2026 Moko
|
|
2
|
+
# Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
3
3
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
4
|
#
|
|
5
5
|
# Native build/test/lint/package logic for an npm package (incl. MCP servers). The
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Template-NPM
|
|
2
2
|
|
|
3
|
-
> **Reporting issues:** This repository's issue tracker is disabled. All bugs, feature requests, and questions for
|
|
3
|
+
> **Reporting issues:** This repository's issue tracker is disabled. All bugs, feature requests, and questions for MokoEnterprises templates and shared tooling are tracked centrally in **[mokocli](https://git.mokoenterprises.us/MokoEnterprises/mokocli/issues)** — please open issues there, not in the individual template repos.
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
   
|
|
7
7
|
|
|
8
|
-
Template repository for creating MokoCLI-compliant Model Context Protocol (MCP) API servers. Provides the scaffolding, configuration patterns, and architecture conventions used by all Moko
|
|
8
|
+
Template repository for creating MokoCLI-compliant Model Context Protocol (MCP) API servers. Provides the scaffolding, configuration patterns, and architecture conventions used by all Moko Enterprises MCP servers, enabling AI assistants like Claude to interact with REST APIs through a standardized tool interface.
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ Template repository for creating MokoCLI-compliant Model Context Protocol (MCP)
|
|
|
14
14
|
- **REST API bridge architecture** -- standardized pattern for bridging any REST API as MCP tools, with typed request/response handling
|
|
15
15
|
- **TypeScript-first** -- full TypeScript setup with `tsconfig.json`, strict mode, and ES module output
|
|
16
16
|
- **Build tooling** -- Makefile with `build`, `dev`, `clean`, and `lint` targets; npm scripts for compilation and development
|
|
17
|
-
- **MokoCLI compliant** -- follows all Moko
|
|
17
|
+
- **MokoCLI compliant** -- follows all Moko Enterprises governance conventions: file headers, commit messages, `.gitattributes`, `.gitmessage`, PR/issue templates
|
|
18
18
|
- **Example configuration** -- `config.example.json` demonstrates the connection configuration schema
|
|
19
19
|
- **Documentation templates** -- wiki pages for API reference, architecture overview, and installation pre-generated
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ Template repository for creating MokoCLI-compliant Model Context Protocol (MCP)
|
|
|
22
22
|
|
|
23
23
|
1. Create a new repository from this template (or clone directly):
|
|
24
24
|
```bash
|
|
25
|
-
git clone https://git.
|
|
25
|
+
git clone https://git.mokoenterprises.us/MokoEnterprises/Template-NPM.git my-mcp-server
|
|
26
26
|
cd my-mcp-server
|
|
27
27
|
```
|
|
28
28
|
2. Install dependencies:
|
|
@@ -50,7 +50,7 @@ Register the built server with your MCP client (Claude Code / Claude Desktop):
|
|
|
50
50
|
```json
|
|
51
51
|
{
|
|
52
52
|
"mcpServers": {
|
|
53
|
-
"<name>": { "command": "npx", "args": ["-y", "@
|
|
53
|
+
"<name>": { "command": "npx", "args": ["-y", "@mokoenterprises/<package>"] }
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
```
|
|
@@ -78,11 +78,11 @@ Every tool accepts an optional `connection` parameter to target a named connecti
|
|
|
78
78
|
|
|
79
79
|
## Documentation
|
|
80
80
|
|
|
81
|
-
Full documentation is available on the [Wiki](https://git.
|
|
81
|
+
Full documentation is available on the [Wiki](https://git.mokoenterprises.us/MokoEnterprises/Template-NPM/wiki), including:
|
|
82
82
|
|
|
83
|
-
- [API](https://git.
|
|
84
|
-
- [ARCHITECTURE](https://git.
|
|
85
|
-
- [INSTALLATION](https://git.
|
|
83
|
+
- [API](https://git.mokoenterprises.us/MokoEnterprises/Template-NPM/wiki/API) -- tool reference and connection parameter documentation
|
|
84
|
+
- [ARCHITECTURE](https://git.mokoenterprises.us/MokoEnterprises/Template-NPM/wiki/ARCHITECTURE) -- MCP server design and REST API bridge pattern
|
|
85
|
+
- [INSTALLATION](https://git.mokoenterprises.us/MokoEnterprises/Template-NPM/wiki/INSTALLATION) -- setup prerequisites and configuration guide
|
|
86
86
|
|
|
87
87
|
## Contributing
|
|
88
88
|
|
|
@@ -94,7 +94,7 @@ This project is licensed under the GNU General Public License v3.0 or later -- s
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
-
*[Moko
|
|
97
|
+
*[Moko Enterprises](https://mokoenterprises.us) -- [MokoCLI](https://git.mokoenterprises.us/MokoEnterprises/mokocli/wiki/Home)*
|
|
98
98
|
|
|
99
99
|
## Template CI Notes
|
|
100
100
|
|
package/SECURITY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
Copyright (C) 2026 Moko
|
|
2
|
+
Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
3
3
|
|
|
4
|
-
This file is part of a Moko
|
|
4
|
+
This file is part of a Moko Enterprises project.
|
|
5
5
|
|
|
6
6
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
21
21
|
# FILE INFORMATION
|
|
22
22
|
DEFGROUP: Template-Generic
|
|
23
23
|
INGROUP: Template-Generic.Documentation
|
|
24
|
-
REPO: https://git.
|
|
24
|
+
REPO: https://git.mokoenterprises.us/MokoEnterprises/Template-Generic
|
|
25
25
|
PATH: /SECURITY.md
|
|
26
26
|
VERSION: 04.02.00
|
|
27
27
|
BRIEF: Security vulnerability reporting and handling policy
|
|
@@ -47,9 +47,9 @@ Only the current major version receives security updates. Users should upgrade t
|
|
|
47
47
|
## Reporting a Vulnerability
|
|
48
48
|
|
|
49
49
|
Report security vulnerabilities via MokoGIT issue (preferred):
|
|
50
|
-
https://git.
|
|
50
|
+
https://git.mokoenterprises.us/MokoEnterprises/Template-Generic/issues/new?template=security.yaml
|
|
51
51
|
|
|
52
|
-
Or email: hello@
|
|
52
|
+
Or email: hello@mokoenterprises.us
|
|
53
53
|
|
|
54
54
|
### Where to Report
|
|
55
55
|
|
|
@@ -231,7 +231,7 @@ The following are explicitly out of scope:
|
|
|
231
231
|
| ------------ | ----------------------------------------------- |
|
|
232
232
|
| Document | Security Policy |
|
|
233
233
|
| Path | /SECURITY.md |
|
|
234
|
-
| Repository | https://git.
|
|
234
|
+
| Repository | https://git.mokoenterprises.us/MokoEnterprises/Template-Generic |
|
|
235
235
|
| Owner | [OWNER_NAME] |
|
|
236
236
|
| Scope | Security vulnerability handling |
|
|
237
237
|
| Applies To | All repositories governed by MokoCLI |
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/* Copyright (C) 2026 Moko
|
|
2
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
3
3
|
*
|
|
4
|
-
* This file is part of a Moko
|
|
4
|
+
* This file is part of a Moko Enterprises project.
|
|
5
5
|
*
|
|
6
6
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
7
7
|
*
|
|
8
8
|
* FILE INFORMATION
|
|
9
9
|
* DEFGROUP: mokoabs-mcp.Server
|
|
10
10
|
* INGROUP: mokoabs-mcp
|
|
11
|
-
* REPO: https://git.
|
|
11
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
12
12
|
* PATH: /source/index.ts
|
|
13
13
|
* VERSION: 01.00.00
|
|
14
14
|
* BRIEF: MCP server entry point — registers all Audiobookshelf API tools
|
package/package.json
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
"name": "@mokoenterprises/mokoabs-mcp",
|
|
3
|
+
"version": "4.2.1",
|
|
4
|
+
"description": "MCP server for Audiobookshelf API operations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mokoabs-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"start": "node dist/index.js",
|
|
14
|
+
"lint": "eslint source/",
|
|
15
|
+
"setup": "node scripts/setup.mjs",
|
|
16
|
+
"clean": "rm -rf dist/",
|
|
17
|
+
"deploy": "node tools/deploy.mjs"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@modelcontextprotocol/sdk": "1.12.1",
|
|
21
|
+
"zod": "^3.24.4"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^22.15.3",
|
|
25
|
+
"typescript": "^5.8.3"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=20.0.0"
|
|
29
|
+
},
|
|
30
|
+
"license": "GPL-3.0-or-later",
|
|
31
|
+
"author": "Moko Enterprises <hello@mokoenterprises.us>",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp.git"
|
|
35
|
+
}
|
|
35
36
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"defaultConnection": "production",
|
|
4
4
|
"connections": {
|
|
5
5
|
"production": {
|
|
6
|
-
"baseUrl": "https://abs.
|
|
7
|
-
"tokenFile": "~/.ssh/tokens/abs.
|
|
6
|
+
"baseUrl": "https://abs.mokoenterprises.us",
|
|
7
|
+
"tokenFile": "~/.ssh/tokens/abs.mokoenterprises.us.token"
|
|
8
8
|
},
|
|
9
9
|
"legacy-inline": {
|
|
10
10
|
"_comment": "DEPRECATED: inline apiKey. Shown only to illustrate the legacy shape; it is auto-migrated to a token file on first run.",
|
package/source/client.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* Copyright (C) 2026 Moko
|
|
1
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
*
|
|
3
|
-
* This file is part of a Moko
|
|
3
|
+
* This file is part of a Moko Enterprises project.
|
|
4
4
|
*
|
|
5
5
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
6
6
|
*
|
|
7
7
|
* FILE INFORMATION
|
|
8
8
|
* DEFGROUP: mokoabs-mcp.Client
|
|
9
9
|
* INGROUP: mokoabs-mcp
|
|
10
|
-
* REPO: https://git.
|
|
10
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
11
11
|
* PATH: /source/client.ts
|
|
12
12
|
* VERSION: 01.00.00
|
|
13
13
|
* BRIEF: HTTP client for Audiobookshelf API
|
package/source/config.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* Copyright (C) 2026 Moko
|
|
1
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
*
|
|
3
|
-
* This file is part of a Moko
|
|
3
|
+
* This file is part of a Moko Enterprises project.
|
|
4
4
|
*
|
|
5
5
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
6
6
|
*
|
|
7
7
|
* FILE INFORMATION
|
|
8
8
|
* DEFGROUP: mokoabs-mcp.Config
|
|
9
9
|
* INGROUP: mokoabs-mcp
|
|
10
|
-
* REPO: https://git.
|
|
10
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
11
11
|
* PATH: /source/config.ts
|
|
12
12
|
* VERSION: 01.00.00
|
|
13
13
|
* BRIEF: Configuration loader for Audiobookshelf MCP connections
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* Copyright (C) 2026 Moko
|
|
1
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
*
|
|
3
|
-
* This file is part of a Moko
|
|
3
|
+
* This file is part of a Moko Enterprises project.
|
|
4
4
|
*
|
|
5
5
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
6
6
|
*
|
|
7
7
|
* FILE INFORMATION
|
|
8
8
|
* DEFGROUP: mokoabs-mcp.CredentialStore
|
|
9
9
|
* INGROUP: mokoabs-mcp
|
|
10
|
-
* REPO: https://git.
|
|
10
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
11
11
|
* PATH: /source/credentialStore.ts
|
|
12
12
|
* VERSION: 01.00.00
|
|
13
13
|
* BRIEF: No-inline-secrets policy — auto-migration + credential-file path safety.
|
package/source/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/* Copyright (C) 2026 Moko
|
|
2
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
3
3
|
*
|
|
4
|
-
* This file is part of a Moko
|
|
4
|
+
* This file is part of a Moko Enterprises project.
|
|
5
5
|
*
|
|
6
6
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
7
7
|
*
|
|
8
8
|
* FILE INFORMATION
|
|
9
9
|
* DEFGROUP: mokoabs-mcp.Server
|
|
10
10
|
* INGROUP: mokoabs-mcp
|
|
11
|
-
* REPO: https://git.
|
|
11
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
12
12
|
* PATH: /source/index.ts
|
|
13
13
|
* VERSION: 01.00.00
|
|
14
14
|
* BRIEF: MCP server entry point — registers all Audiobookshelf API tools
|
package/source/tokenReader.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* Copyright (C) 2026 Moko
|
|
1
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
*
|
|
3
|
-
* This file is part of a Moko
|
|
3
|
+
* This file is part of a Moko Enterprises project.
|
|
4
4
|
*
|
|
5
5
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
6
6
|
*
|
|
7
7
|
* FILE INFORMATION
|
|
8
8
|
* DEFGROUP: mokoabs-mcp.TokenReader
|
|
9
9
|
* INGROUP: mokoabs-mcp
|
|
10
|
-
* REPO: https://git.
|
|
10
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
11
11
|
* PATH: /source/tokenReader.ts
|
|
12
12
|
* VERSION: 01.00.00
|
|
13
13
|
* BRIEF: MokoCLI #1043 — JSON-aware credential/token reader (vendored per-repo).
|
package/source/types.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* Copyright (C) 2026 Moko
|
|
1
|
+
/* Copyright (C) 2026 Moko Enterprises <hello@mokoenterprises.us>
|
|
2
2
|
*
|
|
3
|
-
* This file is part of a Moko
|
|
3
|
+
* This file is part of a Moko Enterprises project.
|
|
4
4
|
*
|
|
5
5
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
6
6
|
*
|
|
7
7
|
* FILE INFORMATION
|
|
8
8
|
* DEFGROUP: mokoabs-mcp.Types
|
|
9
9
|
* INGROUP: mokoabs-mcp
|
|
10
|
-
* REPO: https://git.
|
|
10
|
+
* REPO: https://git.mokoenterprises.us/MokoEnterprises/mokoabs-mcp
|
|
11
11
|
* PATH: /source/types.ts
|
|
12
12
|
* VERSION: 01.00.00
|
|
13
13
|
* BRIEF: TypeScript type definitions for Audiobookshelf MCP server
|
package/tools/deploy.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Deploy this MCP server to ~/mcp/<name> (portable; creates the target if missing).
|
|
3
|
+
// Usage: npm run deploy -> ~/mcp/<pkgname minus -mcp>
|
|
4
|
+
// override: node tools/deploy.mjs <name> | MCP_DEPLOY_NAME=.. | MCP_DEPLOY_DIR=..
|
|
5
|
+
import { mkdirSync, cpSync, rmSync, existsSync, readFileSync } from 'node:fs';
|
|
6
|
+
import { homedir } from 'node:os';
|
|
7
|
+
import { join, dirname, resolve } from 'node:path';
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
12
|
+
const base = (pkg.name || 'mcp-server').split('/').pop().replace(/-mcp$/, '');
|
|
13
|
+
const name = process.argv[2] || process.env.MCP_DEPLOY_NAME || base;
|
|
14
|
+
const mcpDir = process.env.MCP_DEPLOY_DIR || join(homedir(), 'mcp');
|
|
15
|
+
const dest = join(mcpDir, name);
|
|
16
|
+
console.log(`Deploy ${pkg.name}@${pkg.version} -> ${dest}`);
|
|
17
|
+
mkdirSync(dest, { recursive: true });
|
|
18
|
+
execSync('npm run build', { cwd: root, stdio: 'inherit' });
|
|
19
|
+
for (const item of ['dist', 'package.json', 'package-lock.json']) {
|
|
20
|
+
const src = join(root, item); if (!existsSync(src)) continue;
|
|
21
|
+
const to = join(dest, item);
|
|
22
|
+
if (existsSync(to) && item === 'dist') rmSync(to, { recursive: true, force: true });
|
|
23
|
+
cpSync(src, to, { recursive: true });
|
|
24
|
+
}
|
|
25
|
+
try { execSync('npm ci --omit=dev --no-audit --no-fund', { cwd: dest, stdio: 'inherit' }); }
|
|
26
|
+
catch { execSync('npm install --omit=dev --no-audit --no-fund', { cwd: dest, stdio: 'inherit' }); }
|
|
27
|
+
console.log(`OK deployed -> ${dest}`);
|