Introduction & Quick Start
Relevant source files
The following files were used as context for generating this wiki page:
Agent Studio MCP Engine is a cross-platform command-center for managing Large Language Model (LLM) stacks, integrating local providers like Ollama and LM Studio with remote services such as OpenAI and Google Gemini. The application employs the Model Context Protocol (MCP) to connect client LLMs with local machine context, including filesystems and web search indexes.
The system features a workspace environment that includes a Prompt Studio for behavior customization, a Filesystem Explorer for sandbox interactions, and a Sync Cluster for secure cross-device state synchronization. Users interact with the engine via a React-based interface supported by a Tauri-based desktop runtime or a Capacitor-based mobile wrapper.
Sources: src/data.ts:167-185, BUILDING.md:1-12
Platform Architecture
The application supports desktop (Windows, macOS), mobile (Android, iOS), and web targets. It uses Vite for the frontend build process and integrates native functionalities through Tauri or Capacitor depending on the target platform.
| Platform | Tooling | Output Format |
|---|---|---|
| Windows | Tauri v2 | .msi / .exe |
| macOS | Tauri v2 | .dmg / .app |
| Android | Capacitor v7 + Android Studio | .apk / .aab |
| iOS | Capacitor v7 + Xcode | .ipa |
Sources: BUILDING.md:3-12, package.json:7-21
Build & Development Workflow
To initialize the project and start development:
- Install dependencies:
npm install - Build web assets:
npm run build - Launch desktop dev environment:
npm run tauri:dev - Sync mobile assets:
npm run cap:sync
Sources: BUILDING.md:36-41, package.json:17-21
LLM Integration & AI Logic
The core AI logic manages connections between the user interface and various LLM providers. It implements a fallback mechanism that utilizes a high-fidelity workspace simulator if local or remote endpoints are offline.
The dispatcher handles model selection, temperature profiles, and context token limits for each session.
Sources: src/utils/ai.ts:7-68, src/data.ts:3-48
Supported Providers
| Provider | Type | Default Base URL |
|---|---|---|
| Ollama | Local | http://localhost:11434 |
| LM Studio | Local | http://localhost:1234/v1 |
| OpenAI | Remote | https://api.openai.com/v1 |
| Google Gemini | Remote | https://generativelanguage.googleapis.com/v1beta |
| Agent Simulator | Custom | internal://sandbox |
Sources: src/data.ts:3-48
Model Context Protocol (MCP)
MCP enables the LLM to interact with the local environment through specific tool calls. The engine pre-configures drivers for filesystem access and web search.
Filesystem MCP
Provides tools to read_filesystem_file, write_filesystem_file, and list_filesystem_dir. These tools allow the model to enumerate workspace contents and modify files directly within the local container.
Sources: src/data.ts:80-116, src/utils/ai.ts:82-108
Web Browser MCP
Integrates Brave Search and document scraping. It allows models to query live search indexes via query_web_search and parse URLs using scrape_documentation.
Sources: src/data.ts:117-142, src/utils/ai.ts:109-130
Workspace Features
Chat & Autocomplete
The chat interface supports command-based triggers to inject context or change behaviors:
/triggers Prompt Presets (e.g.,/Code,/Debug).@triggers File Attachments from the virtual filesystem.#triggers MCP Tool invocations.
Sources: src/components/ChatArea.tsx:90-136
Sandbox Skills
The engine includes specialized renderers (Skills) that intercept code blocks in assistant responses to provide visual outputs.
| Skill | Purpose | Trigger |
|---|---|---|
| Visual SVG Sandbox | Renders vector graphics | <svg> blocks |
| LaTeX Typesetter | Formats math equations | $$ math blocks |
| JS / Python Runner | Executes scripts | Code blocks with solve_matrix_relation |
Sources: src/components/ChatArea.tsx:50-80, src/data.ts:175-201
Cloud Sync Cluster
The Sync Cluster manages cross-device state using symmetric encryption. It uses 256-bit PBKDF2 for passphrase hashing and AES-256-GCM for payload encryption.
Quick Start Configuration
To enable local LLM access within the browser-based UI, you must configure CORS headers. For Ollama, execute the following command:
OLLAMA_ORIGINS="*" ollama start
Sources: src/data.ts:216-218, src/utils/ai.ts:40-42
Agent Studio MCP Engine centralizes LLM management by bridging local machine capabilities with advanced model behaviors through MCP and specialized sandbox tools.