@cyanheads/interpro-mcp-server 0.0.0-stage → 0.1.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.
Files changed (77) hide show
  1. package/AGENTS.md +375 -0
  2. package/CLAUDE.md +375 -0
  3. package/Dockerfile +186 -0
  4. package/LICENSE +201 -0
  5. package/README.md +263 -2
  6. package/changelog/0.1.x/0.1.1.md +20 -0
  7. package/changelog/template.md +151 -0
  8. package/dist/index.d.ts +7 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +34 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.d.ts +177 -0
  13. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.d.ts.map +1 -0
  14. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.js +192 -0
  15. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.js.map +1 -0
  16. package/dist/mcp-server/tools/definitions/interpro-get-clan.tool.d.ts +160 -0
  17. package/dist/mcp-server/tools/definitions/interpro-get-clan.tool.d.ts.map +1 -0
  18. package/dist/mcp-server/tools/definitions/interpro-get-clan.tool.js +259 -0
  19. package/dist/mcp-server/tools/definitions/interpro-get-clan.tool.js.map +1 -0
  20. package/dist/mcp-server/tools/definitions/interpro-get-entry.tool.d.ts +130 -0
  21. package/dist/mcp-server/tools/definitions/interpro-get-entry.tool.d.ts.map +1 -0
  22. package/dist/mcp-server/tools/definitions/interpro-get-entry.tool.js +100 -0
  23. package/dist/mcp-server/tools/definitions/interpro-get-entry.tool.js.map +1 -0
  24. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.d.ts +172 -0
  25. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.d.ts.map +1 -0
  26. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.js +374 -0
  27. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.js.map +1 -0
  28. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.d.ts +89 -0
  29. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.d.ts.map +1 -0
  30. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.js +99 -0
  31. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.js.map +1 -0
  32. package/dist/mcp-server/tools/definitions/interpro-search-entries.tool.d.ts +184 -0
  33. package/dist/mcp-server/tools/definitions/interpro-search-entries.tool.d.ts.map +1 -0
  34. package/dist/mcp-server/tools/definitions/interpro-search-entries.tool.js +155 -0
  35. package/dist/mcp-server/tools/definitions/interpro-search-entries.tool.js.map +1 -0
  36. package/dist/services/interpro/budget.d.ts +26 -0
  37. package/dist/services/interpro/budget.d.ts.map +1 -0
  38. package/dist/services/interpro/budget.js +41 -0
  39. package/dist/services/interpro/budget.js.map +1 -0
  40. package/dist/services/interpro/cursors.d.ts +25 -0
  41. package/dist/services/interpro/cursors.d.ts.map +1 -0
  42. package/dist/services/interpro/cursors.js +99 -0
  43. package/dist/services/interpro/cursors.js.map +1 -0
  44. package/dist/services/interpro/format.d.ts +17 -0
  45. package/dist/services/interpro/format.d.ts.map +1 -0
  46. package/dist/services/interpro/format.js +130 -0
  47. package/dist/services/interpro/format.js.map +1 -0
  48. package/dist/services/interpro/http-adapter.d.ts +11 -0
  49. package/dist/services/interpro/http-adapter.d.ts.map +1 -0
  50. package/dist/services/interpro/http-adapter.js +134 -0
  51. package/dist/services/interpro/http-adapter.js.map +1 -0
  52. package/dist/services/interpro/interpro-service.d.ts +57 -0
  53. package/dist/services/interpro/interpro-service.d.ts.map +1 -0
  54. package/dist/services/interpro/interpro-service.js +284 -0
  55. package/dist/services/interpro/interpro-service.js.map +1 -0
  56. package/dist/services/interpro/reference.d.ts +31 -0
  57. package/dist/services/interpro/reference.d.ts.map +1 -0
  58. package/dist/services/interpro/reference.js +122 -0
  59. package/dist/services/interpro/reference.js.map +1 -0
  60. package/dist/services/interpro/relationships.d.ts +38 -0
  61. package/dist/services/interpro/relationships.d.ts.map +1 -0
  62. package/dist/services/interpro/relationships.js +70 -0
  63. package/dist/services/interpro/relationships.js.map +1 -0
  64. package/dist/services/interpro/routing.d.ts +24 -0
  65. package/dist/services/interpro/routing.d.ts.map +1 -0
  66. package/dist/services/interpro/routing.js +106 -0
  67. package/dist/services/interpro/routing.js.map +1 -0
  68. package/dist/services/interpro/schemas.d.ts +182 -0
  69. package/dist/services/interpro/schemas.d.ts.map +1 -0
  70. package/dist/services/interpro/schemas.js +215 -0
  71. package/dist/services/interpro/schemas.js.map +1 -0
  72. package/dist/services/interpro/upstream-errors.d.ts +43 -0
  73. package/dist/services/interpro/upstream-errors.d.ts.map +1 -0
  74. package/dist/services/interpro/upstream-errors.js +49 -0
  75. package/dist/services/interpro/upstream-errors.js.map +1 -0
  76. package/package.json +103 -4
  77. package/server.json +85 -0
