@hormonaly/mcp-server 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 +403 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
# Hormonaly MCP Server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for the [Hormonaly](https://hormonaly.ai) evidence platform.
|
|
4
|
+
Exposes the Helix AI engine, protocol library, compound database, and admin tools to Claude Desktop and any MCP-compatible AI agent.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
### Option A — npx / local build (recommended)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Clone the repo and build
|
|
14
|
+
git clone https://github.com/hormonaly/hormonaly-platform
|
|
15
|
+
cd hormonaly-platform/mcp/hormonaly-mcp-server
|
|
16
|
+
npm install
|
|
17
|
+
npm run build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Option B — Run from the repo directly
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
node /path/to/hormonaly-platform/mcp/hormonaly-mcp-server/dist/index.js
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Configuration for Claude Desktop
|
|
29
|
+
|
|
30
|
+
Add the following to your `claude_desktop_config.json`
|
|
31
|
+
(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,
|
|
32
|
+
`%APPDATA%\Claude\claude_desktop_config.json` on Windows):
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"hormonaly": {
|
|
38
|
+
"command": "node",
|
|
39
|
+
"args": [
|
|
40
|
+
"/absolute/path/to/hormonaly-platform/mcp/hormonaly-mcp-server/dist/index.js"
|
|
41
|
+
],
|
|
42
|
+
"env": {
|
|
43
|
+
"HORMONALY_API_URL": "https://hormonaly.ai",
|
|
44
|
+
"HORMONALY_API_KEY": "hk_live_YOUR_PARTNER_API_KEY"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Restart Claude Desktop after saving.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Authentication
|
|
56
|
+
|
|
57
|
+
### Helix API key (required for `helix_*` tools)
|
|
58
|
+
|
|
59
|
+
Get your API key from the [Hormonaly Partner Portal](https://hormonaly.ai/partner).
|
|
60
|
+
Keys start with `hk_live_` and are 72 characters long.
|
|
61
|
+
|
|
62
|
+
Set via environment variable:
|
|
63
|
+
```bash
|
|
64
|
+
export HORMONALY_API_KEY=hk_live_...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or pass per-call using the `api_key` parameter on any `helix_*` tool.
|
|
68
|
+
|
|
69
|
+
### Session token (required for `user_*` tools)
|
|
70
|
+
|
|
71
|
+
Get your session cookie from your browser:
|
|
72
|
+
1. Log into [hormonaly.ai](https://hormonaly.ai)
|
|
73
|
+
2. Open DevTools → Application → Cookies
|
|
74
|
+
3. Copy the value of `connect.sid`
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
export HORMONALY_SESSION_TOKEN=s%3A...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Or pass per-call using the `session_token` parameter.
|
|
81
|
+
|
|
82
|
+
### Admin session token (required for `admin_*` tools)
|
|
83
|
+
|
|
84
|
+
Same as session token but for an admin account:
|
|
85
|
+
```bash
|
|
86
|
+
export HORMONALY_ADMIN_SESSION_TOKEN=s%3A...
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Or pass per-call using the `admin_session_token` parameter.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Environment Variables
|
|
94
|
+
|
|
95
|
+
| Variable | Default | Description |
|
|
96
|
+
|----------|---------|-------------|
|
|
97
|
+
| `HORMONALY_API_URL` | `https://hormonaly.ai` | Base URL of the platform |
|
|
98
|
+
| `HORMONALY_API_KEY` | — | Helix B2B API key (`hk_live_...`) |
|
|
99
|
+
| `HORMONALY_SESSION_TOKEN` | — | User session cookie value |
|
|
100
|
+
| `HORMONALY_ADMIN_SESSION_TOKEN` | — | Admin session cookie value |
|
|
101
|
+
| `HTTP_PORT` | — | Set to run HTTP/SSE transport instead of stdio |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## HTTP/SSE Transport (for remote agents)
|
|
106
|
+
|
|
107
|
+
Start the server in HTTP mode:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
HTTP_PORT=3100 node dist/index.js
|
|
111
|
+
# or
|
|
112
|
+
node dist/index.js --http
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Endpoints:
|
|
116
|
+
- `GET http://localhost:3100/sse` — SSE stream (connect first)
|
|
117
|
+
- `POST http://localhost:3100/messages` — Send tool calls
|
|
118
|
+
- `GET http://localhost:3100/health` — Health check
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Available Tools
|
|
123
|
+
|
|
124
|
+
### Helix Tools (require Helix API key)
|
|
125
|
+
|
|
126
|
+
#### `helix_query`
|
|
127
|
+
Send a clinical question to the Helix AI engine. Returns an evidence-based answer with citations, confidence score, and GRADE rating.
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"question": "What is the optimal BPC-157 dose for gut repair?",
|
|
132
|
+
"language": "en",
|
|
133
|
+
"detail_level": "clinical",
|
|
134
|
+
"include_citations": true,
|
|
135
|
+
"include_three_lens": false,
|
|
136
|
+
"api_key": "hk_live_..."
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Parameters:**
|
|
141
|
+
| Parameter | Type | Required | Default | Description |
|
|
142
|
+
|-----------|------|----------|---------|-------------|
|
|
143
|
+
| `question` | string | ✅ | — | Clinical question (max 10,000 chars) |
|
|
144
|
+
| `language` | `en` \| `ar` | — | `en` | Response language |
|
|
145
|
+
| `detail_level` | `clinical` \| `summary` | — | `clinical` | Response depth |
|
|
146
|
+
| `include_citations` | boolean | — | `true` | Include PubMed citations |
|
|
147
|
+
| `include_three_lens` | boolean | — | `false` | Include longevity/health/performance scoring |
|
|
148
|
+
| `api_key` | string | — | env var | Override `HORMONALY_API_KEY` |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
#### `helix_compare`
|
|
153
|
+
Compare 2–3 compounds head-to-head. Returns structured comparison with use-case recommendations. **Requires Professional or Enterprise tier.**
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"compounds": ["semaglutide", "tirzepatide"],
|
|
158
|
+
"indication": "weight loss in type 2 diabetes",
|
|
159
|
+
"language": "en"
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Parameters:**
|
|
164
|
+
| Parameter | Type | Required | Default | Description |
|
|
165
|
+
|-----------|------|----------|---------|-------------|
|
|
166
|
+
| `compounds` | string[] | ✅ | — | 2–3 compound names |
|
|
167
|
+
| `indication` | string | — | `"General comparison"` | Clinical context |
|
|
168
|
+
| `language` | `en` \| `ar` | — | `en` | Response language |
|
|
169
|
+
| `api_key` | string | — | env var | Override `HORMONALY_API_KEY` |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
#### `helix_protocol`
|
|
174
|
+
Get all protocols for a compound from the Helix API.
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"compound": "BPC-157",
|
|
179
|
+
"language": "en"
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
#### `helix_dossier_start`
|
|
186
|
+
Start an async dossier generation job for a compound. Returns `job_id`. **Requires Professional or Enterprise tier.**
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"compound": "semaglutide",
|
|
191
|
+
"language": "en"
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### `helix_dossier_status`
|
|
196
|
+
Poll a dossier generation job by `job_id`.
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"job_id": "dossier_abc123"
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### Protocol Tools (no auth required)
|
|
207
|
+
|
|
208
|
+
#### `protocol_search`
|
|
209
|
+
Search the protocol library by compound, condition, or category.
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"query": "testosterone replacement",
|
|
214
|
+
"category": "hormones",
|
|
215
|
+
"limit": 10
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
#### `protocol_get`
|
|
220
|
+
Get the full details of a protocol by ID or slug.
|
|
221
|
+
|
|
222
|
+
```json
|
|
223
|
+
{
|
|
224
|
+
"id": "semaglutide-weight-loss"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### `protocol_list_categories`
|
|
229
|
+
List all protocol categories with protocol counts.
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### `protocol_get_interactions`
|
|
236
|
+
Check for known interactions between a set of compounds. Uses the public `/api/interactions/for/:slug` endpoint — no authentication required.
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"compounds": ["semaglutide", "metformin", "insulin"]
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Evidence Tools (no auth required)
|
|
247
|
+
|
|
248
|
+
#### `evidence_search`
|
|
249
|
+
Search PubMed for research on a compound or condition.
|
|
250
|
+
|
|
251
|
+
```json
|
|
252
|
+
{
|
|
253
|
+
"compound": "BPC-157",
|
|
254
|
+
"max_results": 15
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### `evidence_get`
|
|
259
|
+
Get full details for a specific evidence record by ID.
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"id": "ev_12345"
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
### Compound Tools (no auth required)
|
|
270
|
+
|
|
271
|
+
#### `compound_search`
|
|
272
|
+
Search the compound database by name or category.
|
|
273
|
+
|
|
274
|
+
```json
|
|
275
|
+
{
|
|
276
|
+
"query": "GLP-1",
|
|
277
|
+
"category": "peptides"
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### `compound_get_interactions`
|
|
282
|
+
Get all known interactions for a specific compound.
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"slug": "semaglutide"
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### User Tools (require session token)
|
|
293
|
+
|
|
294
|
+
#### `user_get_profile`
|
|
295
|
+
Get the current user's profile.
|
|
296
|
+
|
|
297
|
+
```json
|
|
298
|
+
{
|
|
299
|
+
"session_token": "s%3A..."
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
#### `user_get_usage`
|
|
304
|
+
Get AI usage statistics for the current user.
|
|
305
|
+
|
|
306
|
+
```json
|
|
307
|
+
{}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
#### `user_get_saved_protocols`
|
|
311
|
+
Get the list of protocols saved by the current user.
|
|
312
|
+
|
|
313
|
+
```json
|
|
314
|
+
{}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
### Admin Tools (require admin session token)
|
|
320
|
+
|
|
321
|
+
#### `admin_get_stats`
|
|
322
|
+
Get platform-wide statistics (users, protocols, AI costs).
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"admin_session_token": "s%3A..."
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### `admin_list_users`
|
|
331
|
+
List platform users with optional search and pagination.
|
|
332
|
+
|
|
333
|
+
```json
|
|
334
|
+
{
|
|
335
|
+
"limit": 20,
|
|
336
|
+
"offset": 0,
|
|
337
|
+
"search": "john@example.com"
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
#### `admin_get_ai_costs`
|
|
342
|
+
Get AI cost breakdown by model and endpoint.
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"days": 30
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Example Queries
|
|
353
|
+
|
|
354
|
+
### Ask Helix about a peptide protocol
|
|
355
|
+
> "Use helix_query to ask: What is the evidence for BPC-157 in tendon healing? Include citations."
|
|
356
|
+
|
|
357
|
+
### Compare GLP-1 agonists
|
|
358
|
+
> "Use helix_compare to compare semaglutide vs tirzepatide for weight loss in T2D."
|
|
359
|
+
|
|
360
|
+
### Search protocols
|
|
361
|
+
> "Use protocol_search to find all protocols for testosterone replacement therapy."
|
|
362
|
+
|
|
363
|
+
### Check compound interactions
|
|
364
|
+
> "Use protocol_get_interactions to check interactions between semaglutide, metformin, and insulin."
|
|
365
|
+
|
|
366
|
+
### Get admin stats
|
|
367
|
+
> "Use admin_get_stats to show me the platform usage overview."
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Tier Requirements
|
|
372
|
+
|
|
373
|
+
| Tool | Minimum Tier |
|
|
374
|
+
|------|-------------|
|
|
375
|
+
| `helix_query` | Starter |
|
|
376
|
+
| `helix_protocol` | Starter |
|
|
377
|
+
| `helix_compare` | Professional |
|
|
378
|
+
| `helix_dossier_start` | Professional |
|
|
379
|
+
| `helix_dossier_status` | Professional |
|
|
380
|
+
| `helix_deep_analysis` | Professional |
|
|
381
|
+
| `run_clinical_workflow` | Professional |
|
|
382
|
+
| `monitor_protocol_updates` | Starter |
|
|
383
|
+
| All protocol/compound/evidence tools | No auth needed |
|
|
384
|
+
| `user_*` tools | Registered user |
|
|
385
|
+
| `admin_*` tools | Admin user |
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Development
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
# Build
|
|
393
|
+
npm run build
|
|
394
|
+
|
|
395
|
+
# Clean build
|
|
396
|
+
npm run clean && npm run build
|
|
397
|
+
|
|
398
|
+
# Run in stdio mode (for local testing)
|
|
399
|
+
HORMONALY_API_KEY=hk_live_... node dist/index.js
|
|
400
|
+
|
|
401
|
+
# Run in HTTP mode
|
|
402
|
+
HTTP_PORT=3100 HORMONALY_API_KEY=hk_live_... node dist/index.js
|
|
403
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hormonaly/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for the Hormonaly evidence platform \u2014 exposes Helix AI, protocol library, compounds, and evidence to Claude and other AI agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|