@pipeworx/mcp-inxight-drugs 0.0.0-stage → 0.1.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 +174 -2
- package/bin/cli.js +17 -0
- package/package.json +30 -4
- package/server.json +18 -0
- package/src/index.ts +1129 -0
- package/src/server.ts +45 -0
- package/tsconfig.json +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mojibake Inc.
|
|
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
CHANGED
|
@@ -1,3 +1,175 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @pipeworx/inxight-drugs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Drug development status by indication from NCATS Inxight Drugs: for any drug or
|
|
4
|
+
substance, the conditions it is approved for or in trials for, the highest phase
|
|
5
|
+
reached per condition, its approval history, originator and targets.
|
|
6
|
+
|
|
7
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1764+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
|
|
8
|
+
|
|
9
|
+
## Tools
|
|
10
|
+
|
|
11
|
+
- `inxight_substance(name | unii)` — one substance by name or FDA UNII: every
|
|
12
|
+
indication with its highest phase (Approved / Phase III / II / I) and the trial
|
|
13
|
+
or label URL behind it, the overall highest development event, first approval
|
|
14
|
+
year, originator, targets with pharmacology and potency, synonyms, and
|
|
15
|
+
ChEMBL / DrugBank / PubChem / CAS / MeSH / RxCUI ids. Answers "what is
|
|
16
|
+
psilocybin being developed for, and how far along".
|
|
17
|
+
- `inxight_search(query, development_status?, limit?, offset?)` — free-text
|
|
18
|
+
substance search; returns UNIIs plus breakdowns of the hits by development
|
|
19
|
+
status, highest phase and condition.
|
|
20
|
+
- `inxight_indication(condition, development_status?, limit?, offset?)` —
|
|
21
|
+
substances for a disease, each with the highest phase reached FOR THAT
|
|
22
|
+
condition. `development_status: "Clinical"` keeps only investigational drugs.
|
|
23
|
+
Also returns the related condition labels Inxight uses ("Ischemic stroke",
|
|
24
|
+
"Acute ischemic stroke") for drilling down.
|
|
25
|
+
|
|
26
|
+
An unknown drug or condition returns `found: false` with a `reason` and a hint;
|
|
27
|
+
an upstream HTTP error throws.
|
|
28
|
+
|
|
29
|
+
For mechanism of action and target-disease evidence, use the `chembl` and
|
|
30
|
+
`opentargets` packs — `inxight_substance` returns the ChEMBL id to hop across.
|
|
31
|
+
For individual trials, use `clinicaltrials`.
|
|
32
|
+
|
|
33
|
+
## Auth
|
|
34
|
+
|
|
35
|
+
Keyless.
|
|
36
|
+
|
|
37
|
+
## Data sources
|
|
38
|
+
|
|
39
|
+
Inxight Drugs (<https://drugs.ncats.io>) is run by NIH's National Center for
|
|
40
|
+
Advancing Translational Sciences. It is a GSRS deployment that joins the FDA
|
|
41
|
+
Global Substance Registration System with ClinicalTrials.gov, DrugBank,
|
|
42
|
+
Drugs@FDA, DailyMed and orphan designations. The site is an Angular app; the
|
|
43
|
+
JSON API it calls is public but undocumented. Endpoints used, all GET:
|
|
44
|
+
|
|
45
|
+
- <https://drugs.ncats.io/api/v1/substances/search?q=psilocybin&top=10> — search.
|
|
46
|
+
Exact-name match is `q=root_names_name:"^PSILOCYBIN$"`; UNII lookup is
|
|
47
|
+
`q=root_approvalID:"2RV7212BP0"`. Filter with repeated
|
|
48
|
+
`facet=<Facet Name>/<value>`, e.g. `facet=Condition/Stroke` and
|
|
49
|
+
`facet=Development Status/Clinical` (facets AND together).
|
|
50
|
+
- <https://drugs.ncats.io/api/v1/substances/search/@facets?kind=ix.ginas.models.v1.Substance&field=Condition&ffilter=stroke&fetch=25>
|
|
51
|
+
— the condition labels containing a string, with counts. Facet values are
|
|
52
|
+
case-sensitive, so `inxight_indication` resolves the caller's text here first.
|
|
53
|
+
- `https://drugs.ncats.io/api/v1/substances(<uuid or UNII>)?view=full` — names
|
|
54
|
+
and code cross-references.
|
|
55
|
+
- `https://drugs.ncats.io/api/v1/substances(<uuid or UNII>)/@additional` — the
|
|
56
|
+
Inxight layer: a flat list of `{name, value}` records. The ones used are
|
|
57
|
+
`Conditions` (per-indication `highestPhase` + `highestPhaseUri`), `Targets`,
|
|
58
|
+
`Stitcher Highest Phase`, `Highest Development Event`,
|
|
59
|
+
`Earliest Approved Event`, `Approval Year`, `Originator`, `Description`.
|
|
60
|
+
|
|
61
|
+
Things worth knowing:
|
|
62
|
+
|
|
63
|
+
- An unrecognized id in `substances(<id>)` answers **HTTP 500** ("Invalid UUID
|
|
64
|
+
string"), not 404 — which is why UNII lookup goes through search instead.
|
|
65
|
+
- `Conditions` always carries a placeholder row labelled `Unknown`; it is dropped.
|
|
66
|
+
- Search order is the upstream's, not relevance or phase. `inxight_indication`
|
|
67
|
+
re-sorts the page it fetched by phase for the condition.
|
|
68
|
+
- Condition phases come from a ClinicalTrials.gov snapshot (the `Stitcher Label`
|
|
69
|
+
records say e.g. "ClinicalTrials, February 2021"), so a programme that moved
|
|
70
|
+
phase recently can read one phase behind. Check `clinicaltrials` for the
|
|
71
|
+
latest trial.
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
74
|
+
|
|
75
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"inxight-drugs": {
|
|
81
|
+
"url": "https://gateway.pipeworx.io/inxight-drugs/mcp"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### What this endpoint actually serves
|
|
88
|
+
|
|
89
|
+
`tools/list` at `https://gateway.pipeworx.io/inxight-drugs/mcp` returns the tools in the table
|
|
90
|
+
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
|
|
91
|
+
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
|
|
92
|
+
gateway-wide set. So the tool count you see is larger than this table: a
|
|
93
|
+
single-pack endpoint currently lists roughly 30 shared tools alongside the
|
|
94
|
+
pack's own. The connection's `initialize` response states its exact scope, and
|
|
95
|
+
is the authoritative answer for a given day.
|
|
96
|
+
|
|
97
|
+
This is deliberate, not multiplexing by accident. The meta-tools are what let a
|
|
98
|
+
scoped connection answer a question this pack does not cover — via
|
|
99
|
+
`ask_pipeworx`, which routes across the whole catalog — without you adding a
|
|
100
|
+
second MCP server. There is currently no way to mount a pack endpoint without
|
|
101
|
+
them; if the extra schemas cost you more context than the routing is worth,
|
|
102
|
+
connect to the full gateway once rather than to several pack endpoints.
|
|
103
|
+
|
|
104
|
+
Or connect to the full Pipeworx gateway to get every pack's tools listed
|
|
105
|
+
directly, instead of just this one's:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcpServers": {
|
|
110
|
+
"pipeworx": {
|
|
111
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Both URLs reach the same gateway and the same 1764+ data sources. The
|
|
118
|
+
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
|
|
119
|
+
reaches all of them from either one.
|
|
120
|
+
|
|
121
|
+
## No MCP client? Call it over HTTP
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
curl -X POST https://gateway.pipeworx.io/v1/tools/inxight_substance \
|
|
125
|
+
-H 'Content-Type: application/json' \
|
|
126
|
+
-d '{"name":"psilocybin"}'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/inxight_substance`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
|
|
130
|
+
|
|
131
|
+
## Standalone (no gateway account)
|
|
132
|
+
|
|
133
|
+
This package also runs as a local stdio MCP server — no Pipeworx account, no
|
|
134
|
+
gateway round-trip:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"mcpServers": {
|
|
139
|
+
"inxight-drugs": {
|
|
140
|
+
"command": "npx",
|
|
141
|
+
"args": ["-y", "@pipeworx/mcp-inxight-drugs"]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Or run it directly to confirm it starts:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx -y @pipeworx/mcp-inxight-drugs
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
|
|
154
|
+
for **only** this pack's tools — none of the shared meta-tools the gateway
|
|
155
|
+
connection above adds. Same source, same tools, no ask_pipeworx routing.
|
|
156
|
+
|
|
157
|
+
## Using with ask_pipeworx
|
|
158
|
+
|
|
159
|
+
Instead of calling tools directly, you can ask questions in plain English —
|
|
160
|
+
this works on the pack endpoint above as well as on the full gateway:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
ask_pipeworx({ question: "your question about Inxight Drugs data" })
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
167
|
+
|
|
168
|
+
## More
|
|
169
|
+
|
|
170
|
+
- [Docs and guides](https://pipeworx.io/docs)
|
|
171
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//
|
|
3
|
+
// Entry point for `npx @pipeworx/mcp-<slug>`.
|
|
4
|
+
//
|
|
5
|
+
// Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
|
|
6
|
+
// tsx sidesteps every extensionless-import / bare-JSON-import edge case a
|
|
7
|
+
// per-pack tsc build would have to solve one pack at a time). This file
|
|
8
|
+
// registers tsx's ESM loader programmatically, then hands off to src/server.ts,
|
|
9
|
+
// which wraps the pack's {tools, callTool} export in a stdio MCP server.
|
|
10
|
+
//
|
|
11
|
+
// Copied verbatim into every published pack repo by scripts/publish-pack.sh —
|
|
12
|
+
// edit this file, not a per-pack copy.
|
|
13
|
+
import { register } from 'tsx/esm/api';
|
|
14
|
+
|
|
15
|
+
register();
|
|
16
|
+
|
|
17
|
+
await import('../src/server.ts');
|
package/package.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipeworx/mcp-inxight-drugs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Inxight Drugs — NCATS drug development status by indication.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mcp-inxight-drugs": "bin/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "inxight-drugs"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/pipeworx-io/mcp-inxight-drugs.git"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"typecheck": "tsc --noEmit"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
22
|
+
"tsx": "^4.19.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.9.3",
|
|
26
|
+
"@cloudflare/workers-types": "^4.20260405.1"
|
|
27
|
+
},
|
|
28
|
+
"pipeworx": {
|
|
29
|
+
"sourceHash": "v1-2672e38fe8bfb1c86bffa66b62434f4640e13a034b2b357b522b513dd9f8cf70",
|
|
30
|
+
"sourceCommit": "0ce6905893fe8da0d285be2f05754a4200d67371"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/inxight-drugs",
|
|
4
|
+
"title": "Inxight Drugs",
|
|
5
|
+
"description": "Inxight Drugs — NCATS drug development status by indication.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/inxight-drugs",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-inxight-drugs",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/inxight-drugs/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|