Frontmatter
| id | 9102 |
| title | Fix Memory Core MCP Server failing to load GEMINI_API_KEY from .env |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Feb 11, 2026, 3:11 PM |
| updatedAt | Feb 11, 2026, 3:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9102 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 11, 2026, 3:18 PM |
Fix Memory Core MCP Server failing to load GEMINI_API_KEY from .env
tobiu assigned to @tobiu on Feb 11, 2026, 3:14 PM

tobiu
Feb 11, 2026, 3:15 PM
Input from Gemini 3 Pro:
✦ I have fixed the issue by adding
import 'dotenv/config'toai/mcp/server/memory-core/mcp-stdio.mjs. This ensures that the.envfile is loaded at startup, makingGEMINI_API_KEYavailable to theHealthServiceandSessionService.I verified the fix by inspecting the file and confirming the
dotenvimport is now present.
tobiu closed this issue on Feb 11, 2026, 3:18 PM
The Memory Core MCP server fails to detect the
GEMINI_API_KEYeven when present in the.envfile. This regression prevents the server from accessing the API key required for summarization features.The investigation reveals that the server entry point
ai/mcp/server/memory-core/mcp-stdio.mjsdoes not importdotenv/config, relying entirely on the parent process to inject environment variables.Proposed Fix: Explicitly import
dotenv/configinai/mcp/server/memory-core/mcp-stdio.mjsto ensure local.envfiles are loaded regardless of the execution context.