@pipeworx/mcp-pombase 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pipeworx
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 ADDED
@@ -0,0 +1,55 @@
1
+ # mcp-pombase
2
+
3
+ PomBase MCP — the fission yeast (Schizosaccharomyces pombe) model-organism database.
4
+
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 823+ live data sources.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+
12
+ ## Quick Start
13
+
14
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
15
+
16
+ ```json
17
+ {
18
+ "mcpServers": {
19
+ "pombase": {
20
+ "url": "https://gateway.pipeworx.io/pombase/mcp"
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ Or connect to the full Pipeworx gateway for access to all 823+ data sources:
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "pipeworx": {
32
+ "url": "https://gateway.pipeworx.io/mcp"
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## Using with ask_pipeworx
39
+
40
+ Instead of calling tools directly, you can ask questions in plain English:
41
+
42
+ ```
43
+ ask_pipeworx({ question: "your question about Pombase data" })
44
+ ```
45
+
46
+ The gateway picks the right tool and fills the arguments automatically.
47
+
48
+ ## More
49
+
50
+ - [All tools and guides](https://github.com/pipeworx-io/examples)
51
+ - [pipeworx.io](https://pipeworx.io)
52
+
53
+ ## License
54
+
55
+ MIT
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@pipeworx/mcp-pombase",
3
+ "version": "0.1.0",
4
+ "description": "PomBase MCP — the fission yeast (Schizosaccharomyces pombe) model-organism database.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "pombase"],
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/pipeworx-io/mcp-pombase"
13
+ },
14
+ "scripts": {
15
+ "typecheck": "tsc --noEmit"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.7.0"
19
+ }
20
+ }
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/pombase",
4
+ "title": "Pombase",
5
+ "description": "PomBase MCP — the fission yeast (Schizosaccharomyces pombe) model-organism database.",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/pombase",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-pombase",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/pombase/mcp"
16
+ }
17
+ ]
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,155 @@
1
+ interface McpToolDefinition {
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: 'object';
6
+ properties: Record<string, unknown>;
7
+ required?: string[];
8
+ };
9
+ }
10
+
11
+ interface McpToolExport {
12
+ tools: McpToolDefinition[];
13
+ callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
14
+ meter?: { credits: number };
15
+ cost?: Record<string, unknown>;
16
+ provider?: string;
17
+ }
18
+
19
+ /**
20
+ * PomBase MCP — the fission yeast (Schizosaccharomyces pombe) model-organism database.
21
+ *
22
+ * Keyless JSON API. Look up a gene by its PomBase systematic id and get its
23
+ * product, protein domains (InterPro), deletion viability, UniProt id, and
24
+ * curation status; or look up a curated publication by PubMed id.
25
+ * Complements SGD (budding yeast).
26
+ *
27
+ * Base: https://www.pombase.org/api/v1/dataset/latest
28
+ */
29
+
30
+
31
+ const BASE = 'https://www.pombase.org/api/v1/dataset/latest';
32
+ const UA = 'pipeworx/1.0 (+https://pipeworx.io)';
33
+
34
+ const tools: McpToolExport['tools'] = [
35
+ {
36
+ name: 'get_gene',
37
+ description:
38
+ 'PomBase (fission yeast / S. pombe model-organism DB): look up a gene by its PomBase systematic id and return its product, protein domains (InterPro), deletion viability, UniProt id, and curation status. Keyless. NOTE: requires a systematic id like "SPAC1002.01" or "SPBC2F12.13" — standard gene names like "cdc2" are NOT resolved by this API. Complements SGD (budding yeast).',
39
+ inputSchema: {
40
+ type: 'object',
41
+ properties: {
42
+ id: {
43
+ type: 'string',
44
+ description: 'A PomBase systematic id, e.g. "SPAC1002.01" or "SPBC2F12.13". Standard names ("cdc2") are not accepted.',
45
+ },
46
+ },
47
+ required: ['id'],
48
+ },
49
+ },
50
+ {
51
+ name: 'get_reference',
52
+ description:
53
+ 'PomBase: look up a curated S. pombe publication by its PubMed id (e.g. "PMID:11739790") and return its title, citation, authors, year, abstract, and how many genes it annotates. Keyless.',
54
+ inputSchema: {
55
+ type: 'object',
56
+ properties: {
57
+ pmid: {
58
+ type: 'string',
59
+ description: 'A PubMed id, with or without the "PMID:" prefix, e.g. "PMID:11739790" or "11739790".',
60
+ },
61
+ },
62
+ required: ['pmid'],
63
+ },
64
+ },
65
+ ];
66
+
67
+ interface InterProMatch {
68
+ interpro_id?: string;
69
+ interpro_description?: string;
70
+ id?: string;
71
+ description?: string;
72
+ }
73
+
74
+ async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
75
+ try {
76
+ switch (name) {
77
+ case 'get_gene':
78
+ return await getGene(args);
79
+ case 'get_reference':
80
+ return await getReference(args);
81
+ default:
82
+ return { error: `Unknown tool: ${name}` };
83
+ }
84
+ } catch (err) {
85
+ return { error: err instanceof Error ? err.message : String(err) };
86
+ }
87
+ }
88
+
89
+ async function getGene(args: Record<string, unknown>): Promise<unknown> {
90
+ const id = reqStr(args, 'id');
91
+ const res = await pombaseGet(`/data/gene/${encodeURIComponent(id)}`);
92
+ if (res.status === 404 || res.status === 410) return { error: 'gene not found', id };
93
+ if (!res.ok) return { error: `PomBase: ${res.status} ${(await res.text()).slice(0, 200)}` };
94
+
95
+ const gene = (await res.json()) as Record<string, unknown> | null;
96
+ if (!gene || typeof gene !== 'object') return { error: 'gene not found', id };
97
+
98
+ const matches = Array.isArray(gene.interpro_matches) ? (gene.interpro_matches as InterProMatch[]) : [];
99
+ const tmCoords = Array.isArray(gene.tm_domain_coords) ? gene.tm_domain_coords : [];
100
+
101
+ return {
102
+ systematic_id: gene.uniquename ?? null,
103
+ name: gene.name ?? null,
104
+ product: gene.product ?? null,
105
+ taxonid: gene.taxonid ?? null,
106
+ feature_type: gene.feature_type ?? null,
107
+ characterisation_status: gene.characterisation_status ?? null,
108
+ deletion_viability: gene.deletion_viability ?? null,
109
+ uniprot: gene.uniprot_identifier ?? null,
110
+ interpro: matches.map((m) => ({
111
+ id: m.interpro_id ?? m.id ?? null,
112
+ description: m.interpro_description ?? m.description ?? null,
113
+ })),
114
+ tm_domains: tmCoords.length,
115
+ };
116
+ }
117
+
118
+ async function getReference(args: Record<string, unknown>): Promise<unknown> {
119
+ let pmid = reqStr(args, 'pmid').trim();
120
+ if (!/^PMID:/i.test(pmid)) pmid = `PMID:${pmid.replace(/^PMID:?/i, '')}`;
121
+
122
+ const res = await pombaseGet(`/data/reference/${encodeURIComponent(pmid)}`);
123
+ if (res.status === 404 || res.status === 410) return { error: 'reference not found', pmid };
124
+ if (!res.ok) return { error: `PomBase: ${res.status} ${(await res.text()).slice(0, 200)}` };
125
+
126
+ const ref = (await res.json()) as Record<string, unknown> | null;
127
+ if (!ref || typeof ref !== 'object') return { error: 'reference not found', pmid };
128
+
129
+ return {
130
+ pmid: ref.uniquename ?? pmid,
131
+ title: ref.title ?? null,
132
+ citation: ref.citation ?? null,
133
+ authors: ref.authors ?? null,
134
+ authors_abbrev: ref.authors_abbrev ?? null,
135
+ publication_year: ref.publication_year ?? null,
136
+ abstract: ref.abstract ?? null,
137
+ curated_gene_count: ref.gene_count ?? null,
138
+ };
139
+ }
140
+
141
+ async function pombaseGet(path: string): Promise<Response> {
142
+ return fetch(`${BASE}${path}`, {
143
+ headers: { Accept: 'application/json', 'User-Agent': UA },
144
+ });
145
+ }
146
+
147
+ function reqStr(args: Record<string, unknown>, key: string): string {
148
+ const v = args[key];
149
+ if (typeof v !== 'string' || !v.trim()) {
150
+ throw new Error(`Required argument "${key}" is missing.`);
151
+ }
152
+ return v;
153
+ }
154
+
155
+ export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "outDir": "dist",
10
+ "rootDir": "src",
11
+ "declaration": true
12
+ },
13
+ "include": ["src"]
14
+ }