Skip to content

Configuration

ScholarMCP reads configuration from environment variables (and automatically loads .env in the current working directory at startup).

Boolean values accept true/false, 1/0, yes/no, and on/off.

VariableDefaultDescription
NODE_ENVdevelopmentRuntime environment (development, test, production).
LOG_LEVELinfoLog verbosity (debug, info, warn, error).
SCHOLAR_MCP_SERVER_NAMEscholar-mcpMCP server identity name.
SCHOLAR_MCP_SERVER_VERSIONpackage versionMCP server version reported to clients.
SCHOLAR_MCP_TRANSPORTstdioTransport mode: stdio, http, or both.
VariableDefaultDescription
SCHOLAR_MCP_HOST127.0.0.1HTTP bind host.
SCHOLAR_MCP_PORT3000HTTP bind port.
SCHOLAR_MCP_ENDPOINT_PATH/mcpMCP HTTP endpoint path.
SCHOLAR_MCP_HEALTH_PATH/healthHealth check endpoint path.
SCHOLAR_MCP_HTTP_SESSION_MODEstatefulHTTP session mode: stateful or stateless.
SCHOLAR_MCP_HTTP_SESSION_TTL_MS1800000Stateful session time-to-live in milliseconds.
SCHOLAR_MCP_HTTP_MAX_SESSIONS200Maximum concurrent HTTP sessions.
VariableDefaultDescription
SCHOLAR_MCP_API_KEYunsetIf set, requires Authorization: Bearer <key> for HTTP requests.
SCHOLAR_MCP_ALLOWED_ORIGINSunsetComma-separated CORS allow-list for origins.
SCHOLAR_MCP_ALLOWED_HOSTSunsetComma-separated host header allow-list.
VariableDefaultDescription
SCHOLAR_BASE_URLhttps://scholar.google.comScholar base URL.
SCHOLAR_LANGUAGEenScholar language code used by search calls.
SCHOLAR_TIMEOUT_MS15000Request timeout for Scholar calls.
SCHOLAR_RETRY_ATTEMPTS2Retry count for Scholar requests.
SCHOLAR_RETRY_DELAY_MS800Base retry delay for Scholar requests.
SCHOLAR_REQUEST_DELAY_MS250Inter-request pacing delay for Scholar traffic.
SCHOLAR_MAX_RESULTS_PER_REQUEST20Maximum results fetched per Scholar request.
VariableDefaultDescription
RESEARCH_OPENALEX_BASE_URLhttps://api.openalex.orgOpenAlex API base URL.
RESEARCH_OPENALEX_API_KEYunsetOptional OpenAlex API key.
RESEARCH_CROSSREF_BASE_URLhttps://api.crossref.orgCrossref API base URL.
RESEARCH_SEMANTIC_SCHOLAR_BASE_URLhttps://api.semanticscholar.org/graph/v1Semantic Scholar API base URL.
RESEARCH_SEMANTIC_SCHOLAR_API_KEYunsetOptional Semantic Scholar API key.
RESEARCH_TIMEOUT_MS20000Timeout for federated research HTTP requests.
RESEARCH_RETRY_ATTEMPTS2Retry count for federated requests.
RESEARCH_RETRY_DELAY_MS800Base retry delay for federated requests.
RESEARCH_REQUEST_DELAY_MS100Inter-request pacing for federated providers.
VariableDefaultDescription
RESEARCH_ALLOW_REMOTE_PDFStrueAllows remote PDF download ingestion.
RESEARCH_ALLOW_LOCAL_PDFStrueAllows local PDF path ingestion.
RESEARCH_GROBID_URLunsetOptional GROBID endpoint URL.
VariableDefaultDescription
RESEARCH_SEMANTIC_ENGINEcloud-llmExtraction engine mode (cloud-llm or none).
RESEARCH_CLOUD_MODELgpt-4.1-miniModel name used by cloud extraction engine.
RESEARCH_GRAPH_CACHE_TTL_MS300000Literature graph cache TTL in milliseconds.
RESEARCH_GRAPH_MAX_CACHE_ENTRIES300Maximum cached graph entries.
RESEARCH_GRAPH_PROVIDER_RESULT_MULTIPLIER2Per-provider over-fetch multiplier before merge/ranking.
RESEARCH_GRAPH_FUZZY_TITLE_THRESHOLD0.84Fuzzy title dedupe threshold for merged works.