forma-3d-review-api / src /mcp /server.py
lomit's picture
Sync from forma-3d-review@b6d4687f5d0f2e5303758c97095ea7e38e740723
182efca verified
raw
history blame contribute delete
709 Bytes
"""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()