Reusable mcp server (#39)

* add developer mode instruction to readme

* Make a custom MCP wrapper around FastMCP add more settings, some improvements

* upd test and readme

* review fixes
This commit is contained in:
Andrey Vasnetsov
2025-04-07 12:44:02 +02:00
committed by GitHub
parent 7aad8ebb3c
commit 181be17142
7 changed files with 202 additions and 145 deletions

View File

@@ -53,7 +53,7 @@ class TestFastEmbedProviderIntegration:
# The embeddings should be identical for the same input
np.testing.assert_array_almost_equal(np.array(embedding), np.array(embedding2))
def test_get_vector_name(self):
async def test_get_vector_name(self):
"""Test that the vector name is generated correctly."""
provider = FastEmbedProvider("sentence-transformers/all-MiniLM-L6-v2")
vector_name = provider.get_vector_name()

View File

@@ -1,8 +1,6 @@
import os
from unittest.mock import patch
import pytest
from mcp_server_qdrant.embeddings.types import EmbeddingProviderType
from mcp_server_qdrant.settings import (
DEFAULT_TOOL_FIND_DESCRIPTION,
@@ -16,9 +14,9 @@ from mcp_server_qdrant.settings import (
class TestQdrantSettings:
def test_default_values(self):
"""Test that required fields raise errors when not provided."""
with pytest.raises(ValueError):
# Should raise error because required fields are missing
QdrantSettings()
# Should not raise error because there are no required fields
QdrantSettings()
@patch.dict(
os.environ,