@cyanheads/interpro-mcp-server 0.1.3 → 0.2.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.
Files changed (71) hide show
  1. package/AGENTS.md +38 -13
  2. package/CLAUDE.md +38 -13
  3. package/Dockerfile +9 -1
  4. package/README.md +82 -123
  5. package/changelog/0.2.x/0.2.0.md +31 -0
  6. package/dist/config/server-config.d.ts +13 -0
  7. package/dist/config/server-config.d.ts.map +1 -0
  8. package/dist/config/server-config.js +19 -0
  9. package/dist/config/server-config.js.map +1 -0
  10. package/dist/index.js +11 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.d.ts +45 -0
  13. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.d.ts.map +1 -1
  14. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.js +37 -14
  15. package/dist/mcp-server/tools/definitions/interpro-find-proteins-by-domain.tool.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.d.ts +1 -0
  17. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.d.ts.map +1 -1
  18. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.js +1 -1
  19. package/dist/mcp-server/tools/definitions/interpro-get-protein-domains.tool.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/interpro-get-scan-result.tool.d.ts +133 -0
  21. package/dist/mcp-server/tools/definitions/interpro-get-scan-result.tool.d.ts.map +1 -0
  22. package/dist/mcp-server/tools/definitions/interpro-get-scan-result.tool.js +128 -0
  23. package/dist/mcp-server/tools/definitions/interpro-get-scan-result.tool.js.map +1 -0
  24. package/dist/mcp-server/tools/definitions/interpro-get-structure-domains.tool.d.ts +171 -0
  25. package/dist/mcp-server/tools/definitions/interpro-get-structure-domains.tool.d.ts.map +1 -0
  26. package/dist/mcp-server/tools/definitions/interpro-get-structure-domains.tool.js +290 -0
  27. package/dist/mcp-server/tools/definitions/interpro-get-structure-domains.tool.js.map +1 -0
  28. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.js +1 -1
  29. package/dist/mcp-server/tools/definitions/interpro-list-reference.tool.js.map +1 -1
  30. package/dist/mcp-server/tools/definitions/interpro-scan-sequence.tool.d.ts +168 -0
  31. package/dist/mcp-server/tools/definitions/interpro-scan-sequence.tool.d.ts.map +1 -0
  32. package/dist/mcp-server/tools/definitions/interpro-scan-sequence.tool.js +187 -0
  33. package/dist/mcp-server/tools/definitions/interpro-scan-sequence.tool.js.map +1 -0
  34. package/dist/services/interpro/http-adapter.d.ts +11 -2
  35. package/dist/services/interpro/http-adapter.d.ts.map +1 -1
  36. package/dist/services/interpro/http-adapter.js +67 -9
  37. package/dist/services/interpro/http-adapter.js.map +1 -1
  38. package/dist/services/interpro/interpro-service.d.ts +1 -1
  39. package/dist/services/interpro/interpro-service.d.ts.map +1 -1
  40. package/dist/services/interpro/interpro-service.js +6 -24
  41. package/dist/services/interpro/interpro-service.js.map +1 -1
  42. package/dist/services/interpro/reference.d.ts.map +1 -1
  43. package/dist/services/interpro/reference.js +23 -2
  44. package/dist/services/interpro/reference.js.map +1 -1
  45. package/dist/services/interpro/schemas.d.ts +1 -0
  46. package/dist/services/interpro/schemas.d.ts.map +1 -1
  47. package/dist/services/interpro/schemas.js +5 -0
  48. package/dist/services/interpro/schemas.js.map +1 -1
  49. package/dist/services/interpro/structure-schemas.d.ts +116 -0
  50. package/dist/services/interpro/structure-schemas.d.ts.map +1 -0
  51. package/dist/services/interpro/structure-schemas.js +74 -0
  52. package/dist/services/interpro/structure-schemas.js.map +1 -0
  53. package/dist/services/sequence-scan/scan-output.d.ts +94 -0
  54. package/dist/services/sequence-scan/scan-output.d.ts.map +1 -0
  55. package/dist/services/sequence-scan/scan-output.js +174 -0
  56. package/dist/services/sequence-scan/scan-output.js.map +1 -0
  57. package/dist/services/sequence-scan/scan-schemas.d.ts +112 -0
  58. package/dist/services/sequence-scan/scan-schemas.d.ts.map +1 -0
  59. package/dist/services/sequence-scan/scan-schemas.js +97 -0
  60. package/dist/services/sequence-scan/scan-schemas.js.map +1 -0
  61. package/dist/services/sequence-scan/sequence-scan-service.d.ts +119 -0
  62. package/dist/services/sequence-scan/sequence-scan-service.d.ts.map +1 -0
  63. package/dist/services/sequence-scan/sequence-scan-service.js +453 -0
  64. package/dist/services/sequence-scan/sequence-scan-service.js.map +1 -0
  65. package/dist/services/sequence-scan/sequence.d.ts +32 -0
  66. package/dist/services/sequence-scan/sequence.d.ts.map +1 -0
  67. package/dist/services/sequence-scan/sequence.js +63 -0
  68. package/dist/services/sequence-scan/sequence.js.map +1 -0
  69. package/package.json +10 -7
  70. package/server.json +18 -4
  71. package/skills/interpro-guide/SKILL.md +72 -0
