File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# This file was generated with the assistance of an AI coding tool.
2- from ifcmcp .server import build_server
2+ import argparse
3+
4+ from ifcmcp import __version__
35
46
57def main ():
8+ parser = argparse .ArgumentParser (
9+ prog = "python3 -m ifcmcp" ,
10+ description = (
11+ "ifcmcp — MCP server for IFC building models.\n \n "
12+ "Runs a Model Context Protocol server over stdio so that MCP clients\n "
13+ "can query and edit IFC files without writing them to disk between\n "
14+ "operations.\n \n "
15+ "Add to .mcp.json to configure:\n "
16+ ' {"mcpServers": {"ifc": {"type": "stdio", "command": "python3", "args": ["-m", "ifcmcp"]}}}'
17+ ),
18+ formatter_class = argparse .RawDescriptionHelpFormatter ,
19+ )
20+ parser .add_argument ("--version" , action = "version" , version = f"ifcmcp { __version__ } " )
21+ parser .add_argument (
22+ "--transport" ,
23+ choices = ["stdio" , "sse" , "streamable-http" ],
24+ default = "stdio" ,
25+ help = "MCP transport to use (default: stdio)" ,
26+ )
27+
28+ args = parser .parse_args ()
29+
30+ from ifcmcp .server import build_server
31+
632 server = build_server ()
7- server .run (transport = "stdio" )
33+ server .run (transport = args . transport )
834
935
1036if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments