forked from innovacion/searchbox
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d91c6cd45 |
@@ -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"
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
2
uv.lock
generated
@@ -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" },
|
||||||
|
|||||||
Reference in New Issue
Block a user