evipedia-mcp-dev 0.1.0 → 0.1.2
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/index.js +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
import { readFileSync } from "fs";
|
|
6
7
|
import { z } from "zod";
|
|
8
|
+
var pkg = (() => {
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
11
|
+
} catch {
|
|
12
|
+
return { name: "evipedia-mcp", version: "0.0.0" };
|
|
13
|
+
}
|
|
14
|
+
})();
|
|
7
15
|
var BASE_URL = (process.env.EVIPEDIA_BASE_URL ?? "https://evipedia.ai").replace(/\/$/, "");
|
|
8
16
|
var SUGGEST_ENDPOINT = process.env.EVIPEDIA_SUGGEST_ENDPOINT ?? "https://formspree.io/f/myknrvdg";
|
|
9
17
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
@@ -22,7 +30,7 @@ function toSlug(input) {
|
|
|
22
30
|
const path = input.startsWith("http") ? new URL(input).pathname : input;
|
|
23
31
|
return path.replace(/\.md$/, "").replace(/^\//, "");
|
|
24
32
|
}
|
|
25
|
-
var server = new McpServer({ name:
|
|
33
|
+
var server = new McpServer({ name: pkg.name, version: pkg.version });
|
|
26
34
|
server.tool(
|
|
27
35
|
"search_reviews",
|
|
28
36
|
"Search evipedia.ai evidence reviews by name, synonym, keyword, or category. Returns matching reviews with their permalinks and conclusions.",
|
|
@@ -106,5 +114,11 @@ server.tool(
|
|
|
106
114
|
};
|
|
107
115
|
}
|
|
108
116
|
);
|
|
117
|
+
server.tool(
|
|
118
|
+
"get_version",
|
|
119
|
+
"Get the running evipedia MCP server's package name and version. Useful to confirm which build is loaded.",
|
|
120
|
+
{},
|
|
121
|
+
async () => ({ content: [{ type: "text", text: `${pkg.name} v${pkg.version}` }] })
|
|
122
|
+
);
|
|
109
123
|
var transport = new StdioServerTransport();
|
|
110
124
|
await server.connect(transport);
|