@gehlich/calicomp-mcp 1.0.0
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/LICENSE +21 -0
- package/README.md +75 -0
- package/dist/index.js +4040 -0
- package/package.json +40 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Patrick Gehlich
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# CalisthenicsCompanion-MCP
|
|
2
|
+
|
|
3
|
+
Local stdio MCP server for CalisthenicsCompanion.
|
|
4
|
+
|
|
5
|
+
**Package name:** `@gehlich/calicomp-mcp`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Allows an LLM client (e.g. Claude Desktop) to read a user's locally-decrypted
|
|
10
|
+
training data and propose plan updates — without any direct mutations.
|
|
11
|
+
|
|
12
|
+
## Repository Layout
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
CalisthenicsCompanion-MCP/
|
|
16
|
+
├── src/
|
|
17
|
+
│ ├── index.ts # Fail-fast entry point, MCP server setup
|
|
18
|
+
│ ├── crypto.ts # AES-256-GCM decrypt (parity with Android CryptoManager)
|
|
19
|
+
│ ├── http.ts # Authenticated HTTP client for /api/mcp/data/pull
|
|
20
|
+
│ ├── cache.ts # In-memory snapshot cache (TTL 60 s)
|
|
21
|
+
│ ├── types.ts # TypeScript types (DecryptedSnapshot, etc.)
|
|
22
|
+
│ ├── schemas.ts # Zod schemas for tool inputs
|
|
23
|
+
│ ├── e1rm.ts # Epley e1RM formula (parity with Android)
|
|
24
|
+
│ └── tools/ # Tool handlers (get_profile, list_templates, …)
|
|
25
|
+
├── tests/
|
|
26
|
+
│ ├── startup.test.ts # Fail-fast env-check spawn tests
|
|
27
|
+
│ ├── crypto.test.ts # AES-256-GCM cross-language parity fixture test
|
|
28
|
+
│ └── …
|
|
29
|
+
├── package.json
|
|
30
|
+
├── tsconfig.json
|
|
31
|
+
├── tsup.config.ts
|
|
32
|
+
├── vitest.config.ts
|
|
33
|
+
└── .eslintrc.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Required Environment Variables
|
|
37
|
+
|
|
38
|
+
| Variable | Description |
|
|
39
|
+
|----------|-------------|
|
|
40
|
+
| `CALICOMP_PAT` | Personal Access Token (prefixed `calicomp_pat_`). Created in the CalisthenicsCompanion app. |
|
|
41
|
+
| `CALICOMP_KEY` | AES-256 encryption key in raw base64 (no prefix). Exported from the app alongside the PAT. |
|
|
42
|
+
| `CALICOMP_SERVER_URL` | *(Optional)* Override the API base URL. Defaults to `https://api.calicompanion.de`. |
|
|
43
|
+
|
|
44
|
+
## Transport
|
|
45
|
+
|
|
46
|
+
Runs as a local stdio MCP server. The LLM client communicates via JSON-RPC 2.0
|
|
47
|
+
over stdin/stdout. All diagnostics are written to stderr only — stdout is the
|
|
48
|
+
exclusive JSON-RPC channel.
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"calicomp": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": ["-y", "@gehlich/calicomp-mcp"],
|
|
58
|
+
"env": {
|
|
59
|
+
"CALICOMP_PAT": "<your-pat>",
|
|
60
|
+
"CALICOMP_KEY": "<your-key-base64>"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Building
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install
|
|
71
|
+
npm run build # tsup → dist/index.js (shebang'd, single-file ESM)
|
|
72
|
+
npm run lint # ESLint no-console gate
|
|
73
|
+
npm run typecheck # tsc --noEmit
|
|
74
|
+
npm test # vitest run
|
|
75
|
+
```
|