Transform natural language into production-ready Robot Framework tests using AI agents and MCP protocol.
RobotMCP is a comprehensive Model Context Protocol (MCP) server that bridges the gap between human language and Robot Framework automation. It enables AI agents to understand test intentions, execute steps interactively, and generate complete test suites from successful executions.
Intro
RobotMCP_anouncement.mp4
Setup
rf-mcp_setup.mp4
Debug Bridge
rf-mcp_debug.mp4
pip install rf-mcp{
"servers": {
"robotmcp": {
"type": "stdio",
"command": "uv",
"args": ["run", "robotmcp.server"]
}
}
}Start the MCP server with HTTP transport:
uv run robotmcp.server --transport http --host 127.0.0.1 --port 8000Then configure your AI agent:
{
"servers": {
"robotmcp": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}Use #robotmcp to create a TestSuite and execute it step wise.
Create a test for https://www.saucedemo.com/ that:
- Logs in to https://www.saucedemo.com/ with valid credentials
- Adds two items to cart
- Completes checkout process
- Verifies success message
Use Selenium Library.
Execute the test suite stepwise and build the final version afterwards.
That's it! RobotMCP will guide the AI through the entire testing workflow.
- Python 3.10+
- Robot Framework 7.0+
rf-mcp comes with minimal dependencies by default. To use specific libraries (e.g., Browser, Selenium, Appium), install the corresponding extras or libraries separately.
# Install with uv pip wrapper
uv venv # create a virtual environment
uv pip install rf-mcp
# Feature bundles (install what you need)
uv pip install rf-mcp[web] # Browser Library + SeleniumLibrary
uv pip install rf-mcp[mobile] # AppiumLibrary
uv pip install rf-mcp[api] # RequestsLibrary
uv pip install rf-mcp[database] # DatabaseLibrary
uv pip install rf-mcp[frontend] # Django-based web frontend dashboard
pip install rf-mcp[all] # All optional Robot Framework libraries
# Alternatively, add to an existing uv project
uv init
# Add rf-mcp to project dependencies and sync
uv add rf-mcp[all]
uv sync
# Browser Library still needs Playwright browsers
uv run rfbrowser init# Install RobotMCP core (minimal dependencies)
pip install rf-mcp
# Feature bundles (install what you need)
pip install rf-mcp[web] # Browser Library + SeleniumLibrary
pip install rf-mcp[mobile] # AppiumLibrary
pip install rf-mcp[api] # RequestsLibrary
pip install rf-mcp[database] # DatabaseLibrary
pip install rf-mcp[frontend] # Django-based web frontend dashboard
pip install rf-mcp[all] # All optional Robot Framework libraries
# Browser Library still needs Playwright browsers
rfbrowser init
# or
python -m Browser.entry installPrefer installing individual Robot Framework libraries instead?
Just install rf-mcp and add your desired libraries manually.
# Clone repository
git clone https://github.com/manykarim/rf-mcp.git
cd rf-mcp
# Install with uv (recommended)
uv sync
# Include optional extras & dev tooling
uv sync --all-extras --dev
# Or with pip
pip install -e .RobotMCP provides pre-built Docker images for both headless and VNC-enabled environments.
# Pull from GitHub Container Registry
docker pull ghcr.io/manykarim/rf-mcp:latest
# Run with HTTP transport and frontend
docker run -p 8000:8000 -p 8001:8001 ghcr.io/manykarim/rf-mcp:latest
# Or run interactively with STDIO
docker run -it --rm ghcr.io/manykarim/rf-mcp:latest uv run robotmcpIncluded browsers: Chromium, Firefox ESR, Playwright browsers (Chromium, Firefox, WebKit)
The VNC image includes a full X11 desktop accessible via VNC or noVNC web interface:
# Pull VNC image
docker pull ghcr.io/manykarim/rf-mcp-vnc:latest
# Run with all ports exposed
docker run -p 8000:8000 -p 8001:8001 -p 5900:5900 -p 6080:6080 ghcr.io/manykarim/rf-mcp-vnc:latestAccess points:
| Port | Service |
|---|---|
| 8000 | MCP HTTP transport |
| 8001 | Frontend dashboard |
| 5900 | VNC (use any VNC client) |
| 6080 | noVNC web interface (http://localhost:6080/vnc.html) |
# Build headless image
docker build -f docker/Dockerfile -t robotmcp .
# Build VNC image
docker build -f docker/Dockerfile.vnc -t robotmcp-vnc .STDIO mode:
{
"servers": {
"robotmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/manykarim/rf-mcp:latest", "uv", "run", "robotmcp"]
}
}
}HTTP mode (start container first, then connect):
{
"servers": {
"robotmcp": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}- Browser Library: run
rfbrowser init(downloads Playwright and browsers)
If you are using a virtual environment (venv) for your project, I recommend to install the rf-mcp package within the same venv.
Extend RobotMCP with custom libraries via the plugin system. Two discovery modes are available:
- Entry points (
robotmcp.library_plugins) for packaged plugins. - Manifest files (JSON) under
.robotmcp/plugins/for workspace overrides.
See the Library Plugin Authoring Guide for detailed instructions and explore the sample plugin in examples/plugins/sample_plugin to get started quickly.
When starting the MCP server, make sure to use the Python interpreter from that venv.
RobotMCP ships with an optional Django-based dashboard that mirrors active sessions, keywords, and tool activity.
- Install frontend extras
pip install rf-mcp[frontend]
- Start the MCP server with the frontend enabled
uv run robotmcp.server --with-frontend
- Default URL: http://127.0.0.1:8001/
- Quick toggles:
--frontend-host,--frontend-port,--frontend-base-path - Environment equivalents:
ROBOTMCP_ENABLE_FRONTEND=1,ROBOTMCP_FRONTEND_HOST,ROBOTMCP_FRONTEND_PORT,ROBOTMCP_FRONTEND_BASE_PATH,ROBOTMCP_FRONTEND_DEBUG
- Connect your MCP client (Cline, Claude Desktop, etc.) to the same server processβthe dashboard automatically streams events once the session is active.
To disable the dashboard for a given run, either omit the flag or pass --without-frontend.
.vscode/mcp.json
STDIO with uv
Using UV
{
"servers": {
"robotmcp": {
"type": "stdio",
"command": "uv",
"args": ["run", "robotmcp.server"]
}
}
}STDIO with python
{
"servers": {
"robotmcp": {
"type": "stdio",
"command": "python",
"args": ["-m", "robotmcp.server"]
}
}
}Hint: If you set up a virtual environment, make sure to also use the python executable from that venv to start the server.
Using Docker
{
"servers": {
"robotmcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/manykarim/rf-mcp:latest", "uv", "run", "robotmcp"]
}
}
}HTTP mode
{
"servers": {
"robotmcp": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}RobotMCP works with any MCP-compatible AI agent. Use the stdio configuration above.
RobotMCP ships with robotmcp.attach.McpAttach, a lightweight Robot Framework library that exposes the live ExecutionContext over a localhost HTTP bridge. When you debug a suite from VS Code (RobotCode) or another IDE, the bridge lets RobotMCP reuse the in-process variables, imports, and keyword search order instead of creating a separate context.
Example configuration with passed environment variables for Debug Bridge
{
"servers": {
"RobotMCP": {
"type": "stdio",
"command": "uv",
"args": ["run", "src/robotmcp/server.py"],
"env": {
"ROBOTMCP_ATTACH_HOST": "127.0.0.1",
"ROBOTMCP_ATTACH_PORT": "7317",
"ROBOTMCP_ATTACH_TOKEN": "change-me",
"ROBOTMCP_ATTACH_DEFAULT": "auto"
}
}
}
}{
"servers": {
"RobotMCP": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/manykarim/rf-mcp:latest", "uv", "run", "robotmcp"],
"env": {
"ROBOTMCP_ATTACH_HOST": "127.0.0.1",
"ROBOTMCP_ATTACH_PORT": "7317",
"ROBOTMCP_ATTACH_TOKEN": "change-me",
"ROBOTMCP_ATTACH_DEFAULT": "auto"
}
}
}
}Import the library and start the serve loop inside the suite that you are debugging:
*** Settings ***
Library robotmcp.attach.McpAttach token=${DEBUG_TOKEN}
*** Variables ***
${DEBUG_TOKEN} change-me
*** Test Cases ***
Serve From Debugger
MCP Serve port=7317 token=${DEBUG_TOKEN} mode=blocking poll_ms=100
[Teardown] MCP StopMCP Serve port=7317 token=${TOKEN} mode=blocking|step poll_ms=100β starts the HTTP server (if not running) and processes bridge commands. Usemode=stepduring keyword body execution to process exactly one queued request.MCP Stopβ signals the serve loop to exit (used from the suite or remotely via RobotMCPattach_stop_bridge).MCP Process Onceβ processes a single pending request and returns immediately; useful when the suite polls between test actions.MCP Startβ alias forMCP Servefor backwards compatibility.
The bridge binds to 127.0.0.1 by default and expects clients to send the shared token in the X-MCP-Token header.
Start robotmcp.server with attach routing by providing the bridge connection details via environment variables (token must match the suite):
export ROBOTMCP_ATTACH_HOST=127.0.0.1
export ROBOTMCP_ATTACH_PORT=7317 # optional, defaults to 7317
export ROBOTMCP_ATTACH_TOKEN=change-me # optional, defaults to 'change-me'
export ROBOTMCP_ATTACH_DEFAULT=auto # auto|force|off (auto routes when reachable)
export ROBOTMCP_ATTACH_STRICT=0 # set to 1/true to fail when bridge is unreachable
uv run python -m robotmcp.serverWhen ROBOTMCP_ATTACH_HOST is set, execute_step(..., use_context=true) and other context-aware tools first try to run inside the live debug session. Use the new MCP tools to manage the bridge from any agent:
attach_statusβ reports configuration, reachability, and diagnostics from the bridge (/diagnostics).attach_stop_bridgeβ sends a/stopcommand, which in turn triggersMCP Stopin the debugged suite.
Prompt:
Use RobotMCP to create a TestSuite and execute it step wise.
Create a test for https://www.saucedemo.com/ that:
- Logs in to https://www.saucedemo.com/ with valid credentials
- Adds two items to cart
- Completes checkout process
- Verifies success message
Use Selenium Library.
Execute the test suite stepwise and build the final version afterwards.
Result: Complete Robot Framework test suite with proper locators, assertions, and structure.
Prompt:
Use RobotMCP to create a TestSuite and execute it step wise.
It shall:
- Launch app from tests/appium/SauceLabs.apk
- Perform login flow
- Add products to cart
- Complete purchase
Appium server is running at http://localhost:4723
Execute the test suite stepwise and build the final version afterwards.
Result: Mobile test suite with AppiumLibrary keywords and device capabilities.
Prompt:
Read the Restful Booker API documentation at https://restful-booker.herokuapp.com.
Use RobotMCP to create a TestSuite and execute it step wise.
It shall:
- Create a new booking
- Authenticate as admin
- Update the booking
- Delete the booking
- Verify each response
Execute the test suite stepwise and build the final version afterwards.
Result: API test suite using RequestsLibrary with proper error handling.
Prompt:
Create a xml file with books and authors.
Use RobotMCP to create a TestSuite and execute it step wise.
It shall:
- Parse XML structure
- Validate specific nodes and attributes
- Assert content values
- Check XML schema compliance
Execute the test suite stepwise and build the final version afterwards.
Result: XML processing test using Robot Framework's XML library.
RobotMCP provides a comprehensive toolset organized by function. Highlights:
analyze_scenarioβ Convert natural language to structured test intent and spawn sessions.recommend_librariesβ Suggest libraries (mode="direct","sampling_prompt", or"merge_samples").manage_library_pluginsβ List, reload, or diagnose library plugins from a single endpoint.
manage_sessionβ Initialize sessions, import resources/libraries, or set variables viaaction.execute_stepβ Execute keywords ormode="evaluate"expressions with optionalassign_to.execute_flowβ Buildif/for_each/trycontrol structures using RF context-first execution.
find_keywordsβ Unified keyword discovery (semantic, pattern, catalog, or session scopes).get_keyword_infoβ Retrieve keyword/library documentation or parse argument signatures (mode="keyword"|"library"|"session"|"parse").
get_session_stateβ Aggregate session insight (summary,variables,page_source,application_state,validation,libraries,rf_context).check_library_availabilityβ Verify availability/install guidance for specific libraries (always includessuccess).set_library_search_orderβ Control keyword resolution precedence.manage_attachβ Inspect or stop the attach bridge.
build_test_suiteβ Generate Robot Framework test files from validated steps.run_test_suiteβ Validate (mode="dry") or execute (mode="full") suites.
get_locator_guidanceβ Consolidated Browser/Selenium/Appium selector guidance with structured output.
We welcome contributions! Here's how to get started:
- Fork the repository
- Clone your fork locally
- Install development dependencies:
uv sync - Create a feature branch
- Add comprehensive tests for new functionality
- Run tests:
uv run pytest tests/ - Submit a pull request
Apache 2.0 License - see LICENSE file for details.
β Star us on GitHub if RobotMCP helps your test automation journey!
Made with β€οΈ for the Robot Framework and AI automation community.
