forked from innovacion/searchbox
Modify mcp
This commit is contained in:
@@ -46,14 +46,19 @@ def qdrant_client(embedding_model: TextEmbedding):
|
||||
def run_mcp():
|
||||
# Start the MCP server in the background
|
||||
process = subprocess.Popen(
|
||||
["uv", "run", "vector-search-mcp"],
|
||||
["uv", "run", "searchbox-mcp"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
)
|
||||
|
||||
# Give the server a moment to start up
|
||||
time.sleep(2)
|
||||
# Give the server more time to start up properly
|
||||
time.sleep(5)
|
||||
|
||||
# Check if process is still running
|
||||
if process.poll() is not None:
|
||||
stdout, stderr = process.communicate()
|
||||
pytest.fail(f"MCP server failed to start. stdout: {stdout}, stderr: {stderr}")
|
||||
|
||||
try:
|
||||
yield "http://localhost:8000/sse"
|
||||
|
||||
Reference in New Issue
Block a user