@@ -0,0 +1,284 @@
1
+ import { z } from '@cyanheads/mcp-ts-core';
2
+ import { JsonRpcErrorCode, McpError, notFound, serviceUnavailable, timeout, validationError, } from '@cyanheads/mcp-ts-core/errors';
3
+ import { createPacer, defaultIsTransient, httpErrorFromResponse, withRetry, } from '@cyanheads/mcp-ts-core/utils';
4
+ import { interproHttpFetch, MAX_RESPONSE_BYTES } from './http-adapter.js';
5
+ import { apiUrl } from './routing.js';
6
+ import { isAccession, JsonObjectSchema, JsonValueSchema } from './schemas.js';
7
+ const pacer = createPacer({
8
+ name: 'interpro',
9
+ minStartGapMs: 1000,
10
+ maxConcurrent: 1,
11
+ maxQueueDepth: 20,
12
+ });
13
+ /** Upstream fields of a 410 body that are echoed in the withdrawal error. */
14
+ const WITHDRAWAL_FIELDS = new Set([
15
+ 'accession',
16
+ 'source_database',
17
+ 'deletion_date',
18
+ 'short_name',
19
+ 'history',
20
+ ]);
21
+ /**
22
+ * Single-line forms a withdrawal date or short name must match whole before the message names it;
23
+ * any other upstream value stays in error data only.
24
+ */
25
+ const WITHDRAWAL_DATE = /^\d{4}-\d{2}-\d{2}(?:T[\d:.]+Z?)?$/;
26
+ const SHORT_NAME = /^[A-Za-z0-9_.:+-]{1,100}$/;
27
+ const RECORD_NOUNS = {
28
+ entry_not_found: 'entry',
29
+ clan_not_found: 'set',
30
+ protein_not_found: 'protein',
31
+ };
32
+ /** Name a record in a caller-facing message, e.g. `entry PF00870 in pfam`. */
33
+ const describeRecord = ({ reason, accession, sourceDatabase }) => `${RECORD_NOUNS[reason]} ${accession} in ${sourceDatabase}`;
34
+ /** InterPro service; inject only the network seam, retaining the real domain behavior. */
35
+ export class InterproService {
36
+ fetch;
37
+ constructor(fetch = interproHttpFetch) {
38
+ this.fetch = fetch;
39
+ }
40
+ /** Start a 50-second call budget, once per handler invocation. */
41
+ begin(ctx) {
42
+ return { ctx, deadline: performance.now() + 50_000 };
43
+ }
44
+ /** Fetch, classify, parse and validate one fixed-origin operation within a shared call. */
45
+ async request(call, segments, query, schema, options = {}) {
46
+ call.ctx.signal.throwIfAborted();
47
+ const remaining = call.deadline - performance.now();
48
+ if (remaining <= 0)
49
+ throw timeout('InterPro call exhausted its 50-second budget.', {
50
+ reason: 'retry_deadline_exceeded',
51
+ retryable: true,
52
+ deadlineMs: 50_000,
53
+ });
54
+ const sourceUrl = apiUrl(segments, query);
55
+ return await withRetry(async ({ signal }) => pacer.run(async () => {
56
+ const attemptMs = Math.min(15_000, call.deadline - performance.now());
57
+ const controller = new AbortController();
58
+ const timer = setTimeout(() => controller.abort(timeout('InterPro attempt deadline elapsed.', {
59
+ reason: 'upstream_timeout',
60
+ retryable: true,
61
+ })), Math.max(0, attemptMs));
62
+ const attemptSignal = AbortSignal.any([signal, controller.signal, call.ctx.signal]);
63
+ try {
64
+ const response = await this.fetch(sourceUrl, {
65
+ signal: attemptSignal,
66
+ headers: { Accept: 'application/json', 'Accept-Encoding': 'identity' },
67
+ redirect: 'manual',
68
+ });
69
+ attemptSignal.throwIfAborted();
70
+ if ((response.status === 400 || response.status === 404) && options.continuation)
71
+ throw validationError('InterPro rejected the continuation cursor.', {
72
+ reason: 'invalid_cursor',
73
+ retryable: false,
74
+ status: response.status,
75
+ });
76
+ const { missing } = options;
77
+ if (missing &&
78
+ (response.status === 404 || (response.status === 204 && !missing.list)))
79
+ throw notFound(`InterPro could not find ${describeRecord(missing)}.`, {
80
+ reason: missing.reason,
81
+ retryable: false,
82
+ status: response.status,
83
+ accession: missing.accession,
84
+ sourceDatabase: missing.sourceDatabase,
85
+ });
86
+ if (response.status === 204)
87
+ return { data: null, sourceUrl, headers: response.headers };
88
+ if (response.status === 410) {
89
+ const body = await readBody(response, attemptSignal);
90
+ let withdrawal = {};
91
+ try {
92
+ const parsed = JsonObjectSchema.parse(JSON.parse(body));
93
+ withdrawal = Object.fromEntries(Object.entries(parsed).filter(([key, value]) => WITHDRAWAL_FIELDS.has(key) && JSON.stringify(value).length <= 4096));
94
+ }
95
+ catch {
96
+ /* A withdrawn record need not include valid metadata. */
97
+ }
98
+ const { accession, deletion_date: deleted, short_name: shortName } = withdrawal;
99
+ const subject = missing
100
+ ? describeRecord(missing)
101
+ : isAccession(accession)
102
+ ? `record ${accession}`
103
+ : 'the requested record';
104
+ const on = typeof deleted === 'string' && WITHDRAWAL_DATE.test(deleted)
105
+ ? ` on ${deleted}`
106
+ : '';
107
+ const named = typeof shortName === 'string' && SHORT_NAME.test(shortName)
108
+ ? ` (short name ${shortName})`
109
+ : '';
110
+ throw notFound(`InterPro reports that ${subject} was withdrawn${on}${named}.`, {
111
+ reason: 'entry_withdrawn',
112
+ retryable: false,
113
+ status: 410,
114
+ ...withdrawal,
115
+ // The canonical accession the message names wins over upstream's spelling.
116
+ ...(missing ? { accession: missing.accession } : {}),
117
+ });
118
+ }
119
+ if (!response.ok) {
120
+ const status = response.status;
121
+ const reason = status === 408 || status === 504
122
+ ? 'upstream_timeout'
123
+ : status === 429
124
+ ? 'upstream_rate_limited'
125
+ : status >= 500
126
+ ? 'upstream_unavailable'
127
+ : 'upstream_rejected';
128
+ throw await httpErrorFromResponse(response, {
129
+ service: 'InterPro',
130
+ captureBody: false,
131
+ codeOverride: (value) => value < 500 && value !== 408 && value !== 429
132
+ ? JsonRpcErrorCode.ServiceUnavailable
133
+ : undefined,
134
+ data: {
135
+ reason,
136
+ retryable: (status >= 500 && status !== 501) || status === 408 || status === 429,
137
+ },
138
+ });
139
+ }
140
+ const encoding = response.headers.get('content-encoding');
141
+ if (encoding && encoding.toLowerCase() !== 'identity')
142
+ throw serviceUnavailable('InterPro returned an unexpected content encoding.', {
143
+ reason: 'upstream_shape_invalid',
144
+ retryable: false,
145
+ });
146
+ const body = await readBody(response, attemptSignal);
147
+ if (/^\s*<(?:!doctype\s+html|html[\s>])/i.test(body))
148
+ throw serviceUnavailable('InterPro returned HTML instead of JSON.', {
149
+ reason: 'upstream_unavailable',
150
+ retryable: true,
151
+ });
152
+ let json;
153
+ try {
154
+ json = JSON.parse(body);
155
+ }
156
+ catch (cause) {
157
+ throw serviceUnavailable('InterPro returned malformed JSON.', { reason: 'upstream_shape_invalid', retryable: false }, { cause });
158
+ }
159
+ const parsed = schema.safeParse(json);
160
+ if (!parsed.success)
161
+ throw serviceUnavailable('InterPro JSON does not match the required response structure.', { reason: 'upstream_shape_invalid', retryable: false });
162
+ attemptSignal.throwIfAborted();
163
+ if (performance.now() > call.deadline)
164
+ throw timeout('InterPro call exhausted its total budget.', {
165
+ reason: 'retry_deadline_exceeded',
166
+ retryable: true,
167
+ });
168
+ return { data: parsed.data, sourceUrl, headers: response.headers };
169
+ }
170
+ catch (cause) {
171
+ if (call.ctx.signal.aborted)
172
+ throw call.ctx.signal.reason;
173
+ if (signal.aborted)
174
+ throw signal.reason;
175
+ if (controller.signal.aborted)
176
+ throw controller.signal.reason;
177
+ if (cause instanceof McpError)
178
+ throw cause;
179
+ throw serviceUnavailable('InterPro network request failed.', { reason: 'upstream_unavailable', retryable: true }, { cause });
180
+ }
181
+ finally {
182
+ clearTimeout(timer);
183
+ }
184
+ }, { signal, maxWaitMs: Math.max(0, Math.min(5000, call.deadline - performance.now())) }), {
185
+ signal: call.ctx.signal,
186
+ context: call.ctx,
187
+ operation: 'interpro.request',
188
+ deadlineMs: remaining,
189
+ maxRetries: 1,
190
+ baseDelayMs: 1000,
191
+ maxDelayMs: 3000,
192
+ isTransient: defaultIsTransient,
193
+ });
194
+ }
195
+ /** Retrieve a coherent current release and its complete database-count object. */
196
+ async release(ctx) {
197
+ const call = this.begin(ctx);
198
+ const releases = await this.request(call, ['utils', 'release'], {}, z.record(z.string().regex(/^\d+(?:\.\d+)*$/), z.string()));
199
+ const counts = await this.request(call, ['entry'], {}, z.object({ entries: JsonObjectSchema }).catchall(JsonValueSchema));
200
+ if (!releases.data || !counts.data || !Object.keys(releases.data).length)
201
+ throw serviceUnavailable('InterPro release metadata is missing.', {
202
+ reason: 'upstream_shape_invalid',
203
+ retryable: false,
204
+ });
205
+ const firstVersion = releases.headers.get('interpro-version');
206
+ const secondVersion = counts.headers.get('interpro-version');
207
+ if (firstVersion && secondVersion && firstVersion !== secondVersion)
208
+ throw serviceUnavailable('InterPro release changed between metadata responses.', {
209
+ reason: 'release_changed',
210
+ retryable: true,
211
+ });
212
+ const version = Object.keys(releases.data).sort((a, b) => {
213
+ const left = a.split('.').map(Number);
214
+ const right = b.split('.').map(Number);
215
+ for (let index = 0; index < Math.max(left.length, right.length); index++) {
216
+ const difference = (right[index] ?? 0) - (left[index] ?? 0);
217
+ if (difference)
218
+ return difference;
219
+ }
220
+ return 0;
221
+ })[0];
222
+ if (!version)
223
+ throw serviceUnavailable('InterPro release map has no version.', {
224
+ reason: 'upstream_shape_invalid',
225
+ retryable: false,
226
+ });
227
+ return {
228
+ version,
229
+ date: releases.data[version],
230
+ databaseCounts: counts.data,
231
+ sourceUrls: [releases.sourceUrl, counts.sourceUrl],
232
+ };
233
+ }
234
+ }
235
+ async function readBody(response, signal) {
236
+ if (!response.body)
237
+ return '';
238
+ const reader = response.body.getReader();
239
+ const chunks = [];
240
+ let bytes = 0;
241
+ const abort = () => {
242
+ void reader.cancel(signal.reason).catch(() => { });
243
+ };
244
+ signal.addEventListener('abort', abort, { once: true });
245
+ try {
246
+ while (true) {
247
+ signal.throwIfAborted();
248
+ const { done, value } = await reader.read();
249
+ signal.throwIfAborted();
250
+ if (done)
251
+ break;
252
+ bytes += value.byteLength;
253
+ if (bytes > MAX_RESPONSE_BYTES) {
254
+ await reader.cancel();
255
+ throw serviceUnavailable('InterPro response exceeds 4 MiB.', {
256
+ reason: 'upstream_response_too_large',
257
+ retryable: false,
258
+ });
259
+ }
260
+ chunks.push(value);
261
+ }
262
+ return Buffer.concat(chunks).toString('utf8');
263
+ }
264
+ finally {
265
+ signal.removeEventListener('abort', abort);
266
+ reader.releaseLock();
267
+ }
268
+ }
269
+ let service;
270
+ /** Initialize the process service in createApp.setup. */
271
+ export function initInterproService(fetch = interproHttpFetch) {
272
+ service = new InterproService(fetch);
273
+ }
274
+ /** Obtain the initialized process service. */
275
+ export function getInterproService() {
276
+ if (!service)
277
+ throw new Error('InterPro service is not initialized.');
278
+ return service;
279
+ }
280
+ /** Dispose queued pacing work during application teardown. */
281
+ export function disposeInterproService() {
282
+ pacer.dispose();
283
+ }
284
+ //# sourceMappingURL=interpro-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpro-service.js","sourceRoot":"","sources":["../../../src/services/interpro/interpro-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,GACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAsB,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC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AK,CAAC,UAAU,CAAC;YAC1B,IAAI,KAAK,GAAG,kBAAkB,EAAE,CAAC;gBAC/B,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;gBACtB,MAAM,kBAAkB,CAAC,kCAAkC,EAAE;oBAC3D,MAAM,EAAE,6BAA6B;oBACrC,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAC;YACL,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;AACH,CAAC;AAED,IAAI,OAAoC,CAAC;AACzC,yDAAyD;AACzD,MAAM,UAAU,mBAAmB,CAAC,KAAK,GAAkB,iBAAiB;IAC1E,OAAO,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AACD,8CAA8C;AAC9C,MAAM,UAAU,kBAAkB;IAChC,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACtE,OAAO,OAAO,CAAC;AACjB,CAAC;AACD,8DAA8D;AAC9D,MAAM,UAAU,sBAAsB;IACpC,KAAK,CAAC,OAAO,EAAE,CAAC;AAClB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @fileoverview Static API vocabulary and common taxonomy examples.
3
+ * @module services/interpro/reference
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ /** Available reference topics; only release performs network operations. */
7
+ export declare const ReferenceTopicSchema: z.ZodEnum<{
8
+ accession_patterns: "accession_patterns";
9
+ databases: "databases";
10
+ entry_types: "entry_types";
11
+ release: "release";
12
+ taxa: "taxa";
13
+ }>;
14
+ /** Applicable reference fields, without fabricated empty annotations. */
15
+ export declare const ReferenceItemSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ label: z.ZodString;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ sourceDatabase: z.ZodOptional<z.ZodString>;
20
+ accessionPattern: z.ZodOptional<z.ZodString>;
21
+ example: z.ZodOptional<z.ZodString>;
22
+ taxonId: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ /** A reference vocabulary row. */
25
+ export type ReferenceItem = z.infer<typeof ReferenceItemSchema>;
26
+ /** Return bounded local reference data without making upstream requests. */
27
+ export declare function staticReference(topic: Exclude<z.infer<typeof ReferenceTopicSchema>, 'release'>): {
28
+ items: ReferenceItem[];
29
+ sourceUrls: string[];
30
+ };
31
+ //# sourceMappingURL=reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/services/interpro/reference.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAI3C,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;;;;;EAE2C,CAAC;AAC7E,yEAAyE;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;iBAaa,CAAC;AAC9C,kCAAkC;AAClC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA0DhE,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,EAAE,SAAS,CAAC,GAAG;IAChG,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAsCA"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @fileoverview Static API vocabulary and common taxonomy examples.
3
+ * @module services/interpro/reference
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { DOCUMENTATION_URL, ENTRY_ROUTES } from './routing.js';
7
+ /** Available reference topics; only release performs network operations. */
8
+ export const ReferenceTopicSchema = z
9
+ .enum(['databases', 'entry_types', 'accession_patterns', 'taxa', 'release'])
10
+ .describe('Reference topic; release retrieves current upstream metadata.');
11
+ /** Applicable reference fields, without fabricated empty annotations. */
12
+ export const ReferenceItemSchema = z
13
+ .object({
14
+ id: z.string().describe('Reference identifier.'),
15
+ label: z.string().describe('Human-readable label.'),
16
+ description: z.string().optional().describe('Meaning and coverage.'),
17
+ sourceDatabase: z.string().optional().describe('Entry API database slug.'),
18
+ accessionPattern: z.string().optional().describe('Case-insensitive accession routing pattern.'),
19
+ example: z
20
+ .string()
21
+ .optional()
22
+ .describe('Example accession spelling; assignment is not guaranteed.'),
23
+ taxonId: z.string().optional().describe('NCBI taxonomy identifier.'),
24
+ })
25
+ .describe('One reference vocabulary item.');
26
+ const databaseLabels = {
27
+ interpro: 'InterPro',
28
+ pfam: 'Pfam',
29
+ prosite: 'PROSITE patterns',
30
+ profile: 'PROSITE profiles',
31
+ smart: 'SMART',
32
+ cdd: 'CDD',
33
+ panther: 'PANTHER',
34
+ cathgene3d: 'CATH-Gene3D',
35
+ ssf: 'SUPERFAMILY',
36
+ ncbifam: 'NCBIFAM',
37
+ hamap: 'HAMAP',
38
+ prints: 'PRINTS',
39
+ pirsf: 'PIRSF',
40
+ sfld: 'SFLD',
41
+ antifam: 'AntiFam',
42
+ };
43
+ const types = [
44
+ ['domain', 'Domain', 'A distinct structural or functional protein unit.'],
45
+ ['family', 'Family', 'A group of evolutionarily related proteins.'],
46
+ ['repeat', 'Repeat', 'A repeated sequence or structural unit.'],
47
+ [
48
+ 'homologous_superfamily',
49
+ 'Homologous superfamily',
50
+ 'Proteins or domains with a shared evolutionary origin.',
51
+ ],
52
+ ['active_site', 'Active site', 'Residues involved in catalysis.'],
53
+ ['binding_site', 'Binding site', 'Residues involved in binding.'],
54
+ ['conserved_site', 'Conserved site', 'A conserved functional sequence site.'],
55
+ ['ptm', 'Post-translational modification', 'A post-translational modification site.'],
56
+ [
57
+ 'region',
58
+ 'Region',
59
+ 'A sequence region; AntiFam signatures of spurious protein predictions use this type.',
60
+ ],
61
+ [
62
+ 'coiled_coil',
63
+ 'Coiled coil',
64
+ 'A coiled-coil region, where alpha-helices wind around each other.',
65
+ ],
66
+ [
67
+ 'disordered',
68
+ 'Disordered region',
69
+ 'An intrinsically disordered region without a fixed three-dimensional structure.',
70
+ ],
71
+ ];
72
+ const taxa = [
73
+ ['9606', 'Human'],
74
+ ['10090', 'Mouse'],
75
+ ['10116', 'Rat'],
76
+ ['7955', 'Zebrafish'],
77
+ ['7227', 'Fruit fly'],
78
+ ['6239', 'Nematode'],
79
+ ['559292', 'Budding yeast'],
80
+ ['3702', 'Arabidopsis'],
81
+ ['562', 'Escherichia coli'],
82
+ ];
83
+ /** Return bounded local reference data without making upstream requests. */
84
+ export function staticReference(topic) {
85
+ if (topic === 'entry_types')
86
+ return {
87
+ items: types.map(([id, label, description]) => ({ id, label, description })),
88
+ sourceUrls: [DOCUMENTATION_URL],
89
+ };
90
+ if (topic === 'taxa')
91
+ return {
92
+ items: taxa.map(([taxonId, label]) => ({
93
+ id: taxonId,
94
+ label,
95
+ taxonId,
96
+ description: 'Common taxonomy example; this is not an exhaustive taxonomy.',
97
+ })),
98
+ sourceUrls: [DOCUMENTATION_URL, 'https://www.ncbi.nlm.nih.gov/taxonomy'],
99
+ };
100
+ return {
101
+ items: ENTRY_ROUTES.map(({ source, pattern, example }) => ({
102
+ id: source,
103
+ label: databaseLabels[source],
104
+ sourceDatabase: source,
105
+ accessionPattern: pattern.source,
106
+ example,
107
+ description: topic === 'accession_patterns'
108
+ ? 'Routing syntax does not guarantee that an accession is assigned.'
109
+ : source === 'interpro'
110
+ ? 'Integrating database combining member signatures.'
111
+ : source === 'antifam'
112
+ ? 'Additional API source for spurious protein predictions.'
113
+ : source === 'prosite'
114
+ ? 'PROSITE pattern signatures; profiles use the profile route.'
115
+ : source === 'profile'
116
+ ? 'PROSITE profile signatures; patterns use the prosite route.'
117
+ : 'Member-database signatures exposed through the InterPro entry API.',
118
+ })),
119
+ sourceUrls: [DOCUMENTATION_URL],
120
+ };
121
+ }
122
+ //# sourceMappingURL=reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/services/interpro/reference.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG/D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;KAC3E,QAAQ,CAAC,+DAA+D,CAAC,CAAC;AAC7E,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACnD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACpE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAC1E,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC/F,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2DAA2D,CAAC;IACxE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CA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AAC,CAAC,mDAAmD;oBACrD,CAAC,CAAC,MAAM,KAAK,SAAS;wBACpB,CAAC,CAAC,yDAAyD;wBAC3D,CAAC,CAAC,MAAM,KAAK,SAAS;4BACpB,CAAC,CAAC,6DAA6D;4BAC/D,CAAC,CAAC,MAAM,KAAK,SAAS;gCACpB,CAAC,CAAC,6DAA6D;gCAC/D,CAAC,CAAC,oEAAoE;SACnF,CAAC,CAAC;QACH,UAAU,EAAE,CAAC,iBAAiB,CAAC;KAChC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @fileoverview Deterministic, whole-record slices of a clan relationship graph.
3
+ * @module services/interpro/relationships
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ /** The graph InterPro attaches to set metadata: node and link records plus any additional fields. */
7
+ export declare const RelationshipGraphSchema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
8
+ nodes: z.ZodArray<z.ZodJSONSchema>;
9
+ links: z.ZodArray<z.ZodJSONSchema>;
10
+ }, z.core.$catchall<z.ZodJSONSchema>>>>;
11
+ /** A relationship graph as supplied, or null/absent when InterPro supplied none. */
12
+ type RelationshipGraph = z.infer<typeof RelationshipGraphSchema>;
13
+ /**
14
+ * Order nodes by accession and links by source, target, and method, so an offset addresses the
15
+ * same record on every call whatever order the upstream arrays arrive in.
16
+ */
17
+ export declare function orderRelationships(graph: RelationshipGraph): RelationshipGraph;
18
+ /**
19
+ * The `count` whole records starting at `offset` in the sequence of every node followed by every
20
+ * link, as a graph of the upstream shape, with the page block that locates it.
21
+ */
22
+ export declare function sliceRelationships(graph: RelationshipGraph, offset: number, count: number): {
23
+ relationships: {
24
+ nodes: z.JSONType[];
25
+ links: z.JSONType[];
26
+ } | null | undefined;
27
+ page: {
28
+ totalNodes: number;
29
+ totalLinks: number;
30
+ offset: number;
31
+ returnedNodes: number;
32
+ returnedLinks: number;
33
+ hasMore: boolean;
34
+ nextOffset?: number;
35
+ };
36
+ };
37
+ export {};
38
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/services/interpro/relationships.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAM3C,qGAAqG;AACrG,eAAO,MAAM,uBAAuB;;;uCAIvB,CAAC;AACd,oFAAoF;AACpF,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAmBjE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,CAQ9E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;;;;;EAuBzF"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @fileoverview Deterministic, whole-record slices of a clan relationship graph.
3
+ * @module services/interpro/relationships
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { compareText, cursorScope } from './cursors.js';
7
+ import { JsonValueSchema } from './schemas.js';
8
+ /** The graph InterPro attaches to set metadata: node and link records plus any additional fields. */
9
+ export const RelationshipGraphSchema = z
10
+ .object({ nodes: z.array(JsonValueSchema), links: z.array(JsonValueSchema) })
11
+ .catchall(JsonValueSchema)
12
+ .nullable()
13
+ .optional();
14
+ const field = (record, key) => {
15
+ if (!record || typeof record !== 'object' || Array.isArray(record))
16
+ return '';
17
+ const value = record[key];
18
+ return typeof value === 'string' ? value : '';
19
+ };
20
+ /** Sort by the named string fields in turn; canonical JSON breaks any remaining tie. */
21
+ function ordered(records, keys) {
22
+ return records.toSorted((a, b) => {
23
+ for (const key of keys) {
24
+ const difference = compareText(field(a, key), field(b, key));
25
+ if (difference)
26
+ return difference;
27
+ }
28
+ return compareText(cursorScope(a), cursorScope(b));
29
+ });
30
+ }
31
+ /**
32
+ * Order nodes by accession and links by source, target, and method, so an offset addresses the
33
+ * same record on every call whatever order the upstream arrays arrive in.
34
+ */
35
+ export function orderRelationships(graph) {
36
+ return (graph && {
37
+ ...graph,
38
+ nodes: ordered(graph.nodes, ['accession']),
39
+ links: ordered(graph.links, ['source', 'target', 'method']),
40
+ });
41
+ }
42
+ /**
43
+ * The `count` whole records starting at `offset` in the sequence of every node followed by every
44
+ * link, as a graph of the upstream shape, with the page block that locates it.
45
+ */
46
+ export function sliceRelationships(graph, offset, count) {
47
+ const nodes = graph?.nodes ?? [];
48
+ const links = graph?.links ?? [];
49
+ const total = nodes.length + links.length;
50
+ const start = Math.min(offset, total);
51
+ const end = Math.min(start + count, total);
52
+ const slice = {
53
+ nodes: nodes.slice(Math.min(start, nodes.length), Math.min(end, nodes.length)),
54
+ links: links.slice(Math.max(0, start - nodes.length), Math.max(0, end - nodes.length)),
55
+ };
56
+ const hasMore = end < total;
57
+ return {
58
+ relationships: graph && { ...graph, ...slice },
59
+ page: {
60
+ totalNodes: nodes.length,
61
+ totalLinks: links.length,
62
+ offset,
63
+ returnedNodes: slice.nodes.length,
64
+ returnedLinks: slice.links.length,
65
+ hasMore,
66
+ ...(hasMore ? { nextOffset: end } : {}),
67
+ },
68
+ };
69
+ }
70
+ //# sourceMappingURL=relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../../src/services/interpro/relationships.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,qGAAqG;AACrG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,KAAK,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AAO;YACP,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { type SourceDatabase } from './schemas.js';
2
+ /** Canonical API origin; no upstream continuation URL is fetched directly. */
3
+ export declare const API_BASE = "https://www.ebi.ac.uk/interpro/api/";
4
+ /** Official reference documentation. */
5
+ export declare const DOCUMENTATION_URL = "https://interpro-documentation.readthedocs.io/en/latest/api.html";
6
+ /** Routing patterns and examples are shared with the reference vocabulary. */
7
+ export declare const ENTRY_ROUTES: readonly {
8
+ source: SourceDatabase;
9
+ pattern: RegExp;
10
+ example: string;
11
+ }[];
12
+ /** Resolve one entry accession without guessing alternate databases after a miss. */
13
+ export declare function resolveEntry(accession: string, sourceDatabase?: SourceDatabase): {
14
+ accession: string;
15
+ sourceDatabase: SourceDatabase;
16
+ };
17
+ /** Resolve case-sensitive CL clan prefixes, with explicit source disambiguation. */
18
+ export declare function resolveClan(accession: string, sourceDatabase?: 'pfam' | 'cdd' | 'pirsf'): {
19
+ accession: string;
20
+ sourceDatabase: 'pfam' | 'cdd' | 'pirsf';
21
+ };
22
+ /** Build fixed-origin requests from independently validated, encoded path segments. */
23
+ export declare function apiUrl(segments: readonly string[], query?: Readonly<Record<string, string | number | boolean | undefined>>): string;
24
+ //# sourceMappingURL=routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../../src/services/interpro/routing.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,8EAA8E;AAC9E,eAAO,MAAM,QAAQ,wCAAwC,CAAC;AAC9D,wCAAwC;AACxC,eAAO,MAAM,iBAAiB,qEAAqE,CAAC;AACpG,8EAA8E;AAC9E,eAAO,MAAM,YAAY,EAAE,SAAS;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAiB7F,CAAC;AAGJ,qFAAqF;AACrF,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,cAAc,GAC9B;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAAE,CAiCvD;AACD,oFAAoF;AACpF,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GACxC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAA;CAAE,CA2CjE;AACD,uFAAuF;AACvF,wBAAgB,MAAM,CACpB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAM,GAC1E,MAAM,CAMR"}