@takch02/server-doctor 1.0.1 → 1.0.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/index.js +5 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4,14 +4,14 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
|
4
4
|
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
6
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
-
import
|
|
7
|
+
import { createRequire } from "module";
|
|
8
|
+
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
const EventSource = require("eventsource");
|
|
11
|
+
global.EventSource = EventSource;
|
|
8
12
|
|
|
9
|
-
// ⭐ AWS 서버 주소 (포트 80이니까 포트 생략 OK)
|
|
10
|
-
// 만약 로컬 테스트 중이면 http://127.0.0.1:8080/mcp/sse
|
|
11
13
|
const SERVER_URL = "http://ec2-52-79-247-25.ap-northeast-2.compute.amazonaws.com/mcp/sse";
|
|
12
14
|
|
|
13
|
-
// SSE 전역 설정 (Node.js 환경용)
|
|
14
|
-
global.EventSource = EventSource;
|
|
15
15
|
|
|
16
16
|
async function main() {
|
|
17
17
|
// 1. AWS 서버와 연결 (Client 역할)
|