Spaces:
Sleeping
Sleeping
File size: 709 Bytes
182efca | 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 | """MCP server for CAD review tools."""
from __future__ import annotations
import json
import logging
from pathlib import Path
logger = logging.getLogger(__name__)
# MCP server setup - this will be a FastMCP-based server
# that exposes tools for interacting with the CAD review system
try:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("cad-review")
from src.mcp.tools import register_tools
register_tools(mcp)
except ImportError:
logger.info("MCP SDK not available - MCP server disabled")
mcp = None
def run_mcp_server():
"""Run the MCP server."""
if mcp is None:
raise RuntimeError("MCP SDK not installed. Install with: pip install mcp")
mcp.run()
|