diff --git a/src/ifcmcp/ifcmcp/__main__.py b/src/ifcmcp/ifcmcp/__main__.py index 0e94699ea0..0d8ba87f49 100644 --- a/src/ifcmcp/ifcmcp/__main__.py +++ b/src/ifcmcp/ifcmcp/__main__.py @@ -1,10 +1,36 @@ # This file was generated with the assistance of an AI coding tool. -from ifcmcp.server import build_server +import argparse + +from ifcmcp import __version__ def main(): + parser = argparse.ArgumentParser( + prog="python3 -m ifcmcp", + description=( + "ifcmcp — MCP server for IFC building models.\n\n" + "Runs a Model Context Protocol server over stdio so that MCP clients\n" + "can query and edit IFC files without writing them to disk between\n" + "operations.\n\n" + "Add to .mcp.json to configure:\n" + ' {"mcpServers": {"ifc": {"type": "stdio", "command": "python3", "args": ["-m", "ifcmcp"]}}}' + ), + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument("--version", action="version", version=f"ifcmcp {__version__}") + parser.add_argument( + "--transport", + choices=["stdio", "sse", "streamable-http"], + default="stdio", + help="MCP transport to use (default: stdio)", + ) + + args = parser.parse_args() + + from ifcmcp.server import build_server + server = build_server() - server.run(transport="stdio") + server.run(transport=args.transport) if __name__ == "__main__":