LemonMCP
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEMON_TARGET_HOST | No | Fallback target host when Bonjour discovery is unavailable or a different address is needed. | |
| LEMON_TARGET_PORT | No | Fallback target port when Bonjour discovery is unavailable or a different address is needed. | |
| LEMON_WEB_CONTROL_TOKEN | Yes | WebControl token from Lemon Remote Controller, sent as the X-Lemon-WebControl-Token request header. Required when the iOS app requires authentication. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| toggle_vpnB | Starts or stops the Lemon iOS VPN. Wait for success or error response. |
| open_web_pageA | Opens an HTTP or HTTPS URL inside the Lemon iOS app's embedded WKWebView. |
| close_web_pageB | Closes the Lemon iOS embedded WKWebView. |
| refresh_web_pageB | Reloads the current page in the Lemon iOS embedded WKWebView. |
| go_back_web_pageA | Navigates back in the Lemon iOS embedded WKWebView history. |
| go_forward_web_pageA | Navigates forward in the Lemon iOS embedded WKWebView history. |
| list_scheduled_tasksA | Lists locally stored Cron or millisecond-interval JavaScript tasks, including runtime state and next run time. |
| get_scheduled_taskB | Fetches one locally stored Cron or interval JavaScript task by id. |
| get_scheduled_task_runtime_statusB | Returns the current PacketTunnel scheduled-task runtime state without exposing script source. |
| create_scheduled_taskA | Creates a locally stored Cron or millisecond-interval JavaScript task. Use script_type=single with script for one file, or script_type=package with script_package for a validated ESM package. Packages must export onSchedule(input) from their manifest entry. Interval values must be 250..86400000 ms. It is enabled by default unless enabled=false is provided. |
| update_scheduled_taskA | Updates a locally stored Cron or millisecond-interval JavaScript task. Use script_type=single with script for one file, or script_type=package with script_package for a validated ESM package. Packages must export onSchedule(input) from their manifest entry. |
| set_scheduled_task_enabledA | Enables or disables one scheduled task. Enabling scheduled execution requires the configured schedule entitlement. |
| delete_scheduled_taskC | Deletes one locally stored scheduled task by id. |
| clear_captured_trafficA | Clears all captured HTTP traffics and body binaries from the device. |
| fetch_system_logsB | Safely reads the tail (end) of the Lemon core engine (lemoncore.log) to analyze system or runtime network errors. Suitable for large log files. |
| clear_system_logsA | Empties the Lemon core engine root logs (lemoncore.log). Useful to clean up logs before starting a fresh capture to isolate issues. |
| list_host_mappingsB | Lists the native DNS custom Host mappings currently applied by Lemon. |
| upsert_host_mappingA | Creates a native DNS Host mapping, or updates one when an existing mapping id is provided. Writes are applied immediately and do not require a second confirmation. |
| delete_host_mappingB | Deletes a native DNS custom Host mapping by UUID. The change is applied immediately without a second confirmation. |
| search_traffic_previewsC | Find HTTP traffic targeting specific keywords or hosts across recent logs. |
| get_captured_requestB | Reads one complete captured request/response by transaction_id, trace_id, or the legacy database id returned by search_traffic_previews. Body metadata distinguishes missing, empty, text, and binary-file payloads. |
| list_replay_itemsB | Lists saved HTTP replay items stored in Lemon's local runtime database. |
| get_replay_itemB | Reads one saved HTTP replay item by UUID, including its request headers and body. |
| create_replay_itemA | Saves a new HTTP replay item in Lemon's local runtime database. The item can later be executed with execute_replay_item. |
| update_replay_itemC | Updates a saved HTTP replay item without changing its execution history. |
| delete_replay_itemB | Deletes one saved HTTP replay item by UUID. |
| execute_replay_itemB | Executes one saved HTTP replay item through Lemon's native URLSession/runtime path and returns the response preview. Saved execution status is updated. |
| execute_replay_requestA | Executes a one-shot HTTP replay without saving it. Use this for a captured request after inspecting it with get_captured_request, or for an ad-hoc request. |
| fetch_binary_payloadC | Deep-dives into a specific HTTP payload by fetching its full request/response bodies. |
| execute_raw_sqlC | Executes a raw SQL diagnostic query on the Lemon SQLite database (Read-Only queries advised). |
| set_lemon_target_ipA | Manually override the target IP address of the iOS Lemon device. Use this if mDNS/Bonjour discovery fails or if the device relies on a different network IP. |
| get_lemon_target_ipB | Retrieves the current network URL/IP that the MCP is using to communicate with the iOS device. |
| fetch_device_fileA | Fetches a specific non-database file from the iOS device's AppGroup container. ESM rewrite script packages are stored in runtime.sqlite; use get_rewrite_script_package instead of looking for RewriteScripts/*.js files. |
| list_rewrite_scriptsA | Lists ESM rewrite script packages with their ids, active revisions, and enabled state. Use get_rewrite_script_package to read source modules. |
| get_rewrite_script_packageB | Fetches the complete manifest and source modules for an active or historical ESM rewrite script revision. |
| list_rewrite_script_revisionsB | Lists immutable revisions for a rewrite script package, including content hashes, byte sizes, and the active revision. |
| validate_rewrite_script_packageB | Validates an ESM rewrite package with the same iOS-side manifest, module-path, and size rules used before persistence. It does not write anything. |
| upsert_rewrite_scriptA | Creates a new ESM rewrite script package or publishes a new immutable revision. Provide manifest/modules for multi-file packages, or content as a one-file shorthand. Set reload=true to request an immediate runtime snapshot reload after persistence. |
| rollback_rewrite_scriptA | Makes an existing immutable revision the active revision for a rewrite script package. Historical revisions are retained. |
| get_rewrite_runtime_statusA | Reports whether rewrite and JavaScript execution are enabled, runtime resource limits, sync state, and script counts. |
| get_rewrite_debug_eventsA | Reads the independent structured rewrite-debug event projection. Filter by trace, rewrite phase, or severity instead of scanning generic trace events. |
| clear_rewrite_debug_eventsA | Clears structured rewrite-debug events. Provide trace_id to clear only one request; omit it only when intentionally clearing the whole debug projection. |
| reload_rewrite_runtimeA | Requests the active rewrite snapshot to reload from runtime.sqlite. This may fail when the VPN runtime is not running; persisted scripts are unaffected. |
| delete_rewrite_scriptC | Delete a rewrite script by its numeric ID. |
| list_rewrite_rulesB | Fetches all existing rewrite policies and their MatchGroups. |
| upsert_rewrite_ruleB | Add or update a rewrite policy with ordered MatchGroups. To update, ensure the rule object has an 'id'. |
| delete_rewrite_ruleC | Delete a rewrite rule by its numeric ID. |
| get_rewrite_schemaA | Returns the exact JSON schema and accepted enum values for creating or updating Rewrite Rules and Actions. |
| list_modulesB | Lists installed host-side UI Modules, active revisions, and enabled state. |
| get_module_packageA | Fetches the complete manifest and ESM sources for an active or historical Module revision. |
| list_module_revisionsB | Lists immutable Module revisions, hashes, and the active revision. |
| validate_module_packageA | Validates a Module package using the iOS validator without persisting it. |
| upsert_moduleB | Installs a new Module or publishes a new immutable revision. Optionally reloads the host runtime. |
| rollback_moduleB | Switches a Module to an immutable historical revision; history is retained. |
| toggle_moduleC | Enables or disables one installed UI Module. |
| delete_moduleB | Deletes an installed UI Module and all of its immutable revisions. |
| get_module_runtime_statusB | Reports active Module workers, leases, and runtime limits. |
| reload_module_runtimeA | Releases one Module worker or all workers so the next activation loads the active revision. |
| inspect_moduleB | Fetches the active manifest, UI schema, and ESM sources of one installed Module. |
| install_moduleC | Compatibility alias for installing or publishing a Module package. |
| set_module_enabledB | Compatibility alias for enabling or disabling one UI Module. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| hardware_status | Snapshot of real-time device health, CPU, memory, and CA certificate installation status. |
| database_schema | Lemon's native app.sqlite table definitions (to aid LLM in generating raw SQLs). |
TDQS
Scored across 61 tools
The set has clear domain boundaries overall, but several pairs overlap or act as aliases: install_module vs upsert_module, set_module_enabled vs toggle_module, execute_replay_item vs execute_replay_request, and fetch_binary_payload vs get_captured_request. Descriptions help resolve most cases, but an agent still has to choose carefully among similar-sounding operations.
Nearly all tools follow a consistent snake_case verb_noun convention, such as list_rewrite_rules, get_captured_request, and delete_scheduled_task. Minor variants like go_back_web_page and go_forward_web_page are internally consistent and do not break the pattern.
At 61 tools, the server is far beyond the recommended 3–15 range and exceeds the 50-tool threshold that indicates an extreme surface-size mismatch. Even across multiple subdomains, the count is heavy enough to overwhelm tool selection and includes compatibility aliases that further inflate the surface.
The surface covers full lifecycle operations for rewrite scripts, rewrite rules, modules, scheduled tasks, replay items, host mappings, web view navigation, traffic capture, system logs, and runtime status. CRUD, validation, execution, rollback, enable/disable, and clearing operations are broadly represented, leaving no obvious dead ends for the stated iOS-network-debugging domain.