Skip to content
Open
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
3 changes: 3 additions & 0 deletions src/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
addLineNumbers,
structuredSearch,
DEFAULT_MULTI_GET_MAX_BYTES,
enableProductionMode,
} from "./store.js";
import type { Store, StructuredSubSearch } from "./store.js";
import { getCollection, getGlobalContext, getDefaultCollectionNames } from "./collections.js";
Expand Down Expand Up @@ -542,6 +543,7 @@ Intent-aware lex (C++ performance, not sports):
// =============================================================================

export async function startMcpServer(): Promise<void> {
enableProductionMode();
const store = createStore();
const server = createMcpServer(store);
const transport = new StdioServerTransport();
Expand All @@ -563,6 +565,7 @@ export type HttpServerHandle = {
* Binds to localhost only. Returns a handle for shutdown and port discovery.
*/
export async function startMcpHttpServer(port: number, options?: { quiet?: boolean }): Promise<HttpServerHandle> {
enableProductionMode();
const store = createStore();

// Session map: each client gets its own McpServer + Transport pair (MCP spec requirement).
Expand Down
2 changes: 1 addition & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {
// Configuration
// =============================================================================

const HOME = process.env.HOME || "/tmp";
const HOME = process.env.HOME || process.env.USERPROFILE || "/tmp";
export const DEFAULT_EMBED_MODEL = "embeddinggemma";
export const DEFAULT_RERANK_MODEL = "ExpedientFalcon/qwen3-reranker:0.6b-q8_0";
export const DEFAULT_QUERY_MODEL = "Qwen/Qwen3-1.7B";
Expand Down