@dataville/dataville-mcp 0.1.0 → 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.
- package/README.md +9 -1
- package/dist/client.js +7 -1
- package/dist/index.js +2 -2
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -43,5 +43,13 @@ npm run build
|
|
|
43
43
|
## Development
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npm run dev
|
|
46
|
+
npm run dev # tsx watch
|
|
47
|
+
npm test # node test runner
|
|
48
|
+
npm run build # tsc
|
|
47
49
|
```
|
|
50
|
+
|
|
51
|
+
## Releasing
|
|
52
|
+
|
|
53
|
+
Publishes run from CI via npm trusted publishing (OIDC) — no tokens are stored.
|
|
54
|
+
To cut a release: bump the version, update `CHANGELOG.md`, then publish a GitHub
|
|
55
|
+
Release for the new tag. The `Publish` workflow builds, tests, and publishes to npm.
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
const DEFAULT_BASE_URL = "https://api.dataville.com";
|
|
2
|
+
// Keep in sync with package.json version (enforced by a test).
|
|
3
|
+
export const VERSION = "0.1.1";
|
|
4
|
+
const USER_AGENT = `dataville-mcp/${VERSION}`;
|
|
2
5
|
export class DatavilleApiError extends Error {
|
|
3
6
|
status;
|
|
4
7
|
constructor(status, message) {
|
|
@@ -24,7 +27,10 @@ export async function searchDataSource(source, keywords, params) {
|
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
const response = await fetch(url, {
|
|
27
|
-
headers: {
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: `Bearer ${apiKey}`,
|
|
32
|
+
"User-Agent": USER_AGENT,
|
|
33
|
+
},
|
|
28
34
|
});
|
|
29
35
|
const body = await response.json().catch(() => undefined);
|
|
30
36
|
if (!response.ok) {
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { searchDataSource, DatavilleApiError } from "./client.js";
|
|
5
|
+
import { searchDataSource, DatavilleApiError, VERSION } from "./client.js";
|
|
6
6
|
import { DATAVILLE_SOURCES } from "./sources.js";
|
|
7
7
|
const server = new McpServer({
|
|
8
8
|
name: "dataville-mcp-server",
|
|
9
|
-
version:
|
|
9
|
+
version: VERSION,
|
|
10
10
|
});
|
|
11
11
|
server.registerTool("list_dataville_sources", {
|
|
12
12
|
title: "List Dataville data sources",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataville/dataville-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server exposing Dataville's data source API as tools for MCP clients",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,12 +12,17 @@
|
|
|
12
12
|
"bin": {
|
|
13
13
|
"dataville-mcp": "dist/index.js"
|
|
14
14
|
},
|
|
15
|
-
"files": [
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
16
20
|
"scripts": {
|
|
17
21
|
"build": "tsc",
|
|
18
22
|
"prepublishOnly": "npm run build",
|
|
19
23
|
"dev": "tsx watch src/index.ts",
|
|
20
|
-
"start": "node dist/index.js"
|
|
24
|
+
"start": "node dist/index.js",
|
|
25
|
+
"test": "tsx --test src/__tests__/*.test.ts"
|
|
21
26
|
},
|
|
22
27
|
"dependencies": {
|
|
23
28
|
"@modelcontextprotocol/sdk": "^1.12.0",
|