@victox/hello-stdio 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/dist/cli.d.ts +2 -0
- package/dist/cli.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/package.json +32 -0
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createHelloServer } from "@victox/hello-lib";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
async function main() {
|
|
4
|
+
const mcpServer = createHelloServer({
|
|
5
|
+
name: "hello-mcp-server",
|
|
6
|
+
version: "0.1.0",
|
|
7
|
+
});
|
|
8
|
+
const transport = new StdioServerTransport();
|
|
9
|
+
await mcpServer.connect(transport);
|
|
10
|
+
}
|
|
11
|
+
if (process.stdin.isTTY)
|
|
12
|
+
process.stdin.resume();
|
|
13
|
+
main().catch((err) => {
|
|
14
|
+
const message = err instanceof Error ? err.stack ?? err.message : String(err);
|
|
15
|
+
process.stderr.write(message + "\n");
|
|
16
|
+
process.exit(1);
|
|
17
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@victox/hello-stdio",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"hello-mcp-server": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./dist/index.js",
|
|
16
|
+
"./cli": "./dist/cli.js",
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.json",
|
|
21
|
+
"prepack": "pnpm run build",
|
|
22
|
+
"start": "node dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
26
|
+
"@victox/hello-lib": "workspace:*"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^22.10.2",
|
|
30
|
+
"typescript": "^5.5.4"
|
|
31
|
+
}
|
|
32
|
+
}
|