LensStudio:Mcp.IMcpServer
ClassPlugin 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
staticinterfaceId: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()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
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
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean