@cyanheads/pubchem-mcp-server 0.1.16 → 0.1.17
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 +4 -10
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-bioactivity.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-details.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-image.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-safety.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-compound-xrefs.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-summary.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/get-summary.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +23 -8
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/search-assays.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts +17 -1
- package/dist/mcp-server/tools/definitions/search-compounds.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-compounds.tool.js +32 -4
- package/dist/mcp-server/tools/definitions/search-compounds.tool.js.map +1 -1
- package/package.json +4 -6
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
9
|
-
[](./CHANGELOG.md) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [](https://modelcontextprotocol.io/) [](./LICENSE) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -171,17 +171,11 @@ No API keys are required — PubChem's API is freely accessible.
|
|
|
171
171
|
|
|
172
172
|
### Local Development
|
|
173
173
|
|
|
174
|
-
- **Build and run
|
|
174
|
+
- **Build and run:**
|
|
175
175
|
|
|
176
176
|
```sh
|
|
177
|
-
bun run
|
|
178
|
-
bun run start:
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
- **Run in dev mode (auto-reload):**
|
|
182
|
-
|
|
183
|
-
```sh
|
|
184
|
-
bun run dev:stdio # or dev:http
|
|
177
|
+
bun run rebuild
|
|
178
|
+
bun run start:stdio # or start:http
|
|
185
179
|
```
|
|
186
180
|
|
|
187
181
|
- **Run checks and tests:**
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,23 @@ import { allToolDefinitions } from './mcp-server/tools/definitions/index.js';
|
|
|
9
9
|
import { initPubChemClient } from './services/pubchem/pubchem-client.js';
|
|
10
10
|
await createApp({
|
|
11
11
|
tools: allToolDefinitions,
|
|
12
|
+
landing: {
|
|
13
|
+
tagline: 'Search PubChem for chemical compounds, properties, safety, bioactivity, and cross-references.',
|
|
14
|
+
repoRoot: 'https://github.com/cyanheads/pubchem-mcp-server',
|
|
15
|
+
links: [
|
|
16
|
+
{ label: 'PubChem', href: 'https://pubchem.ncbi.nlm.nih.gov/', external: true },
|
|
17
|
+
{
|
|
18
|
+
label: 'PUG REST docs',
|
|
19
|
+
href: 'https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest',
|
|
20
|
+
external: true,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'PUG View docs',
|
|
24
|
+
href: 'https://pubchem.ncbi.nlm.nih.gov/docs/pug-view',
|
|
25
|
+
external: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
12
29
|
setup() {
|
|
13
30
|
initPubChemClient();
|
|
14
31
|
},
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,KAAK;QACH,iBAAiB,EAAE,CAAC;IACtB,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,kBAAkB;IACzB,OAAO,EAAE;QACP,OAAO,EACL,+FAA+F;QACjG,QAAQ,EAAE,iDAAiD;QAC3D,KAAK,EAAE;YACL,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,mCAAmC,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/E;gBACE,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,gDAAgD;gBACtD,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,gDAAgD;gBACtD,QAAQ,EAAE,IAAI;aACf;SACF;KACF;IACD,KAAK;QACH,iBAAiB,EAAE,CAAC;IACtB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -29,5 +29,5 @@ export declare const getBioactivity: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
29
29
|
unit: z.ZodOptional<z.ZodString>;
|
|
30
30
|
}, z.core.$strip>>;
|
|
31
31
|
}, z.core.$strip>>;
|
|
32
|
-
}, z.core.$strip
|
|
32
|
+
}, z.core.$strip>, undefined>;
|
|
33
33
|
//# sourceMappingURL=get-bioactivity.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-bioactivity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-bioactivity.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-bioactivity.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-bioactivity.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;6BAsIzB,CAAC"}
|
|
@@ -74,5 +74,5 @@ export declare const getCompoundDetails: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
74
74
|
meshClasses: z.ZodArray<z.ZodString>;
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
76
|
}, z.core.$strip>>;
|
|
77
|
-
}, z.core.$strip
|
|
77
|
+
}, z.core.$strip>, undefined>;
|
|
78
78
|
//# sourceMappingURL=get-compound-details.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-compound-details.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-details.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AA2GjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-compound-details.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-details.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AA2GjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA4X7B,CAAC"}
|
|
@@ -15,5 +15,5 @@ export declare const getCompoundImage: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
15
15
|
mimeType: z.ZodString;
|
|
16
16
|
width: z.ZodNumber;
|
|
17
17
|
height: z.ZodNumber;
|
|
18
|
-
}, z.core.$strip
|
|
18
|
+
}, z.core.$strip>, undefined>;
|
|
19
19
|
//# sourceMappingURL=get-compound-image.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-compound-image.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-image.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-compound-image.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-image.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;6BAgD3B,CAAC"}
|
|
@@ -21,5 +21,5 @@ export declare const getCompoundSafety: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
21
21
|
}, z.core.$strip>>;
|
|
22
22
|
}, z.core.$strip>>;
|
|
23
23
|
source: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$strip
|
|
24
|
+
}, z.core.$strip>, undefined>;
|
|
25
25
|
//# sourceMappingURL=get-compound-safety.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-compound-safety.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-safety.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-compound-safety.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-safety.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;6BAuG5B,CAAC"}
|
|
@@ -17,5 +17,5 @@ export declare const getCompoundXrefs: import("@cyanheads/mcp-ts-core").ToolDefi
|
|
|
17
17
|
totalAvailable: z.ZodNumber;
|
|
18
18
|
truncated: z.ZodBoolean;
|
|
19
19
|
}, z.core.$strip>>;
|
|
20
|
-
}, z.core.$strip
|
|
20
|
+
}, z.core.$strip>, undefined>;
|
|
21
21
|
//# sourceMappingURL=get-compound-xrefs.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-compound-xrefs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-compound-xrefs.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-compound-xrefs.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAMjD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;6BA+G3B,CAAC"}
|
|
@@ -36,5 +36,5 @@ export declare const getSummary: import("@cyanheads/mcp-ts-core").ToolDefinition
|
|
|
36
36
|
lineage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
37
|
}, z.core.$strip>>;
|
|
38
38
|
}, z.core.$strip>>;
|
|
39
|
-
}, z.core.$strip
|
|
39
|
+
}, z.core.$strip>, undefined>;
|
|
40
40
|
//# sourceMappingURL=get-summary.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-summary.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-summary.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAkCjD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-summary.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-summary.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAkCjD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA2GrB,CAAC"}
|
|
@@ -27,7 +27,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
27
27
|
unit: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
28
|
}, import("zod/v4/core").$strip>>;
|
|
29
29
|
}, import("zod/v4/core").$strip>>;
|
|
30
|
-
}, import("zod/v4/core").$strip
|
|
30
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
31
31
|
cids: import("zod").ZodArray<import("zod").ZodNumber>;
|
|
32
32
|
properties: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
33
33
|
[x: string]: string;
|
|
@@ -97,7 +97,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
97
97
|
meshClasses: import("zod").ZodArray<import("zod").ZodString>;
|
|
98
98
|
}, import("zod/v4/core").$strip>>;
|
|
99
99
|
}, import("zod/v4/core").$strip>>;
|
|
100
|
-
}, import("zod/v4/core").$strip
|
|
100
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
101
101
|
cid: import("zod").ZodNumber;
|
|
102
102
|
size: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
103
103
|
small: "small";
|
|
@@ -109,7 +109,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
109
109
|
mimeType: import("zod").ZodString;
|
|
110
110
|
width: import("zod").ZodNumber;
|
|
111
111
|
height: import("zod").ZodNumber;
|
|
112
|
-
}, import("zod/v4/core").$strip
|
|
112
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
113
113
|
cid: import("zod").ZodNumber;
|
|
114
114
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
115
115
|
cid: import("zod").ZodNumber;
|
|
@@ -127,7 +127,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
127
127
|
}, import("zod/v4/core").$strip>>;
|
|
128
128
|
}, import("zod/v4/core").$strip>>;
|
|
129
129
|
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
-
}, import("zod/v4/core").$strip
|
|
130
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
131
131
|
cid: import("zod").ZodNumber;
|
|
132
132
|
xrefTypes: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
133
133
|
[x: string]: string;
|
|
@@ -141,7 +141,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
141
141
|
totalAvailable: import("zod").ZodNumber;
|
|
142
142
|
truncated: import("zod").ZodBoolean;
|
|
143
143
|
}, import("zod/v4/core").$strip>>;
|
|
144
|
-
}, import("zod/v4/core").$strip
|
|
144
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
145
145
|
entityType: import("zod").ZodEnum<{
|
|
146
146
|
assay: "assay";
|
|
147
147
|
gene: "gene";
|
|
@@ -173,7 +173,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
173
173
|
lineage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
174
174
|
}, import("zod/v4/core").$strip>>;
|
|
175
175
|
}, import("zod/v4/core").$strip>>;
|
|
176
|
-
}, import("zod/v4/core").$strip
|
|
176
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
177
177
|
targetType: import("zod").ZodEnum<{
|
|
178
178
|
proteinaccession: "proteinaccession";
|
|
179
179
|
genesymbol: "genesymbol";
|
|
@@ -187,7 +187,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
187
187
|
targetQuery: import("zod").ZodString;
|
|
188
188
|
totalFound: import("zod").ZodNumber;
|
|
189
189
|
aids: import("zod").ZodArray<import("zod").ZodNumber>;
|
|
190
|
-
}, import("zod/v4/core").$strip
|
|
190
|
+
}, import("zod/v4/core").$strip>, undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
191
191
|
searchType: import("zod").ZodEnum<{
|
|
192
192
|
substructure: "substructure";
|
|
193
193
|
superstructure: "superstructure";
|
|
@@ -221,5 +221,20 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
221
221
|
identifier: import("zod").ZodOptional<import("zod").ZodString>;
|
|
222
222
|
properties: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
223
223
|
}, import("zod/v4/core").$strip>>;
|
|
224
|
-
}, import("zod/v4/core").$strip
|
|
224
|
+
}, import("zod/v4/core").$strip>, readonly [{
|
|
225
|
+
readonly reason: "missing_identifier_args";
|
|
226
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
227
|
+
readonly when: "searchType is \"identifier\" but identifierType or identifiers were omitted";
|
|
228
|
+
readonly recovery: "Set identifierType (name/smiles/inchikey) and pass a non-empty identifiers array (1-25 entries).";
|
|
229
|
+
}, {
|
|
230
|
+
readonly reason: "missing_formula";
|
|
231
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
232
|
+
readonly when: "searchType is \"formula\" but the formula field was omitted";
|
|
233
|
+
readonly recovery: "Pass formula in Hill notation, for example \"C6H12O6\" or \"CaH2O2\".";
|
|
234
|
+
}, {
|
|
235
|
+
readonly reason: "missing_structure_args";
|
|
236
|
+
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
|
|
237
|
+
readonly when: "substructure/superstructure/similarity search missing query or queryType";
|
|
238
|
+
readonly recovery: "Provide both query (SMILES string or CID as string) and queryType (\"smiles\" or \"cid\").";
|
|
239
|
+
}]>)[];
|
|
225
240
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAS9B,CAAC"}
|
|
@@ -18,5 +18,5 @@ export declare const searchAssays: import("@cyanheads/mcp-ts-core").ToolDefiniti
|
|
|
18
18
|
targetQuery: z.ZodString;
|
|
19
19
|
totalFound: z.ZodNumber;
|
|
20
20
|
aids: z.ZodArray<z.ZodNumber>;
|
|
21
|
-
}, z.core.$strip
|
|
21
|
+
}, z.core.$strip>, undefined>;
|
|
22
22
|
//# sourceMappingURL=search-assays.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-assays.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-assays.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"search-assays.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-assays.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;6BAiFvB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @module mcp-server/tools/definitions/search-compounds
|
|
5
5
|
*/
|
|
6
6
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
8
|
export declare const searchCompounds: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
9
|
searchType: z.ZodEnum<{
|
|
9
10
|
substructure: "substructure";
|
|
@@ -38,5 +39,20 @@ export declare const searchCompounds: import("@cyanheads/mcp-ts-core").ToolDefin
|
|
|
38
39
|
identifier: z.ZodOptional<z.ZodString>;
|
|
39
40
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
41
|
}, z.core.$strip>>;
|
|
41
|
-
}, z.core.$strip
|
|
42
|
+
}, z.core.$strip>, readonly [{
|
|
43
|
+
readonly reason: "missing_identifier_args";
|
|
44
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
45
|
+
readonly when: "searchType is \"identifier\" but identifierType or identifiers were omitted";
|
|
46
|
+
readonly recovery: "Set identifierType (name/smiles/inchikey) and pass a non-empty identifiers array (1-25 entries).";
|
|
47
|
+
}, {
|
|
48
|
+
readonly reason: "missing_formula";
|
|
49
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
50
|
+
readonly when: "searchType is \"formula\" but the formula field was omitted";
|
|
51
|
+
readonly recovery: "Pass formula in Hill notation, for example \"C6H12O6\" or \"CaH2O2\".";
|
|
52
|
+
}, {
|
|
53
|
+
readonly reason: "missing_structure_args";
|
|
54
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
55
|
+
readonly when: "substructure/superstructure/similarity search missing query or queryType";
|
|
56
|
+
readonly recovery: "Provide both query (SMILES string or CID as string) and queryType (\"smiles\" or \"cid\").";
|
|
57
|
+
}]>;
|
|
42
58
|
//# sourceMappingURL=search-compounds.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-compounds.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-compounds.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-compounds.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-compounds.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgBjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuQ1B,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @module mcp-server/tools/definitions/search-compounds
|
|
5
5
|
*/
|
|
6
6
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
8
|
import { getPubChemClient } from '../../../services/pubchem/pubchem-client.js';
|
|
8
9
|
import { COMPOUND_PROPERTIES } from '../../../services/pubchem/types.js';
|
|
9
10
|
const searchTypeEnum = z.enum([
|
|
@@ -99,6 +100,26 @@ export const searchCompounds = tool('pubchem_search_compounds', {
|
|
|
99
100
|
.describe('Matching compound entry.'))
|
|
100
101
|
.describe('Matching compounds.'),
|
|
101
102
|
}),
|
|
103
|
+
errors: [
|
|
104
|
+
{
|
|
105
|
+
reason: 'missing_identifier_args',
|
|
106
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
107
|
+
when: 'searchType is "identifier" but identifierType or identifiers were omitted',
|
|
108
|
+
recovery: 'Set identifierType (name/smiles/inchikey) and pass a non-empty identifiers array (1-25 entries).',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
reason: 'missing_formula',
|
|
112
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
113
|
+
when: 'searchType is "formula" but the formula field was omitted',
|
|
114
|
+
recovery: 'Pass formula in Hill notation, for example "C6H12O6" or "CaH2O2".',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
reason: 'missing_structure_args',
|
|
118
|
+
code: JsonRpcErrorCode.InvalidParams,
|
|
119
|
+
when: 'substructure/superstructure/similarity search missing query or queryType',
|
|
120
|
+
recovery: 'Provide both query (SMILES string or CID as string) and queryType ("smiles" or "cid").',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
102
123
|
async handler(input, ctx) {
|
|
103
124
|
const client = getPubChemClient();
|
|
104
125
|
let allCids = [];
|
|
@@ -107,7 +128,9 @@ export const searchCompounds = tool('pubchem_search_compounds', {
|
|
|
107
128
|
case 'identifier': {
|
|
108
129
|
const { identifierType, identifiers } = input;
|
|
109
130
|
if (!identifierType || !identifiers) {
|
|
110
|
-
throw
|
|
131
|
+
throw ctx.fail('missing_identifier_args', undefined, {
|
|
132
|
+
...ctx.recoveryFor('missing_identifier_args'),
|
|
133
|
+
});
|
|
111
134
|
}
|
|
112
135
|
const lookups = identifiers.map(async (id) => {
|
|
113
136
|
let cids;
|
|
@@ -131,8 +154,11 @@ export const searchCompounds = tool('pubchem_search_compounds', {
|
|
|
131
154
|
break;
|
|
132
155
|
}
|
|
133
156
|
case 'formula': {
|
|
134
|
-
if (!input.formula)
|
|
135
|
-
throw
|
|
157
|
+
if (!input.formula) {
|
|
158
|
+
throw ctx.fail('missing_formula', undefined, {
|
|
159
|
+
...ctx.recoveryFor('missing_formula'),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
136
162
|
allCids = await client.searchByFormula(input.formula, input.allowOtherElements);
|
|
137
163
|
break;
|
|
138
164
|
}
|
|
@@ -140,7 +166,9 @@ export const searchCompounds = tool('pubchem_search_compounds', {
|
|
|
140
166
|
case 'superstructure':
|
|
141
167
|
case 'similarity': {
|
|
142
168
|
if (!input.query || !input.queryType) {
|
|
143
|
-
throw
|
|
169
|
+
throw ctx.fail('missing_structure_args', undefined, {
|
|
170
|
+
...ctx.recoveryFor('missing_structure_args'),
|
|
171
|
+
});
|
|
144
172
|
}
|
|
145
173
|
allCids = await client.searchByStructure(input.searchType, input.query, input.queryType, input.threshold);
|
|
146
174
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-compounds.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-compounds.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5B,YAAY;IACZ,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,YAAY;CACb,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAClE,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAChD,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAuD,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,0BAA0B,EAAE;IAC9D,KAAK,EAAE,kBAAkB;IACzB,WAAW,EACT,6DAA6D;QAC7D,uFAAuF;QACvF,kFAAkF;QAClF,4EAA4E;QAC5E,wEAAwE;QACxE,iFAAiF;QACjF,+EAA+E;IACjF,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;KACpB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,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E,CAAC;aACV,KAAK,CAAC,YAAY,CAAC;aACnB,QAAQ,EAAE;aACV,QAAQ,CACP,uFAAuF;YACrF,kEAAkE,CACrE;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC5D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;QAC5E,OAAO,EAAE,CAAC;aACP,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;YAChD,UAAU,EAAE,CAAC;iBACV,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,iDAAiD,CAAC;YAC9D,UAAU,EAAE,CAAC;iBACV,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;iBAC/B,QAAQ,EAAE;iBACV,QAAQ,CAAC,qCAAqC,CAAC;SACnD,CAAC;aACD,QAAQ,CAAC,0BAA0B,CAAC,CACxC;aACA,QAAQ,CAAC,qBAAqB,CAAC;KACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"search-compounds.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-compounds.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5B,YAAY;IACZ,SAAS;IACT,cAAc;IACd,gBAA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IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/pubchem-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "MCP server for the PubChem chemical database. Search compounds, fetch properties, safety data, bioactivity, cross-references, and entity summaries. STDIO & Streamable HTTP.",
|
|
5
5
|
"mcpName": "io.github.cyanheads/pubchem-mcp-server",
|
|
6
6
|
"type": "module",
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
"format": "biome check --write --unsafe .",
|
|
20
20
|
"lint:mcp": "bun scripts/lint-mcp.ts",
|
|
21
21
|
"test": "vitest run",
|
|
22
|
-
"dev:stdio": "bun --watch src/index.ts",
|
|
23
|
-
"dev:http": "MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
|
|
24
22
|
"start:stdio": "node dist/index.js",
|
|
25
23
|
"start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js"
|
|
26
24
|
},
|
|
@@ -62,15 +60,15 @@
|
|
|
62
60
|
"access": "public"
|
|
63
61
|
},
|
|
64
62
|
"dependencies": {
|
|
65
|
-
"@cyanheads/mcp-ts-core": "^0.
|
|
63
|
+
"@cyanheads/mcp-ts-core": "^0.8.8",
|
|
66
64
|
"pino-pretty": "^13.1.3"
|
|
67
65
|
},
|
|
68
66
|
"devDependencies": {
|
|
69
|
-
"@biomejs/biome": "^2.4.
|
|
67
|
+
"@biomejs/biome": "^2.4.14",
|
|
70
68
|
"@types/node": "^25.6.0",
|
|
71
69
|
"depcheck": "^1.4.7",
|
|
72
70
|
"ignore": "^7.0.5",
|
|
73
|
-
"tsc-alias": "^1.8.
|
|
71
|
+
"tsc-alias": "^1.8.17",
|
|
74
72
|
"typescript": "^6.0.3",
|
|
75
73
|
"vitest": "^4.1.5"
|
|
76
74
|
}
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/pubchem-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.17",
|
|
10
10
|
"remotes": [
|
|
11
11
|
{
|
|
12
12
|
"type": "streamable-http",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/pubchem-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.1.
|
|
22
|
+
"version": "0.1.17",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{ "type": "positional", "value": "run" },
|
|
25
25
|
{ "type": "positional", "value": "start:stdio" }
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
43
43
|
"identifier": "@cyanheads/pubchem-mcp-server",
|
|
44
44
|
"runtimeHint": "bun",
|
|
45
|
-
"version": "0.1.
|
|
45
|
+
"version": "0.1.17",
|
|
46
46
|
"packageArguments": [
|
|
47
47
|
{ "type": "positional", "value": "run" },
|
|
48
48
|
{ "type": "positional", "value": "start:http" }
|