@digital-science-dsl/dimensions-analytics-mcp 1.4.1 → 1.4.3
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/CHANGELOG.md +14 -0
- package/package.json +11 -1
- package/scripts/smoke-mcpb.mjs +57 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Package the existing local server as a Claude Desktop extension and publish it with each release.
|
|
8
|
+
|
|
9
|
+
## 1.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#2](https://github.com/digital-science/dimensions-analytics-mcp/pull/2) [`c2e163a`](https://github.com/digital-science/dimensions-analytics-mcp/commit/c2e163ad5c7644bfa5349367c56a707c2af525bd) Thanks [@akovari](https://github.com/akovari)! - Add the `mcpName` ownership marker and npm keywords so the package can back a record in the official MCP Registry under `ai.dimensions/analytics-mcp`.
|
|
14
|
+
|
|
15
|
+
- [#2](https://github.com/digital-science/dimensions-analytics-mcp/pull/2) [`c2e163a`](https://github.com/digital-science/dimensions-analytics-mcp/commit/c2e163ad5c7644bfa5349367c56a707c2af525bd) Thanks [@akovari](https://github.com/akovari)! - Replace non-null assertions with typed public/internal client config, and bump `@types/node` to 24 and `fast-check` to 4.9.
|
|
16
|
+
|
|
3
17
|
## 1.4.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-science-dsl/dimensions-analytics-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
|
+
"mcpName": "ai.dimensions/analytics-mcp",
|
|
4
5
|
"description": "Dimensions Analytics MCP server for Dimensions DSL querying",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"mcp",
|
|
8
|
+
"dimensions",
|
|
9
|
+
"research",
|
|
10
|
+
"publications",
|
|
11
|
+
"grants",
|
|
12
|
+
"bibliometrics",
|
|
13
|
+
"scholarly"
|
|
14
|
+
],
|
|
5
15
|
"type": "module",
|
|
6
16
|
"main": "./dist/index.js",
|
|
7
17
|
"types": "./dist/index.d.ts",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { unpackExtension } from "@anthropic-ai/mcpb";
|
|
7
|
+
import { Client } from "@modelcontextprotocol/client";
|
|
8
|
+
import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
|
|
9
|
+
|
|
10
|
+
const root = resolve(fileURLToPath(new URL("../../..", import.meta.url)));
|
|
11
|
+
const output = join(root, "dist/dimensions-analytics-mcp.mcpb");
|
|
12
|
+
const temp = mkdtempSync(join(tmpdir(), "dimensions-mcpb-smoke-"));
|
|
13
|
+
const client = new Client({ name: "mcpb-smoke", version: "1.0.0" });
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
if (!(await unpackExtension({ mcpbPath: output, outputDir: temp, silent: true }))) {
|
|
17
|
+
throw new Error("Could not unpack the MCPB");
|
|
18
|
+
}
|
|
19
|
+
const manifest = JSON.parse(readFileSync(join(temp, "manifest.json"), "utf8"));
|
|
20
|
+
const pkg = JSON.parse(readFileSync(join(root, "apps/mcp/package.json"), "utf8"));
|
|
21
|
+
if (manifest.version !== pkg.version) throw new Error("Bundle version differs from package");
|
|
22
|
+
const fixture = JSON.parse(
|
|
23
|
+
readFileSync(join(root, "apps/mcp/test/fixtures/describe-schema.json"), "utf8"),
|
|
24
|
+
);
|
|
25
|
+
const cache = join(temp, "schema.json");
|
|
26
|
+
writeFileSync(cache, JSON.stringify({ cachedAt: new Date().toISOString(), schema: fixture }));
|
|
27
|
+
|
|
28
|
+
const transport = new StdioClientTransport({
|
|
29
|
+
command: process.execPath,
|
|
30
|
+
args: [join(temp, manifest.server.entry_point)],
|
|
31
|
+
env: {
|
|
32
|
+
...process.env,
|
|
33
|
+
DIMENSIONS_API_KEY: "smoke-test-key",
|
|
34
|
+
DIMENSIONS_MCP_UPDATE_CHECK: "0",
|
|
35
|
+
DIMENSIONS_MCP_AUTO_UPDATE: "0",
|
|
36
|
+
SCHEMA_CACHE_PATH: cache,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const timeout = setTimeout(() => {
|
|
40
|
+
console.error("MCPB smoke test timed out");
|
|
41
|
+
process.exitCode = 1;
|
|
42
|
+
void transport.close();
|
|
43
|
+
}, 20_000);
|
|
44
|
+
try {
|
|
45
|
+
await client.connect(transport);
|
|
46
|
+
const tools = await client.listTools();
|
|
47
|
+
if (!tools.tools.some((tool) => tool.name === "search_publications")) {
|
|
48
|
+
throw new Error("Bundled server did not expose search_publications");
|
|
49
|
+
}
|
|
50
|
+
console.log(`MCPB smoke test passed (${tools.tools.length} tools)`);
|
|
51
|
+
} finally {
|
|
52
|
+
clearTimeout(timeout);
|
|
53
|
+
await client.close();
|
|
54
|
+
}
|
|
55
|
+
} finally {
|
|
56
|
+
rmSync(temp, { recursive: true, force: true });
|
|
57
|
+
}
|