Skip to main content

LensStudio:Mcp.IMcpServer

Class

Plugin component interface for the editor MCP server, exposing connection details and runtime status.

Index

Example

const { IMcpServer } = await import('LensStudio:Mcp');
const server = this.pluginSystem.findInterface(IMcpServer) as IMcpServer;

if (Editor.isNull(server)) {
console.log('IMcpServer not available');
return;
}
console.log(
`IMcpServer: running=${server.isRunning()} url=${server.getServerUrl()}`,
);

Extends

Properties

interfaceId

static interfaceId: InterfaceId

Interface identifier for resolving the MCP server component via the plugin system.

Methods

getConfig()

getConfig(): any

Returns the current MCP server configuration object, or undefined if none is set.

Returns

any


getServerToken()

getServerToken(): string

Returns the authentication token clients use to connect to the MCP server.

Returns

string


getServerUrl()

getServerUrl(): string

Returns the URL where the MCP server is reachable.

Returns

string


getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

IPluginComponent.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

IPluginComponent.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

IPluginComponent.isOfType


isRunning()

isRunning(): boolean

Returns true if the MCP server is currently running and accepting connections.

Returns

boolean


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

IPluginComponent.isSame