package/server.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.cyanheads/interpro-mcp-server",
4
- "description": "Search InterPro entries, map protein domains and functional sites, and find proteins by domain.",
4
+ "description": "Search InterPro entries, map domains onto proteins and PDB structures, and scan raw sequences.",
5
5
  "repository": {
6
6
  "url": "https://github.com/cyanheads/interpro-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.3",
9
+ "version": "0.2.0",
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/interpro-mcp-server",
21
21
  "runtimeHint": "npx",
22
- "version": "0.1.3",
22
+ "version": "0.2.0",
23
23
  "environmentVariables": [
24
24
  {
25
25
  "name": "MCP_LOG_LEVEL",
@@ -27,6 +27,13 @@
27
27
  "format": "string",
28
28
  "isRequired": false,
29
29
  "default": "info"
30
+ },
31
+ {
32
+ "name": "INTERPRO_SCAN_EMAIL",
33
+ "description": "Contact email the EBI Job Dispatcher requires to submit InterProScan jobs. Optional: without it interpro_scan_sequence still returns precalculated matches for sequences already in UniParc and fails other sequences as scan_not_configured, and interpro_get_scan_result still reads existing jobs. EBI stores the address with job data for seven days, and one address covers every caller of the server.",
34
+ "format": "string",
35
+ "isRequired": false,
36
+ "isSecret": false
30
37
  }
31
38
  ],
32
39
  "transport": {
@@ -38,7 +45,7 @@
38
45
  "registryBaseUrl": "https://registry.npmjs.org",
39
46
  "identifier": "@cyanheads/interpro-mcp-server",
40
47
  "runtimeHint": "npx",
41
- "version": "0.1.3",
48
+ "version": "0.2.0",
42
49
  "environmentVariables": [
43
50
  {
44
51
  "name": "MCP_TRANSPORT_TYPE",
@@ -80,6 +87,13 @@
80
87
  "format": "string",
81
88
  "isRequired": false,
82
89
  "default": "info"
90
+ },
91
+ {
92
+ "name": "INTERPRO_SCAN_EMAIL",
93
+ "description": "Contact email the EBI Job Dispatcher requires to submit InterProScan jobs. Optional: without it interpro_scan_sequence still returns precalculated matches for sequences already in UniParc and fails other sequences as scan_not_configured, and interpro_get_scan_result still reads existing jobs. EBI stores the address with job data for seven days, and one address covers every caller of the server.",
94
+ "format": "string",
95
+ "isRequired": false,
96
+ "isSecret": false
83
97
  }
84
98
  ],
85
99
  "transport": {
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: interpro-guide
3
+ description: Identifier chains, gates, and numbering conventions for the interpro_* tools - domain maps for UniProt proteins, PDB chains, and raw sequences; member signatures versus InterPro entries; Pfam clans; GO terms; same-architecture protein discovery. Use when asked which domains a protein, structure chain, or sequence carries, when converting chain, author, and UniProt residue numbers, or when an interpro_* result feeds the next call.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: cyanheads
7
+ version: "1.0"
8
+ ---
9
+
10
+ ## Scope
11
+
12
+ InterPro signature annotation, keyless: which InterPro entries and member-database signatures (Pfam, CDD, SMART, PANTHER, CATH-Gene3D, SUPERFAMILY, PROSITE, PRINTS, and others) match a UniProt protein, a PDB chain, or a raw sequence; entry metadata and GO terms; Pfam, CDD, and PIRSF clans; and the UniProt proteins that carry a signature.
13
+
14
+ Not covered: protein name or gene search, similarity search, structure coordinates, curated protein function. Resolve a gene or protein name to a UniProt accession with a UniProt server before calling here.
15
+
16
+ ## Identifiers
17
+
18
+ | Identifier | Shape | Where it comes from | Where it goes |
19
+ |:--|:--|:--|:--|
20
+ | InterPro entry | `IPR011615` | `interpro_search_entries`; a member signature's `integrated` | `interpro_get_entry`, `interpro_find_proteins_by_domain` |
21
+ | Member signature | `PF00870`, `cd08367`, `G3DSA:2.60.40.720` | map matches; an InterPro entry's `member_databases`; scan `signature.accession` | `interpro_get_entry`, `interpro_find_proteins_by_domain` |
22
+ | Clan | `CL0073` (Pfam), `cl…` (CDD), `PIRSF…` | `set_info.accession` on a Pfam, CDD, or PIRSF signature | `interpro_get_clan` |
23
+ | GO term | `GO:0000976` | `go_terms` on an InterPro entry | `interpro_search_entries` GO filter |
24
+ | Architecture | 40 hex characters | `protein.ida_accession`, first segment of `interpro_get_protein_domains` | `interpro_find_proteins_by_domain` |
25
+ | Proteome and taxon | `UP000005640`, `9606` | `protein.proteome` and `protein.source_organism.taxId`, same first segment | `interpro_find_proteins_by_domain`, as a pair |
26
+ | PDB chain | `A`, case-sensitive | `structure.chains`, first segment of `interpro_get_structure_domains` | the same tool, one chain |
27
+ | Chain's UniProt protein | `p04637`, lowercase | `record.protein` in structure records; null when unmapped | `interpro_get_protein_domains`, any case |
28
+ | Scan job | `iprscan6-R…` | `interpro_scan_sequence` when no precalculated result exists | `interpro_get_scan_result`, for seven days |
29
+
30
+ Continuation segments omit the first segment's `protein` or `structure` metadata, so take these identifiers from the call without a cursor.
31
+
32
+ ## Gates
33
+
34
+ - **Clans hang off member signatures.** An InterPro entry's `set_info` is null even when its Pfam member sits in a clan (IPR011615: null; its member PF00870: CL0073). From an InterPro entry, read `member_databases`, then the Pfam, CDD, or PIRSF member's `set_info`. `set_info` is core metadata, kept even when `sections` is empty.
35
+ - **GO terms live on InterPro entries only.** A member signature returns no `go_terms` (PF00870 has none; IPR011615 carries GO:0000976). Follow the member's `integrated` to its InterPro entry first. `integrated: null` marks an unintegrated signature: it has no InterPro entry, so no GO terms reach it.
36
+ - **Pass the proteome with its taxon.** Take `protein.proteome` and `protein.source_organism.taxId` from the same map and pass both. PF00870 in mouse proteome UP000000589 returns 0 proteins under the default taxon and 3 with taxon 10090.
37
+ - **Zero proteins is not proof of absence.** The upstream returns the same empty result for a wrong accession, an unknown taxon or proteome, and a true empty intersection. Confirm the accession with `interpro_get_entry` and the taxon against a mapped protein before reporting that none exist.
38
+ - **A capped structure match can hide chains.** Before saying a chain lacks a match that has `chainRecordLimitReached`, map that chain alone (1ryp has 28 protein chains; IPR001353 and G3DSA:3.60.20.10 list 20 each).
39
+ - **A missing match is not missing function.** No signature hit means no model matched, not that the protein lacks the activity or fold.
40
+ - **Read a scan job by its jobId.** `interpro_scan_sequence` hands back an existing job only while that job is pending and this server process is tracking it. Once the finished result has been read, or after a server restart, calling it again with the same sequence submits a new job. After the first call, poll and page only through `interpro_get_scan_result`. Each poll waits well under a minute, so expect several over a run, and give the user the jobId when the work may outlast the session.
41
+ - **The precalculated lookup is an exact-sequence match.** It keys on the MD5 of the residues, so one substitution misses, and a designed or mutated sequence nearly always needs a job. A server that cannot submit jobs answers `scan_not_configured`: tell the user only sequences already in UniParc can be scanned there, and don't retry.
42
+ - **Prefer the accession when one exists.** For a sequence that is a UniProt protein, `interpro_get_protein_domains` returns what a scan lacks: protein metadata with `ida_accession`, `proteome`, and GO terms, plus optional residue rules.
43
+
44
+ ## Workflows
45
+
46
+ ### Reading residue numbers
47
+
48
+ Structure records carry three numberings for each match. Never assume two of them agree:
49
+
50
+ | Field | Numbering |
51
+ |:--|:--|
52
+ | `entry_structure_locations` `start`/`end` | chain: position in the chain's own sequence, starting at 1 |
53
+ | `entry_structure_locations` `auth_start`/`auth_end` | author: residue numbers as deposited |
54
+ | `entry_protein_locations` | UniProt |
55
+
56
+ - On 1tsr chain B, PF00870 is chain 7–195, author 100–288, UniProt 100–288. On 1hho chain A, PF00042 is chain and author 26–136 but UniProt 27–137.
57
+ - `entry_protein_locations` is the signature's match on the whole UniProt protein, not clipped to what the chain covers. On 1tsr chain B, family IPR002117 spans UniProt 3–369 while the chain covers UniProt 94–312, and PRINTS PR00386 lists a sixth motif (326–350) that is not on the chain. To say what lies on the chain, read `entry_structure_locations`. To convert between chain and UniProt numbering, use `structure_protein_locations`.
58
+ - `auth_start`/`auth_end` can be null on some matches and not others (4 of 12 matches on 1tsr chain B). For those, no author numbering is available here: report chain or UniProt numbers labelled as such, never as author numbers.
59
+ - A match can have several locations (PRINTS motifs, repeats), and a location can have several fragments. A residue is covered only when it falls inside a fragment, not merely between a match's first start and last end.
60
+
61
+ ### Counting and naming domains
62
+
63
+ - One region shows up once per database. On P04637 the DNA-binding domain is IPR011615, PF00870, and cd08367, and the map holds 22 match rows across 9 InterPro entries. Count InterPro entries, grouping members by `integrated`, and list unintegrated signatures separately.
64
+ - Report each match by its entry type. A family such as IPR002117 (P04637 3–369) describes the whole protein, not a domain.
65
+ - Scan results are InterProScan records verbatim, so match records are not domains. Calmodulin (P0DP23) returns 23 records, among them three CATH-Gene3D records for G3DSA:1.10.238.10. Records whose `source` is InterPro-N sit beside the member database's own record for the same signature and carry no score and no InterPro entry. PIRSR records are residue-site rules with no InterPro entry. Group by `signature.accession` and `source` before counting, and compare signatures by accession, not by name: library names vary within one result (`PROSITE profiles` and `PROSITE Profiles`), and types are capitalized (`Homologous_superfamily`) where the InterPro API writes them lowercase.
66
+
67
+ ### Chains worth knowing
68
+
69
+ - **A structure chain in author numbering.** Call `interpro_get_structure_domains` with the PDB ID and the chain exactly as `structure.chains` spells it. Nucleic-acid chains are not listed. For residue rules or the architecture, follow `record.protein` to `interpro_get_protein_domains`.
70
+ - **Same architecture in the protein's proteome.** The first `interpro_get_protein_domains` segment gives `ida_accession`, `proteome`, and `source_organism.taxId`. Then call `interpro_find_proteins_by_domain` with any Pfam signature of that architecture plus all three. The query protein comes back too, so drop it when asked for others. For P04637 (PF00870, UP000005640, taxon 9606) the reviewed result is P04637 alone.
71
+ - **What else is in a clan.** `interpro_get_entry` on the Pfam signature, then `interpro_get_clan` with its `set_info.accession`. Members are signatures of that database, each with its own `integrated` InterPro entry (CL0073 has 17 Pfam members).
72
+ - **GO, both directions.** For an entry's GO terms, call `interpro_get_entry` on the InterPro entry with the `go_terms` section. For the entries carrying a term, call `interpro_search_entries` in the InterPro database, then read `member_databases` for the signatures.