Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
5 changes: 5 additions & 0 deletions src/commands/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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();
});
Expand Down