From dae913e06a48f4f3cdc608eff2e4316ef24811a9 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Thu, 26 Mar 2026 07:02:50 +0000 Subject: [PATCH] ifcmcp: sse,streamable-http transports and --help --- src/ifcmcp/ifcmcp/__main__.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) 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__":