Skip to content

Commit 473a2d1

Browse files
committed
Remove dead DOOM server code
1 parent 3fad0c7 commit 473a2d1

11 files changed

Lines changed: 9 additions & 63 deletions

File tree

apps/doom-mcp-server/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ yarn doom:mcp:dev
3333
The standalone Node server listens on:
3434

3535
- `http://127.0.0.1:8787/mcp`
36-
- `http://127.0.0.1:8787/health`
3736

3837
## Build and test
3938

@@ -47,6 +46,5 @@ yarn doom:mcp:test
4746
Netlify serves:
4847

4948
- `/doom/mcp`
50-
- `/doom/api/doom-health`
5149

5250
The session launch path is intentionally self-contained. The browser reads the signed token directly from the `launch_url` and does not depend on server-side session persistence.

apps/doom-mcp-server/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"dependencies": {
33
"@modelcontextprotocol/sdk": "^1.29.0",
4-
"fetch-to-node": "^2.1.0",
5-
"zod": "^4.3.6"
4+
"fetch-to-node": "^2.1.0"
65
},
76
"name": "@chrisnager/doom-mcp-server",
87
"private": true,

apps/doom-mcp-server/src/mcp/server.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
22
import { registerAppResource, registerAppTool, RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server'
3+
import type { AnySchema } from '@modelcontextprotocol/sdk/server/zod-compat.js'
34

45
import type { DoomMcpConfig } from '../config.js'
6+
import { createDoomSessionSchema } from './schemas.js'
57
import { handleDoomToolCall } from './tools.js'
6-
import { createDoomSessionInputSchema } from './zodSchemas.js'
78

89
function buildWidgetHtml() {
910
return `<!doctype html>
@@ -18,18 +19,15 @@ function buildWidgetHtml() {
1819
body { position: relative; }
1920
.shell { width: 100%; height: 100%; display: grid; place-items: center; }
2021
.status { position: absolute; left: 12px; top: 12px; margin: 0; padding: .35rem .5rem; border-radius: .4rem; background: rgba(0,0,0,.65); color: #f3f4f6; font-size: 12px; line-height: 1.2; max-width: calc(100% - 24px); z-index: 2; }
21-
.fallback { position: absolute; right: 12px; bottom: 12px; margin: 0; font-size: 12px; opacity: .8; z-index: 2; }
2222
a { color: #93c5fd; }
2323
</style>
2424
</head>
2525
<body>
2626
<main class="shell" id="shell">
2727
<p class="status" id="status">Waiting for DOOM session…</p>
28-
<a id="launch-link" href="#" target="_blank" rel="noreferrer" aria-label="Launch DOOM in a new tab"></a>
2928
</main>
3029
<script>
3130
const status = document.getElementById('status');
32-
const launchLink = document.getElementById('launch-link');
3331
let initialized = false;
3432
let widgetLoaded = false;
3533
@@ -67,8 +65,6 @@ function buildWidgetHtml() {
6765
function loadWidget(launchUrl) {
6866
if (widgetLoaded) return;
6967
widgetLoaded = true;
70-
launchLink.href = launchUrl;
71-
launchLink.textContent = '';
7268
window.__doomWidgetLaunchUrl__ = launchUrl;
7369
7470
const assetOrigin = new URL(launchUrl).origin;
@@ -186,7 +182,7 @@ export function createDoomMcpServer(config: DoomMcpConfig) {
186182
'create_doom_session',
187183
{
188184
description: 'Create a DOOM session and return a signed launch URL for the hosted /play page.',
189-
inputSchema: createDoomSessionInputSchema,
185+
inputSchema: createDoomSessionSchema as unknown as AnySchema,
190186
_meta: {
191187
ui: {
192188
resourceUri,
@@ -201,7 +197,7 @@ export function createDoomMcpServer(config: DoomMcpConfig) {
201197
'get_doom_launch_url',
202198
{
203199
description: 'Return a signed DOOM launch URL for clients that cannot render the inline app.',
204-
inputSchema: createDoomSessionInputSchema,
200+
inputSchema: createDoomSessionSchema as unknown as AnySchema,
205201
_meta: {
206202
ui: {
207203
resourceUri,

apps/doom-mcp-server/src/mcp/zodSchemas.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/doom-mcp-server/src/server.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ const server = http.createServer(async (request, response) => {
2828
return
2929
}
3030

31-
if (request.method === 'GET' && url.pathname === '/health') {
32-
sendJson(response, 200, {
33-
ok: true,
34-
service: 'doom-mcp-server',
35-
})
36-
return
37-
}
38-
3931
if (request.method === 'POST' && url.pathname === '/mcp') {
4032
const chunks: Buffer[] = []
4133
request.on('data', (chunk) => chunks.push(Buffer.from(chunk)))
@@ -60,7 +52,7 @@ const server = http.createServer(async (request, response) => {
6052

6153
sendJson(response, 404, {
6254
error: 'Not Found',
63-
endpoints: ['/health', '/mcp'],
55+
endpoints: ['/mcp'],
6456
})
6557
})
6658

doom/NEXT_STEPS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The current project scope is intentionally lean:
44

5-
- one tool: `create_doom_session`
5+
- two tools: `create_doom_session` and `get_doom_launch_url`
66
- one standalone play route: `/doom/play`
77
- one inline MCP app path for hosts that support it
88

doom/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ yarn doom:mcp:dev
5555

5656
Default endpoints:
5757

58-
- `http://127.0.0.1:8787/health`
5958
- `http://127.0.0.1:8787/mcp`
6059

6160
## Netlify-shaped local testing
@@ -78,7 +77,6 @@ Then test:
7877

7978
- `http://127.0.0.1:4173/doom/`
8079
- `http://127.0.0.1:4173/doom/play?session=demo123`
81-
- `http://127.0.0.1:8787/health`
8280
- `http://127.0.0.1:8787/mcp`
8381

8482
## Build and test
@@ -95,7 +93,6 @@ Netlify publishes:
9593

9694
- `/doom/play`
9795
- `/doom/mcp`
98-
- `/doom/api/doom-health`
9996

10097
The browser launch path is self-contained: the signed token in the URL is enough to boot the game.
10198

doom/types/doom-external.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ declare module 'fetch-to-node' {
1919
export function toReqRes(request: Request): { req: unknown; res: unknown }
2020
export function toFetchResponse(response: unknown): Promise<Response>
2121
}
22-
23-
declare module 'zod' {
24-
export const z: any
25-
}

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
[functions]
77
node_bundler = "esbuild"
8-
external_node_modules = ["@modelcontextprotocol/sdk", "fetch-to-node", "zod"]
8+
external_node_modules = ["@modelcontextprotocol/sdk", "fetch-to-node"]

netlify/functions/doom-health.mts

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)