enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Function buildMcpServer

    • Build a fresh McpServer over already-prepared deps. Cheap (just registers tool handlers — no I/O, no SQLite open). The stdio entry calls this factory once for the selected era, except for the protocol-defined modern-probe-to-legacy-fallback path where it discards the probe instance and calls the same cheap factory again. HTTP also calls it per served request/session; neither path re-prepares the vault or persistence handles.

      Parameters

      • deps: ServerDeps

        Shared prepared vault/index/model dependencies.

      • opts: ServeOptions

        Tool and retrieval configuration.

      • OptionalwriteTracker: WriteRequestTracker

        Optional transport/session aggregate for persistent mutation lifecycle. The stdio, modern + legacy-stateless HTTP, and legacy stateful HTTP serving entrypoints supply an owning tracker so shared dependencies outlive every finishing or rolling-back write; direct programmatic consumers may omit it.

      Returns McpServer

      A freshly registered MCP server.