MCP Commands - Status & Configuration

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations >

MCP Commands - Status & Configuration

MCP Status & Configuration - Overview

PreviousTopNext


MiniRobot Language (MRL) - MCP Server Feature

 

MCP Status & Configuration

Server Status Monitoring and Configuration Management

 

What is Status & Configuration?

 

The MCP Status & Configuration category provides commands for monitoring the MCP server state, controlling feature capabilities, managing command filtering rules, and configuring server behavior. These commands enable scripts to query server health, enable or disable features dynamically, and implement security policies through command filtering.

 

Key Features

 

Server Status Monitoring: Retrieve detailed or compact status information about the server

Feature Control: Query and enable/disable MCP features at runtime

Command Filtering: Implement whitelists, blacklists, and pattern-based command restrictions

Window Control: Show, hide, or minimize the MCP server window

Input Simulation: Send keystrokes to applications via keyboard buffer

 

Available Commands

 

Status Monitoring Commands:

MCP.GetStatus - Get detailed server status information

MCP.GetStatusByte - Get compact status as byte value

 

Feature Control Commands:

MCP.GetFeature - Query feature availability and state

MCP.SetFeature - Enable or disable features dynamically

 

Command Filtering Commands:

MCP.GetCMDFilter - Retrieve current filter configuration

MCP.SetCMDFilter - Set command filter rules

MCP.LoadCMDFilter - Load filter configuration from file

MCP.SaveCMDFilter - Save filter configuration to file

 

Window & Input Commands:

MCP.Show - Control MCP server window visibility

MCP.WriteKB - Write text to keyboard buffer

 

SLL Implementation

 

The Status & Configuration commands are implemented in the core MCP server files:

 

GetStatus, GetStatusByte - Server state monitoring functions

GetFeature, SetFeature - Feature capability management

CMDFilter operations - Get, Set, Load, Save filter configurations

Show - Window visibility control

WriteKB - Keyboard buffer write operations

 

Feature Capabilities

 

MCP features that can be queried and controlled include:

MEMORY - Memory Bank storage operations

SCREENSHOT - Screen capture functionality

CLIPBOARD - Clipboard access operations

FILE - File system operations

REGISTRY - Windows Registry access

PROCESS - Process management

WINDOW - Window manipulation

NETWORK - Network operations

SYSTEM - System-level operations

 

Command Filtering

 

Command filtering allows you to control which commands are permitted or blocked based on patterns. Filter types include:

 

INCLUDE - Whitelist: only matching commands are allowed

EXCLUDE - Blacklist: matching commands are blocked

REGEX - Regular expression pattern matching

PREFIX - Match commands by prefix (e.g., REG., MEM., SYS.)

 

Actions can be ALLOW or DENY. Filters are processed in order, with the first matching filter determining the action. Use DEFAULT as the pattern to specify the default action for unmatched commands.

 

Status Monitoring

 

Two approaches are available for status monitoring:

 

Detailed Status (MCP.GetStatus):

• Returns comprehensive status information as formatted text

• Includes server state, feature set, port, version, and errors

• Ideal for logging, debugging, and user display

 

Compact Status (MCP.GetStatusByte):

• Returns status as a numeric byte value (0-255)

• Each bit represents a specific status flag

• Bit 0: Server running, Bit 1: Feature available, Bit 2: Error state, Bit 3: Busy

• More efficient for conditional logic and quick checks

 

Example Usage

 

' Check server status

MCP.GetStatus|$$Status

PRT.Server status: $$Status

 

' Check if memory feature is available

MCP.GetFeature|MEMORY|$$MemStatus

IVV.$$MemStatus!ENABLED

PRT.Memory feature not enabled

EIF.

 

' Set up command filtering for security

MCP.SetCMDFilter|PREFIX|REG.|DENY

MCP.SetCMDFilter|PREFIX|SYS.|DENY

MCP.SaveCMDFilter|C:\MCP\SecureFilter.cfg

 

' Show MCP window

MCP.Show|SHOW

 

Important Notes

 

• Feature states set via MCP.SetFeature are temporary and reset on server restart

• Command filters persist until cleared or the server restarts

• Use MCP.SaveCMDFilter and MCP.LoadCMDFilter to persist filter configurations

• Some critical features may not be disableable for system stability

• Window operations may not work if the server is running in headless/service mode

• MCP.WriteKB sends keystrokes to the active window; ensure correct focus before using

 

See also:

 

MCP Memory Bank - Overview

MCP.GetStatus - Get Server Status

MCP.SetFeature - Set Feature State

MCP.SetCMDFilter - Set Command Filter