5 Commits
v0.1.0 ... main

Author SHA1 Message Date
5e9900d6a7 run ci on pr to main 2025-09-30 18:12:29 +00:00
611c2c4b81 add base embedder 2025-09-30 17:30:46 +00:00
23a4ce9fe3 add mise tasks 2025-09-30 17:21:02 +00:00
9ddb970ca4 Add secret ref to deployment 2025-09-27 19:32:04 +00:00
6d91c6cd45 Add health endpoint 2025-09-27 19:13:19 +00:00
10 changed files with 37 additions and 6 deletions

View File

@@ -4,6 +4,9 @@ on:
push: push:
branches: branches:
- main - main
pull_request:
branches:
- main
jobs: jobs:
ci: ci:

View File

@@ -22,3 +22,6 @@ spec:
image: gitea.ia-innovacion.work/innovacion/searchbox-mcp:latest image: gitea.ia-innovacion.work/innovacion/searchbox-mcp:latest
ports: ports:
- containerPort: 8000 - containerPort: 8000
envFrom:
- secretRef:
name: vault-readonly-token

5
.mise/config.toml Normal file
View File

@@ -0,0 +1,5 @@
[tasks.check]
run = ["uv run ruff check --fix", "uv run ruff format"]
[tasks.test]
run = "uv run pytest --cov"

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "searchbox" name = "searchbox"
version = "0.1.0" version = "0.1.1"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.13" requires-python = ">=3.13"

View File

@@ -0,0 +1 @@
"""Embedder class using Azure AI Foundry."""

View File

@@ -0,0 +1,7 @@
"""Embedder class using Azure AI Foundry."""
from .base import BaseEmbedder
class AzureEmbedder(BaseEmbedder):
def embed(self, text: str) -> list[float]: ...

View File

@@ -0,0 +1,6 @@
from abc import ABC, abstractmethod
class BaseEmbedder(ABC):
@abstractmethod
def embed(self, text: str) -> list[float]: ...

View File

@@ -17,12 +17,10 @@ Example:
""" """
from fastmcp.server.server import Transport
from .server import mcp from .server import mcp
def run(transport: Transport = "sse"): # pragma: no cover def run(): # pragma: no cover
"""Run the vector search MCP server with the specified transport. """Run the vector search MCP server with the specified transport.
Args: Args:
@@ -34,4 +32,4 @@ def run(transport: Transport = "sse"): # pragma: no cover
>>> run("stdio") # Start with stdio transport >>> run("stdio") # Start with stdio transport
""" """
mcp.run(transport=transport) mcp.run(transport="sse", host="0.0.0.0", port=8000)

View File

@@ -19,6 +19,8 @@ Example:
from typing import Annotated from typing import Annotated
from fastmcp import FastMCP from fastmcp import FastMCP
from starlette.requests import Request
from starlette.responses import JSONResponse
from ..engine import get_engine from ..engine import get_engine
@@ -49,3 +51,9 @@ async def get_information(
) )
return result return result
@mcp.custom_route("/health", methods=["GET"])
async def health_check(_request: Request):
"""Health check endpoint."""
return JSONResponse({"status": "ok", "service": "searchbox-mcp"})

2
uv.lock generated
View File

@@ -1527,7 +1527,7 @@ wheels = [
[[package]] [[package]]
name = "searchbox" name = "searchbox"
version = "0.1.0" version = "0.1.1"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "qdrant-client" }, { name = "qdrant-client" },