forked from va/knowledge-search-mcp
Move config validation to top-level
This commit is contained in:
3
main.py
3
main.py
@@ -310,8 +310,6 @@ class AppContext:
|
||||
@asynccontextmanager
|
||||
async def lifespan(_server: FastMCP) -> AsyncIterator[AppContext]:
|
||||
"""Create and configure the vector-search client for the server lifetime."""
|
||||
cfg = Settings.model_validate({})
|
||||
|
||||
vs = GoogleCloudVectorSearch(
|
||||
project_id=cfg.project_id,
|
||||
location=cfg.location,
|
||||
@@ -349,6 +347,7 @@ def _parse_args() -> argparse.Namespace:
|
||||
|
||||
|
||||
_args = _parse_args()
|
||||
cfg = Settings.model_validate({})
|
||||
|
||||
mcp = FastMCP(
|
||||
"knowledge-search",
|
||||
|
||||
Reference in New Issue
Block a user