Skip to content

Server

FastMCP server for idfkit — EnergyPlus model authoring, validation, and simulation.

health_check(_request) async

Health check endpoint for load balancer probes.

Source code in src/idfkit_mcp/server.py
@mcp.custom_route("/health", methods=["GET"])
async def health_check(_request: Request) -> Response:
    """Health check endpoint for load balancer probes."""
    from starlette.responses import JSONResponse

    return JSONResponse({"status": "ok"})

main()

CLI entry point with configurable transport.

Source code in src/idfkit_mcp/server.py
def main() -> None:
    """CLI entry point with configurable transport."""
    args = _parse_args()
    kwargs: dict[str, object] = {"transport": args.transport}
    if args.transport != "stdio":
        kwargs["host"] = args.host
        kwargs["port"] = args.port
    mcp.run(**kwargs)  # type: ignore[arg-type]

version_report()

This server's version and the idfkit version it is running against, read from the install.

Every path that delivers this server to a person has to be able to say which level it runs (feature 004, FR-017): the editor plugin fetches it by name at a pinned version, and the hosted deployment builds it from a pinned release tag. Both numbers come from the installed distributions rather than from a literal, so the answer is what is running and not what somebody last typed.

Source code in src/idfkit_mcp/server.py
def version_report() -> str:
    """This server's version and the idfkit version it is running against, read from the install.

    Every path that delivers this server to a person has to be able to say which level it runs
    (feature 004, FR-017): the editor plugin fetches it by name at a pinned version, and the hosted
    deployment builds it from a pinned release tag. Both numbers come from the installed
    distributions rather than from a literal, so the answer is what is running and not what somebody
    last typed.
    """
    return f"idfkit-mcp {_distribution_version('idfkit-mcp')} (idfkit {_distribution_version('idfkit')})"