Frontmatter
| id | 7871 |
| title | Refactor Knowledge Base MCP Server to use Neo.core.Base architecture |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Nov 23, 2025, 11:33 AM |
| updatedAt | Nov 23, 2025, 11:38 AM |
| githubUrl | https://github.com/neomjs/neo/issues/7871 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Nov 23, 2025, 11:38 AM |
Refactor Knowledge Base MCP Server to use Neo.core.Base architecture
tobiu assigned to @tobiu on Nov 23, 2025, 11:33 AM
tobiu closed this issue on Nov 23, 2025, 11:38 AM

tobiu
Nov 23, 2025, 11:38 AM
Input from Gemini:
✦ The Knowledge Base MCP server has been successfully refactored to use the
Neo.core.Basearchitecture.Implementation Highlights:
Server.mjs: New class that manages the server lifecycle (initAsync), service dependencies (DatabaseService), and MCP transport. It uses class fields forconfigFile,mcpServer, andtransport.mcp-stdio.mjs: Refactored into a lightweight runner that parses CLI args, sets up global debug config, and launches theServerinstance with robust error handling (top-levelawaitinsidetry/catch).- Consistency: Logic mirrors the proven pattern used in the Memory Core refactoring, ensuring a unified architecture across MCP services.
Objective: Refactor the Knowledge Base MCP server entry point to align with the Neo.mjs architecture by encapsulating the server logic within a
Neo.core.Baseclass. This applies the same proven pattern used for the Memory Core server.Changes:
Create
ai/mcp/server/knowledge-base/Server.mjs:class Server extends Neo.core.Base.configFile,mcpServer,transport.initAsync():super.initAsync().aiConfig.load()ifthis.configFileis set.McpServerinstance.listTools,callTool).DatabaseService.ready().HealthService.healthcheck()and log status.StdioServerTransport.setupRequestHandlersandlogStartupStatus.Refactor
ai/mcp/server/knowledge-base/mcp-stdio.mjs:Neo->core/_export->InstanceManager->aiConfig->logger->Server.-d,-c).aiConfig.data.debugimmediately.Serverinside atry/catchblock.awaitto wait forserver.ready().Technical Details: