@nullplatform/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/dist/server.js +6 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { detectRepoUrl } from "./git.js";
|
|
3
4
|
import { TokenManager } from "./np/auth.js";
|
|
@@ -7,6 +8,10 @@ import { loadSkills, registerPlaybookResources, skillsInstructionBlock } from ".
|
|
|
7
8
|
import { defaultSurface } from "./surfaces/index.js";
|
|
8
9
|
import { registerTools } from "./tool.js";
|
|
9
10
|
import { EXTENSION_ID, RESOURCE_MIME_TYPE, registerWidgets, uiNegotiated } from "./ui.js";
|
|
11
|
+
/** Reported as the MCP server version; read from package.json so it tracks releases instead
|
|
12
|
+
* of a literal that silently drifts. src/server.ts and dist/server.js both sit one level
|
|
13
|
+
* below package.json, so this resolves in dev, under vitest, and in the published package. */
|
|
14
|
+
const packageVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
10
15
|
export function buildDeps(config, fetchImpl = fetch, tokenSource) {
|
|
11
16
|
const tokens = tokenSource ??
|
|
12
17
|
new TokenManager({ apiBase: config.apiBase, apiKey: config.apiKey, bearer: config.bearer }, fetchImpl);
|
|
@@ -32,7 +37,7 @@ export function buildServer(deps, options = {}) {
|
|
|
32
37
|
// Operating playbooks (skills/*.md) are inlined straight into the instructions below, so the
|
|
33
38
|
// model always has the methodology in context — nothing to fetch, nothing to "run as a skill".
|
|
34
39
|
const skills = loadSkills();
|
|
35
|
-
const server = new McpServer({ name: surface.serverName, version:
|
|
40
|
+
const server = new McpServer({ name: surface.serverName, version: packageVersion }, {
|
|
36
41
|
capabilities: {
|
|
37
42
|
logging: {},
|
|
38
43
|
// MCP Apps capability negotiation (SEP-1724/SEP-1865): hosts gate widget
|
package/package.json
CHANGED