Spaces:
Sleeping
Sleeping
| """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() | |