Skip to content

Commit dae913e

Browse files
committed
ifcmcp: sse,streamable-http transports and --help
1 parent 1a84939 commit dae913e

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

src/ifcmcp/ifcmcp/__main__.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
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

57
def 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

1036
if __name__ == "__main__":

0 commit comments

Comments
 (0)