LearnNewsExamplesServices
Frontmatter
id7501
titleArchitect AI Knowledge Base as MCP Server
stateClosed
labels
epicai
assigneestobiu
createdAtOct 16, 2025, 11:45 AM
updatedAtOct 17, 2025, 1:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/7501
authortobiu
commentsCount1
parentIssuenull
subIssues
7502 Design Knowledge Base MCP Server API
7503 Scaffold Knowledge Base MCP Server
7504 Implement Knowledge Base Tool Service
7505 Implement Healthcheck Service
7506 Implement Delete Database Service
7507 Implement Query Documents Service
7508 Implement Sync Database Service
7509 Implement Document Retrieval Services
7510 Refactor MCP Server Configuration
7511 Separate Create and Embed Services
7512 Review and Correct Database Service Implementation
7513 Enhance OpenAPI Spec with Tool Usage Examples
7514 Enhance All Tools with In-Spec Manuals
7515 Healthcheck tool returns unstructured content
7516 Bug: query_documents input parameter mismatch
7517 Refactor toolService.mjs to Reduce Code Duplication
7518 Make toolService resilient to server-prefixed tool names
7519 Dynamically determine argument passing strategy from OpenAPI spec
subIssuesCompleted18
subIssuesTotal18
blockedBy[]
blocking[]
closedAtOct 17, 2025, 1:01 PM

Architect AI Knowledge Base as MCP Server

Closed v11.0.0 epicai
tobiu
tobiu commented on Oct 16, 2025, 11:45 AM

This epic addresses the need to migrate our script-based AI knowledge base tools (buildScripts/ai/*.mjs) into a robust, professional-grade Model Context Protocol (MCP) server.

The primary goal is to create a persistent, stateful server that provides a formal API for all knowledge base interactions (building, embedding, and querying). This moves us away from ad-hoc scripts and toward the professionalized AI tooling outlined in the project ROADMAP.md.

Priority & Methodology

This is a critical-path initiative for the core team (Tobi & Gemini duo). It is not a candidate for Hacktoberfest or external contribution.

We will employ a rapid and agile development approach. The scope and API specification are expected to evolve as we build and test the server. This flexibility is key to quickly delivering a solution that effectively unblocks our ability to provide AI agents with deep project context.

Top-Level Items

Phase 1: Scaffolding & Core API Definition

  • Goal: Establish the server's foundation and define the initial API for knowledge base interactions.
  • Sub-Tasks:
    • ticket-kb-design-api.md: Design the comprehensive API for the Knowledge Base MCP Server.
    • ticket-kb-scaffold-server.md: Scaffold the server structure based on the mcp-stdio.mjs pattern.

Phase 2: API Implementation

  • Goal: Build out the backend logic to connect the OpenAPI endpoints to live service functions.
  • Sub-Tasks:
    • ticket-kb-implement-tool-service.md: Implement the core tool service to dynamically load tools from the OpenAPI spec.
    • ticket-kb-implement-healthcheck-service.md: Implement the healthcheck service to verify the connection to ChromaDB.
    • ticket-kb-implement-delete-db-service.md: Implement the service to delete the ChromaDB collection.
    • ticket-kb-implement-query-service.md: Implement the service to query documents from the knowledge base.
    • ticket-kb-implement-sync-service.md: Implement the service to build and embed the knowledge base content.
    • ticket-kb-implement-document-services.md: Implement services to list and retrieve individual documents.

Phase 3: Refactoring & Cleanup

  • Goal: Improve the modularity and maintainability of the server code.
  • Sub-Tasks:
    • ticket-kb-refactor-config.md: Decouple the server from the shared buildScripts configuration.
    • ticket-kb-separate-create-embed.md: Separate the monolithic sync service into distinct create and embed tools.
    • ticket-kb-review-and-correct-database-service.md: Review and correct the databaseService implementation to ensure full feature parity.
    • ticket-kb-enhance-openapi-examples.md: Enhance the OpenAPI spec with tool usage examples from AGENTS.md.
    • ticket-kb-enhance-tool-manuals.md: Expand tool descriptions into comprehensive in-spec manuals.
    • ticket-kb-refactor-tool-service.md: Refactor toolService.mjs to reduce code duplication.
    • ticket-kb-resilient-tool-service.md: Make toolService resilient to server-prefixed tool names.
    • ticket-kb-openapi-driven-args.md: Dynamically determine argument passing strategy from OpenAPI spec.

Phase 4: Bugfixes

  • Goal: Address bugs discovered during testing.
  • Sub-Tasks:
    • bug-kb-healthcheck-unstructured-content.md: Fix the healthcheck tool to return structured content matching its schema.
    • bug-kb-query-documents-input-mismatch.md: Fix the input parameter mismatch for the query_documents tool.
tobiu assigned to @tobiu on Oct 16, 2025, 11:45 AM
tobiu added the epic label on Oct 16, 2025, 11:45 AM
tobiu added the ai label on Oct 16, 2025, 11:45 AM
tobiu added sub-issue #7502 on Oct 16, 2025, 11:47 AM
tobiu added sub-issue #7503 on Oct 16, 2025, 12:00 PM
tobiu referenced in commit 60ba111 - "#7501 epic as md file" on Oct 16, 2025, 12:13 PM
tobiu added sub-issue #7504 on Oct 16, 2025, 12:20 PM
tobiu added sub-issue #7505 on Oct 16, 2025, 12:33 PM
tobiu added sub-issue #7506 on Oct 16, 2025, 12:43 PM
tobiu added sub-issue #7507 on Oct 16, 2025, 12:47 PM
tobiu added sub-issue #7508 on Oct 16, 2025, 12:56 PM
tobiu added sub-issue #7509 on Oct 16, 2025, 1:06 PM
tobiu added sub-issue #7510 on Oct 16, 2025, 1:21 PM
tobiu added sub-issue #7511 on Oct 16, 2025, 1:32 PM
tobiu added sub-issue #7512 on Oct 16, 2025, 2:16 PM
tobiu added sub-issue #7513 on Oct 16, 2025, 2:23 PM
tobiu added sub-issue #7514 on Oct 16, 2025, 2:37 PM
tobiu added sub-issue #7515 on Oct 16, 2025, 2:58 PM
tobiu added sub-issue #7516 on Oct 16, 2025, 4:07 PM
tobiu added sub-issue #7517 on Oct 17, 2025, 12:37 PM
tobiu added sub-issue #7518 on Oct 17, 2025, 12:46 PM
tobiu added sub-issue #7519 on Oct 17, 2025, 12:59 PM
tobiu
tobiu Oct 17, 2025, 1:01 PM
Image
tobiu closed this issue on Oct 17, 2025, 1:01 PM