ServerEntry#

class ansys.aedt.mcp.lanes.registry.ServerEntry#

One lane backend recorded in the registry.

Parameters:
server_idstr

Lane name, unique within the registry.

http_portint

Loopback port the lane serves MCP over HTTP on.

pidint, optional

Process ID of the lane backend.

aedt_gpc_portint, optional

gRPC port of the AEDT session the lane owns, if known.

log_pathstr, optional

File capturing the lane’s stdout and stderr.

started_atfloat

Creation time as a POSIX timestamp.

pythonstr, optional

Interpreter running the lane, which identifies its installation.

auth_tokenstr, optional

Bearer secret the lane requires on every HTTP request. It is never exposed to clients; use public_dict() for display.

Overview#

from_dict

Rebuild an entry from JSON data, ignoring unknown fields.

to_dict

Return a JSON-serializable representation, including the secret.

public_dict

Return a representation safe to show to clients.

auth_mode

Authentication mode of the lane: "token" or "none".

Import detail#

from ansys.aedt.mcp.lanes.registry import ServerEntry

Property detail#

property ServerEntry.auth_mode: str#

Authentication mode of the lane: "token" or "none".

Attribute detail#

ServerEntry.server_id: str#
ServerEntry.http_port: int#
ServerEntry.pid: int | None = None#
ServerEntry.aedt_gpc_port: int | None = None#
ServerEntry.log_path: str | None = None#
ServerEntry.started_at: float#
ServerEntry.python: str | None = None#
ServerEntry.auth_token: str | None = None#

Method detail#

ServerEntry.to_dict() → dict[str, Any]#

Return a JSON-serializable representation, including the secret.

Returns:
dict[str, Any]

All entry fields.

ServerEntry.public_dict() → dict[str, Any]#

Return a representation safe to show to clients.

Returns:
dict[str, Any]

Entry fields with auth_token replaced by auth.

classmethod ServerEntry.from_dict(data: dict[str, Any]) → ServerEntry#

Rebuild an entry from JSON data, ignoring unknown fields.

Parameters:
datadict[str, Any]

Serialized entry.

Returns:
ServerEntry

Rebuilt entry.