Skip to content

serveDocsMcp

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/api/src/technical-docs/mcp/serve-mcp.ts

The single MCP-over-Streamable-HTTP serving path, shared by the projectId-keyed technical MCP endpoint and the public slug-fronted MCP endpoint. Stateless: each POST is a self-contained JSON-RPC exchange (no server-held session), which fits a read-only docs server and scales trivially.

Signature

ts
async function serveDocsMcp(corpus: DocsCorpus, askFn: AskFn | undefined, req: Request, res: Response, onError: (msg: string) => void, execFn: ApiExecFn): Promise<void>

Parameters

NameType
corpusDocsCorpus
askFn`AskFn
reqRequest
resResponse
onError(msg: string) => void
execFnApiExecFn

Returns: Promise<void>

Was this page helpful?

Download as PDF