-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmcp_server.py
More file actions
35 lines (26 loc) · 803 Bytes
/
mcp_server.py
File metadata and controls
35 lines (26 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from __future__ import annotations
from typing import Optional, List
from mcp.server.fastmcp import FastMCP
from tools.shared import normalize_task_result
import tools.orchestrator as orch_mod
mcp = FastMCP("VoxelInsight")
@mcp.tool()
async def orchestrator(
query: str,
pipeline: str = "idc",
tool_names: Optional[List[str]] = None,
files: Optional[List[str]] = None,
thread_id: Optional[str] = None,
include_tool_payloads: bool = True,
) -> dict:
res = await orch_mod.orchestrator_runner._runner(
query=query,
pipeline=pipeline,
tool_names=tool_names,
files=files,
thread_id=thread_id,
include_tool_payloads=include_tool_payloads,
)
return normalize_task_result(res)
if __name__ == "__main__":
mcp.run()