From 5ca0ab9e396bc6e3afb3801a4c30162bcd26d2c9 Mon Sep 17 00:00:00 2001 From: Cristian Baldi Date: Thu, 10 Sep 2026 08:56:23 +0200 Subject: [PATCH] NOISSUE: handle / by redirecting to documentation --- README.md | 1 + src/commands/http.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 88da7f0..81c91a0 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Set `ALLOWED_CORS_ORIGINS` to the exact web client origins that should be allowe The HTTP server exposes: +- `/` — redirects to the documentation site at [scrive.github.io/mcp](https://scrive.github.io/mcp/). - `/.well-known/oauth-protected-resource` - `/mcp` diff --git a/src/commands/http.ts b/src/commands/http.ts index be4d99f..b746e88 100644 --- a/src/commands/http.ts +++ b/src/commands/http.ts @@ -12,6 +12,8 @@ import { JourneyClient } from "../scrive/journey/client.js"; import { RateLimiter } from "../scrive/rate-limiter.js"; import { createServer } from "../server.js"; +const DOCS_URL = "https://scrive.github.io/mcp/"; + function internalError(res: { headersSent: boolean; status: (code: number) => { json: (value: unknown) => void }; @@ -107,6 +109,9 @@ export function createHttpApp(config: HttpConfig, allowedDirectories: string[]) const corsMiddleware = createCorsMiddleware(config.corsOrigins); app.use(corsMiddleware); + app.get("/", (_req, res) => { + res.redirect(302, DOCS_URL); + }); app.options("/mcp", (_req, res) => { res.status(204).end(); });