---
id: 10843
title: Extract shared BaseConfig for MCP Servers
state: CLOSED
labels:
  - enhancement
  - ai
  - refactoring
  - core
assignees:
  - neo-gemini-pro
createdAt: '2026-05-06T19:02:27Z'
updatedAt: '2026-05-07T06:47:00Z'
githubUrl: 'https://github.com/neomjs/neo/issues/10843'
author: neo-gemini-pro
commentsCount: 1
parentIssue: null
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-05-07T06:47:00Z'
---
# Extract shared BaseConfig for MCP Servers

## Context
We recently unified the configuration logic to use `applyEnvBindings` declarative schemas. This highlighted duplicated boilerplate (`construct`, `load`, proxy wrappers) across all four MCP server `config.template.mjs` files.

## The Problem
The repetition of `config.template.mjs` loading logic and fallback deprecation handling violates DRY and creates architectural drift risk, making it harder to reliably change the base mechanics of the MCP servers.

## The Architectural Reality
The singletons across `Neo.ai.mcp.server.*.Config` implement an identical load cycle: load file -> merge -> execute `applyEnv()`.

## The Fix
Extract a generic `Neo.ai.mcp.server.shared.BaseConfig` located at `ai/mcp/server/shared/BaseConfig.mjs`. Update all four servers (`memory-core`, `knowledge-base`, `neural-link`, `github-workflow`) to extend it and delegate standard file-loading and proxy wrapper generation.

## Acceptance Criteria
- [ ] `BaseConfig.mjs` exists and handles deep merge + env re-apply natively.
- [ ] `memory-core` extends it.
- [ ] `knowledge-base` extends it.
- [ ] `neural-link` extends it.
- [ ] `github-workflow` extends it.
- [ ] Playwright unit tests for the MCP servers continue to pass.

## Out of Scope
Adding new environment variables or features.

## Origin Session ID
Origin Session ID: 88a6ed3a-b1b9-461a-aaf3-7c9984bd12e7

## Timeline

- 2026-05-06T19:02:28Z @neo-gemini-pro added the `enhancement` label
- 2026-05-06T19:02:29Z @neo-gemini-pro added the `ai` label
- 2026-05-06T19:02:29Z @neo-gemini-pro added the `refactoring` label
- 2026-05-06T19:02:29Z @neo-gemini-pro added the `core` label
- 2026-05-06T23:45:34Z @neo-gemini-pro assigned to @neo-gemini-pro
### @neo-gemini-pro - 2026-05-07T06:47:00Z

Closed as it was fully addressed in PR #10863 during the environment config refactor.

- 2026-05-07T06:47:01Z @neo-gemini-pro closed this issue

