loki-auto MCP Server
Provides browser automation capabilities for Firefox through a browser extension, enabling tab management and DOM interaction via Rhai sandboxed scripts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@loki-auto MCP ServerList my open browser tabs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
loki-auto
loki-auto is an ultra-lightweight, zero-dependency "Serverless in Browser" web automation runtime designed for the AI Agent era. It executes episodic, transient LLM tool actions inside a secure Rhai VM (compiled to WebAssembly) sandbox container directly within the browser's foreground page context, completely bypassing heavy headless browser resource overhead.
Available on the Chrome Web Store.
š Architecture
loki-auto uses a stateless, event-driven Oneshot CGI paradigm:
graph TD
A[LLM Agent / Orchestrator] <-->|MCP Protocol over Stdio| B[Axum MCP Server Host]
B <-->|WebSocket ws://127.0.0.1:10402| C[Browser Extension BG Script]
C <-->|chrome.runtime Messages| D[Active Tab Content Script]
D -->|Instantiates On-Demand| E[Rhai WASM VM Sandbox]
E -->|Synchronous DOM interactions| F[Page DOM]Layer 1: Host Environment ā Rust Axum MCP server handling Model Context Protocol (MCP) tool bindings and bridging commands over local WebSockets.
Layer 2: Browser Background ā Extension background script managing tab states and routing target instructions.
Layer 3: Browser Sandbox ā The content script instantiates a lightweight WASM-compiled Rhai VM per prompt invocation, executes DOM operations, captures results/logs, and purges the VM from memory instantly.
Related MCP server: WebControl
š Getting Started
1. Install the Browser Extension
Chrome: Install directly from the Chrome Web Store.
Firefox: Build from source and load manually (see Build from Source below).
2. Launch the Local MCP Server
Start the Axum host to begin listening for browser connections and LLM tool calls.
You can download the pre-compiled loki-mcp-server binary for your platform from GitHub Releases and run it directly, or run it from source:
# Start the MCP host from source (default port: 10402)
cargo run --bin loki-mcp-serverBuild from Source (Development / Firefox)
1. Prerequisites
Ensure you have the following installed on your system:
Bun (Workspace package manager)
Rust & Cargo (with
wasm32-unknown-unknowntarget installed:rustup target add wasm32-unknown-unknown)wasm-pack (for Rust-to-WASM compilation)
2. Compilation and Build
Build the WebAssembly sandbox first, and then compile the extension assets:
# 1. Compile Rust Sandbox to WebAssembly
cd packages/sandbox
wasm-pack build --target web
# 2. Return to root, install dependencies and compile the Chrome/Firefox extensions
cd ../..
bun install
bun run buildThis will output two fully-compiled, self-contained extension directories under the root folder:
Chrome (Manifest V3):
./dist/chromeFirefox (Manifest V2):
./dist/firefox
3. Load the Browser Extension Manually
Firefox: Open
about:debugging#/runtime/this-firefox, click "Load Temporary Add-on...", and select the compiled packageloki-auto.xpiat the root of the project (or select./dist/firefox/manifest.json).Chrome: Open
chrome://extensions/, enable Developer mode, click "Load unpacked", and select the./dist/chromefolder.
š MCP Tool Specifications
loki-auto exposes standard Model Context Protocol (MCP) tools:
list_tabs- Lists all open browser tabs and their focused states.open_tab(url, active)- Opens a new tab with the specified URL.close_tab(tab_id)- Closes a target tab by ID.activate_tab(tab_id)- Focuses a browser tab to the foreground.execute_loki_oneshot(target_tab_id, target_url_pattern, rhai_script, payload)- Runs a Rhai automation script synchronously inside the sandboxed VM of the target tab.
š Rhai Sandbox DOM APIs
Scripts running inside the WASM sandbox have access to the following synchronous DOM hooks:
sleep(ms)- Suspends execution for the specified milliseconds.log(message)- Prints a message/object to the execution console logs.dom_to_string() -> String- Returns a cleaned, token-optimized (AEO-optimized) HTML tree of the current page.element_exists(selector) -> bool- Immediate check if a element matches the CSS selector.wait_element(selector, [timeout_ms]) -> bool- Blocks until the element is present, or throws a timeout exception.click(selector, [timeout_ms]) -> bool- Wait and click on the selected element.type_text(selector, text, [timeout_ms]) -> bool- Wait and instantly set text into an input or textarea, triggering input events (recommended for long texts/articles).type_as_human(selector, text, [timeout_ms]) -> bool- Wait and type text character-by-character with randomized human typing delays and standard keydown/keyup events (recommended for search boxes and login inputs).get_text(selector, [timeout_ms]) -> String- Extract inner text content.get_value(selector, [timeout_ms]) -> String- Extract form input value.get_attribute(selector, attr, [timeout_ms]) -> String- Extract specific attribute value.scroll_to(selector, [timeout_ms]) -> bool- Scroll the viewport smoothly to the targeted element.get_loki_data(dom_selector, [timeout_ms]) -> String- Scopes target DOM and extracts child nodes bearingdata-lokiattributes in a clean, Markdown-friendly format.
The[timeout_ms] parameter in DOM APIs (e.g., click, type_text, type_as_human) specifies the maximum wait time for the target element to appear in the DOM before throwing a TimeoutError (defaults to 5000 ms). For type_as_human, this is the element detection limit and does not restrict the typing execution time itself (which runs asynchronously and is only limited by the global 45-second MCP oneshot task timeout).
Example Rhai Script
print("Interacting with search input...");
if wait_element("textarea[name='q']", 2000) {
type_text("textarea[name='q']", "weather in Boston today");
sleep(500);
click("input[name='btnK']");
}š” Security and Isolation
Strict Sandbox: The Rhai runtime inside WebAssembly has no access to standard JS APIs, cookies, localStorage, or system files unless explicitly exposed through bridge bindings.
No Network Access: The sandbox cannot perform
fetchor AJAX requests. All actions occur inside the page context, and results are returned via the secure extension channel.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables real browser automation as tools in Cursor, Claude Desktop, Windsurf, and any MCP-compatible client, allowing AI agents to interact with web pages through natural language.Last updated36MIT
- Flicense-qualityCmaintenanceHeadless browser automation for LLM agents via REST API or MCP tools. Enables navigating pages, reading structured content, clicking elements, filling forms, and executing JavaScript.Last updated
- AlicenseBqualityCmaintenanceProvides undetectable browser automation for LLM agents via MCP, enabling real Chrome interaction with stealth features, DOM accessibility, and DevTools integration.Last updated983MIT
- Flicense-qualityCmaintenanceEnables browser automation through the MCP protocol, allowing AI agents to control a real browser using accessibility snapshots and natural language commands.Last updated
Related MCP Connectors
Live browser debugging for AI assistants ā DOM, console, network via MCP.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iā¦
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/loki4agent/loki-auto'
If you have feedback or need assistance with the MCP directory API, please join our Discord server