Skip to content

Conversation

@slimslenderslacks
Copy link
Collaborator

@slimslenderslacks slimslenderslacks commented Nov 21, 2025

This PR introduces several improvements to the embeddings feature and adds new profile management capabilities to the MCP Gateway.

Embeddings Infrastructure Improvements

Container Lifecycle Management: Fixed a critical resource leak where Docker containers spawned by the embeddings client were not being
properly cleaned up on shutdown. The VectorDBClient.Close() method now uses docker stop to gracefully terminate containers and properly
reaps processes, preventing orphaned containers from accumulating. Added comprehensive tests to verify container cleanup behavior.

Configurable Vector Dimensions: Added a dimension parameter to NewVectorDBClient() with a default value of 1536, allowing future
flexibility for different embedding models. Updated all callers and added test coverage for various dimension values including edge
cases.

Conditional Tool Registration: The find-tools dynamic tool (AI-powered tool recommendation) is now only registered when the embeddings
client is successfully configured, preventing confusing errors when embeddings support is unavailable.

Configuration Validation Enhancement

Refactored the mcp-config-set tool to accept and validate complete configuration objects instead of individual key-value pairs. The
tool now validates the entire config object against the server's JSON schema and returns detailed validation errors with the full
schema when validation fails, enabling agents to self-correct configuration mistakes.

Profile Management

Added a new mcp-create-profile dynamic tool that captures the current gateway state (all enabled servers, their configurations, and
tool selections) into a reusable profile. Profiles can be created or updated, providing a snapshot mechanism for quickly restoring or
sharing gateway configurations. The implementation integrates with the existing working set/profile database infrastructure and
includes full validation.

@slimslenderslacks slimslenderslacks force-pushed the slim/embeddings branch 3 times, most recently from 024ab72 to 71105ed Compare November 22, 2025 06:39
@slimslenderslacks slimslenderslacks force-pushed the slim/embeddings branch 2 times, most recently from 7d62beb to 5097bc0 Compare November 26, 2025 17:56
@slimslenderslacks slimslenderslacks force-pushed the slim/embeddings branch 3 times, most recently from 664f03f to e69fa22 Compare December 8, 2025 23:00
@slimslenderslacks slimslenderslacks marked this pull request as ready for review December 9, 2025 02:51
@slimslenderslacks slimslenderslacks requested a review from a team as a code owner December 9, 2025 02:51
@slimslenderslacks slimslenderslacks force-pushed the slim/embeddings branch 2 times, most recently from 5dd345d to d99a9b1 Compare December 9, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants