… Getting Started … Development Workflow … Testing … Troubleshooting …
Version: 1.4
Last Updated: February 2026
Target Audience: Developers, DevOps Engineers, System Architects
- Introduction
- System Overview
- Prerequisites
- Container Details
- MCP Architecture Pattern
- MCP Tools Available
- Network & Volume Architecture
- Data Flow
- Configuration
- Troubleshooting
- Development Workflow
- Backup and Recovery
- Related Documentation
This document describes the baseline environment architecture used for Robot Framework test generation by multiple AI agents. It includes a containerized FastAPI application and MCP-powered testing/documentation services. The application is intentionally stable and not modified during test generation.
- Books Database Service: RESTful API and web UI for managing a books catalog
- Automated Testing: Robot Framework test execution via MCP protocol
- Documentation Access: Real-time keyword documentation through MCP tools
- Development Environment: Fully containerized setup with automatic initialization
- FastAPI - Modern Python web framework
- SQLite - Lightweight database for book storage
- Docker Compose - Container orchestration
- Robot Framework 7.4.1 - Test automation framework
- MCP (Model Context Protocol) - AI-tool integration protocol for test execution
- Playwright/Browser Library - Web automation for UI testing
┌───────────────────────────────────────────────────────────────────────┐
│ HOST MACHINE (macOS/Linux/Windows) │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────────────┐ │
│ │ ./data │ │ ./robot_tests│ │ ./robot_results │ │
│ │ (SQLite DB) │ │ (Test Suites)│ │ (Test Reports) │ │
│ └──────┬───────┘ └──────┬───────┘ └─────┬─────────────┘ │
│ │ │ (ro) │ (rw) │
│ ┌──────┼──────────────────┼────────────────┼──────────────┐ │
│ │ │ books-service-network (bridge) │ │ │
│ │ ┌───▼────────┐ ┌──────▼─────────┐ ┌───▼───────────┐ │ │
│ │ │ books- │ │ initialization │ │ robotframework│ │ │
│ │ │ service │ │ (Init Script) │ │ -mcp │ │ │
│ │ │ (FastAPI) │ │ Run once │ │ (Test Env) │ │ │
│ │ │ Port: 8000 │ │ restart: │ │ shm_size: 2gb │ │ │
│ │ │ Healthcheck│ │ on-failure │ │ │ │ │
│ │ └────────────┘ └────────────────┘ └───────────────┘ │ │
│ │ │ │ │ │
│ │ │ ┌─────────▼────────┐ │ │
│ │ │ │ rf-docs-mcp │ │ │
│ │ │ │ (Documentation) │ │ │
│ │ │ │ RF 7.4.1 Docs │ │ │
│ │ │ │ 321 Keywords │ │ │
│ │ │ └──────────────────┘ │ │
│ └───────┼─────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────▼────────┐ │
│ │localhost:8000│ ← Browser Access │
│ └──────────────┘ │
└───────────────────────────────────────────────────────────────────────┘
| Software | Minimum Version | Purpose |
|---|---|---|
| Docker | 20.10+ | Container runtime |
| Docker Compose | 2.0+ | Multi-container orchestration |
| Git | 2.0+ | Source code management |
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Disk Space | 5 GB | 10+ GB |
| OS | macOS 10.15+, Linux (kernel 3.10+), Windows 10+ with WSL2 | Latest stable |
- Port 8000 available on host machine
- Internet access for initial Docker image pulls
- Docker command permissions (Linux: add user to
dockergroup) - Write access to project directory for volume mounts
- Image: Built from
./Dockerfile - Purpose: FastAPI REST API serving books database
- Port:
8000:8000(exposed to host) - Healthcheck: HTTP GET to
/books/every 30s - Restart Policy: unless-stopped
- Access:
- From host:
http://localhost:8000 - From containers:
http://books-service:8000
- From host:
- Image: Same as books-service
- Purpose: One-time database initialization
- Lifecycle: Runs once, restarts on-failure until successful, then stops
- Tasks:
- Create database directory
- Create SQLAlchemy tables
- Run migrations (
scripts/migrate_db.py) - Generate 100 sample books if database is empty
- Image: Built from
./RobotFramework-MCP-server/Dockerfile - Purpose: On-demand Robot Framework test execution environment
- Shared Memory: 2GB (for Chromium/Playwright)
- Lifecycle: Persistent container (uses
tail -f /dev/nullto stay alive)- MCP server invoked on-demand via
docker exec -i robotframework-mcp python /app/server.py - Each request spawns server, processes request, then exits
- MCP server invoked on-demand via
- Tools Installed:
- Robot Framework 7.4.1
- Browser Library 19.12.3 (Playwright)
- RequestsLibrary 0.9.7
- Robocop 7.2.0 (static analyzer)
- MCP Python SDK (FastMCP)
- User: Non-root (
appuser, UID 10001)
- Image: Built from
./RobotFramework-MCP-server/Dockerfile.docs - Purpose: On-demand Robot Framework documentation query environment
- Lifecycle: Persistent container invoked via
docker exec -i rf-docs-mcp python /app/rf_docs_server.py - Data: 321 keywords from 9 libraries (RF 7.4.1), pre-generated JSON documentation
This system uses an on-demand MCP execution pattern:
Protocol Stack:
Application Protocol: MCP (Model Context Protocol)
Message Format: JSON-RPC 2.0
Transport: stdin/stdout (via docker exec)
How It Works:
- Containers stay alive as ready-to-use execution environments
- No persistent MCP server processes running inside containers
- MCP clients invoke servers on-demand:
docker exec -i <container> python /app/<server>.py - Server spawns, processes one MCP request, then exits
- Communication uses MCP protocol with JSON-RPC 2.0 message encoding over stdin/stdout
- Resources are minimal when idle (just the
tailprocess)
Benefits:
- No port management or network complexity
- No resource consumption when idle
- Clean isolation via Docker
- Easy debugging (containers stay alive for inspection)
- Stateless execution
Communication Flow:
IDE (MCP Client)
→ docker exec -i robotframework-mcp python /app/server.py
→ MCP server spawns
→ Reads MCP request from stdin (JSON-RPC 2.0 format)
→ Executes tests
→ Returns MCP response to stdout (JSON-RPC 2.0 format)
→ MCP server exits
→ IDE displays results
| Tool | Description | Parameters | Returns |
|---|---|---|---|
run_suite() |
Execute entire test suite or folder | suite_path, include_tags, exclude_tags, variables |
Test results, artifact paths |
run_test_by_name() |
Execute specific test by name | test_name, suite_path, variables |
Test results, artifact paths |
list_tests() |
List all test cases in suite | suite_path |
Array of test names |
run_robocop_audit() |
Static code analysis with Robocop | target_path, report_format |
Audit results, report path |
Usage Example:
{
"method": "run_suite",
"params": {
"suite_path": "/tests/books_api.robot",
"include_tags": "smoke"
}
}| Tool | Description | Parameters | Returns |
|---|---|---|---|
robot-get_keyword_documentation |
Get detailed keyword docs | keyword_name, library_name |
Signature, args, description, examples |
robot-get_library_documentation |
Get full library docs | library_name |
All keywords, initialization params |
robot-get_file_imports |
Analyze test file imports | file_path |
List of imported libraries/resources |
robot-get_environment_details |
Get RF environment info | - | Versions, Python path, tools |
| ...and 6 more tools | - | - | - |
┌─────────────────────────────────────────────────┐
│ books-service-network (bridge) │
│ │
│ books-service:8000 ←─── robotframework-mcp │
│ ▲ │ │
│ │ ▼ │
│ initialization rf-docs-mcp │
└─────────────────────┬───────────────────────────┘
│ Port 8000
▼
localhost:8000 (Host)
HOST FILESYSTEM CONTAINER PATHS
───────────────── ───────────────
./data/ ──→ /app/data (books-service, initialization)
└── books.db (SQLite)
./robot_tests/ ──→ /tests (robotframework-mcp, read-only)
./robot_results/ ──→ /results (robotframework-mcp, read-write)
├── log.html
├── report.html
└── output.xml
Docker Named Volumes:
rf_docs_cache ──→ /cache (rf-docs-mcp)
initialization → depends_on: books-service
robotframework-mcp → depends_on: books-service
rf-docs-mcp → (no dependencies, standalone)
| Service | Internal Port | External Port | Access Method | CPU | Memory | SHM |
|---|---|---|---|---|---|---|
| books-service | 8000 | 8000 | localhost:8000 (host browser) | Low | ~100MB | Default |
| robotframework-mcp | - | - | docker exec -i + stdin/stdout |
Medium | ~500MB | 2GB |
| rf-docs-mcp | - | - | docker exec -i + stdin/stdout |
Low | ~50MB | Default |
| initialization | - | - | Ephemeral (auto-stops after init) | Low | ~100MB | Default |
┌──────────────────────────────────────┐
│ HOST NETWORK (Public) │
│ Port 8000 → books-service │
│ (Only exposed port) │
└───────────────┬──────────────────────┘
│
┌───────────────▼────────────────────────┐
│ books-service-network (Isolated) │
│ (Private bridge; attachable by design)│
│ - books-service → container IP │
│ - robotframework-mcp → container IP │
│ - rf-docs-mcp → container IP │
│ No external access to test services │
└────────────────────────────────────────┘
MCP Security:
- MCP servers run inside isolated Docker containers
- Communication requires Docker socket access (
docker exec) - No network exposure for MCP services
- The bridge is private from the host/Internet; additional containers (e.g., an IDE/Claude Code helper) can be explicitly connected to the same network for tooling, which does not change external exposure.
- Volume mounts use read-only where appropriate
- Test execution runs as non-root user
docker-compose up
→ Create network: books-service-network
→ Create volume: rf_docs_cache
→ Start books-service (FastAPI on port 8000, healthcheck begins)
→ Start initialization (creates DB, runs migrations, generates sample data)
→ Start robotframework-mcp (waits for MCP commands)
→ Start rf-docs-mcp (loads cached documentation)
IDE (MCP Client)
→ Prepares MCP request: {"method": "tools/call", "params": {"name": "run_suite", ...}}
→ Executes: docker exec -i robotframework-mcp python /app/server.py
→ Container spawns /app/server.py
→ Reads MCP request from stdin (JSON-RPC 2.0 format)
→ Executes robot command
→ Loads tests from /tests
→ Runs tests against http://books-service:8000
→ Generates reports in /results
→ Returns MCP response to stdout (JSON-RPC 2.0 format)
→ Process exits
→ IDE receives results, reports available in ./robot_results/
Robot Test (Browser Library)
→ GET http://books-service:8000/
→ FastAPI serves static/index.html
→ JavaScript fetches: GET http://books-service:8000/books/
→ books-service queries SQLite (/app/data/books.db)
→ Returns JSON response
→ JavaScript renders book cards
books-service:
DATABASE_URL=sqlite:///data/books.dbrobotframework-mcp:
ROBOT_OUTPUT_DIR=/results
RF_TESTS_DIR=/tests
BROWSER=chromium
HEADLESS=true
PLAYWRIGHT_BROWSERS_PATH=/ms-playwrightrf-docs-mcp:
RF_DOCS_CACHE=/cacheGenerated by ./quick-start.sh (or ./RobotFramework-MCP-server/create-mcp-config.sh:)
| IDE | Configuration File | Generator Command |
|---|---|---|
| Claude Code | .claude.json |
create-mcp-config.sh claude-code |
| VS Code (Copilot) | .vscode/mcp.json |
create-mcp-config.sh vscode |
| GitLab Duo | .gitlab/duo/mcp.json |
create-mcp-config.sh gitlab |
| Amazon Q | .amazonq/default.json |
create-mcp-config.sh amazonq |
Example .claude.json:
{
"mcpServers": {
"RobotFramework": {
"command": "/usr/bin/docker",
"args": ["exec", "-i", "robotframework-mcp", "python", "/app/server.py"],
"timeout": 60000
},
"rf-docs": {
"command": "/usr/bin/docker",
"args": ["exec", "-i", "rf-docs-mcp", "python", "/app/rf_docs_server.py"],
"timeout": 60000
}
}
}- Root README - Project overview and quick start
- Getting Started - Environment setup
MCP:
Robot Framework:
Docker & FastAPI:
Glossary:
| Term | Definition |
|---|---|
| MCP | Model Context Protocol - Application protocol for connecting AI assistants to external tools and data sources |
| JSON-RPC 2.0 | Message format used by MCP for encoding requests/responses (not the protocol itself) |
| FastMCP | Python SDK for implementing MCP servers using FastAPI-like patterns |
| Robot Framework | Open-source test automation framework |
| Playwright | Modern web automation library supporting Chromium, Firefox, and WebKit |
| Robocop | Static code analysis tool for Robot Framework |
| stdin/stdout | Standard input/output streams for process communication (MCP transport layer) |
| Headless Browser | Browser running without graphical interface, required in Docker environments |
| Named Volume | Docker-managed storage persisting independently of containers |
| Bind Mount | Direct mapping from host directory to container directory |
Document Revision History:
| Version | Date | Changes |
|---|---|---|
| 1.0 | Initial | Initial architecture documentation |
| 1.1 | 2026-01-22 | Added prerequisites, corrected MCP execution model, added configuration, logging, troubleshooting |
| 1.2 | 2026-01-22 | Consolidated duplicate content, improved table formatting, reduced length by ~30% |
| 1.3 | 2026-01-22 | Clarified MCP vs JSON-RPC terminology: MCP is the protocol, JSON-RPC 2.0 is the message format |
| 1.4 | 2026-02-10 | Aligned volume description with docker-compose (removed unused rf_library_docs volume) |
… Getting Started … Development Workflow … Testing … Troubleshooting …
Next: Testing