rf-log-mcp
rf-log-mcp is an MCP server for parsing and analyzing Robot Framework test result files, providing structured views and search capabilities primarily for LLM consumption.
Parse Result Files (
parse_result): Load and index a Robot Frameworkoutput.xml(RF 6.0+/7.x) oroutput.json(RF 7.2+) file into a SQLite store, returning arun_id. Supportsforce_rebuildto re-index an already-parsed file.Get Views (
get_view): Retrieve a specific view of a parsed run byrun_idor file path. Supported views:summary– high-level overview of test run statisticsfailure_path– trace/call chain of failed test stepsstep_window– windowed detail view of test stepsSupports pagination via
cursor, a tokenbudgetlimit, and an optionalselector.
Search Messages (
search_messages): Full-text search over indexed log messages within a parsed run, filterable by loglevel(e.g., ERROR, WARN), with a configurablelimitandcursorfor pagination.Resources: Exposes MCP resources at
rf://runs/{run_id}/summaryandrf://runs/{run_id}/tests/{test_id}for direct access by MCP hosts.Customizable storage: The default SQLite database path can be overridden via the
RF_LOG_MCP_DBenvironment variable.
Provides tools for parsing and analyzing Robot Framework test result files (output.xml and output.json), enabling AI agents to retrieve test summaries, failure paths, step windows, and search through test messages.
Supports parsing and analysis of Robot Framework test results in XML format (output.xml files from Robot/Rebot 6.0.x/6.1+/7.x), providing structured data access to test execution details.
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., "@rf-log-mcpparse_result tests/output.xml"
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.
rf-log-mcp
用于检查 Robot Framework 结果文件的 MCP Server,面向 LLM 提供简洁证据视图。
功能概览
支持输入:
output.xml:Robot / Rebot 6.0.x / 6.1+ / 7.xoutput.json:Robot / Rebot 7.2+
暴露的 MCP 能力:
Tools
parse_resultget_viewsearch_messages
Resources
rf://runs/{run_id}/summaryrf://runs/{run_id}/tests/{test_id}
支持的视图:
summaryfailure_pathstep_window
通用返回字段:
run_id:整数运行编号,推荐后续调用都使用它estimated_tokens:当前返回体的估算 token 数truncated:兼容字段,只表示返回内容发生过任意截断message_truncated:长消息被缩短budget_truncated:为了满足budget限制裁剪了返回内容page_truncated:当前页后面还有更多数据next_cursor:分页游标;为空表示没有下一页
关键说明
这个项目是 MCP stdio server
正确方式是:MCP 宿主启动
rf-log-mcp进程,再通过 stdio 调用工具和资源
快速开始
1. 安装依赖
uv sync2. 推荐的 MCP 配置示例
{
"mcpServers": {
"rf-log-mcp": {
"command": "uv",
"args": [
"run",
"python",
"-m",
"rf_log_mcp"
]
}
}
}打包与安装
构建
uv build构建后生成:
dist/rf_log_mcp-0.1.0-py3-none-any.whldist/rf_log_mcp-0.1.0.tar.gz
安装 wheel
uv pip install dist/rf_log_mcp-0.1.0-py3-none-any.whl安装后可直接启动:
rf-log-mcp已安装包的 MCP 配置示例
{
"mcpServers": {
"rf-log-mcp": {
"command": "rf-log-mcp",
"args": []
}
}
}Windows 显式路径示例
{
"mcpServers": {
"rf-log-mcp": {
"command": "D:\\project\\rf_log_mcp\\.venv\\Scripts\\rf-log-mcp.exe",
"args": []
}
}
}典型调用流程
第一步:解析结果文件
parse_result(path="tests/fixtures/single_failure_611.xml")典型返回:
{
"ok": true,
"run_id": 1,
"source_format": "xml"
}第二步:获取摘要
get_view(run_id=1, view="summary")如果失败用例较多,可以指定分页大小:
get_view(run_id=1, view="summary", page_size=10)
get_view(run_id=1, view="summary", cursor="<next_cursor>", page_size=10)第三步:获取失败路径
get_view(run_id=1, view="failure_path")
get_view(run_id=1, view="failure_path", selector="s1-t2")failure_path 会从失败测试中选择更短、更关键的失败分支;当同层分支长度相同,会优先返回包含更高严重级别消息的分支。
第四步:查看步骤窗口
get_view(run_id=1, view="step_window", selector="s1-t2")step_window 的 selector 可以传测试节点,也可以传关键字/步骤节点。传步骤节点时,返回会自动定位到所属测试,并尽量把该节点放在窗口中间。
分页示例:
get_view(run_id=1, view="step_window", selector="s1-t2-k13", page_size=20)
get_view(run_id=1, view="step_window", selector="s1-t2-k13", cursor="<next_cursor>", page_size=20)第五步:检索消息
search_messages(run_id=1, query="timeout")search_messages 按普通文本匹配。%、_、\ 会作为字面量处理,不会被当成 SQL LIKE 通配符。
环境变量
RF_LOG_MCP_DB
用于覆盖默认 SQLite 数据库路径。
PowerShell 示例:
$env:RF_LOG_MCP_DB="D:\data\rf-log-mcp\store.sqlite3"
rf-log-mcpMCP 配置示例:
{
"mcpServers": {
"rf-log-mcp": {
"command": "rf-log-mcp",
"args": [],
"env": {
"RF_LOG_MCP_DB": "D:\\data\\rf-log-mcp\\store.sqlite3"
}
}
}
}常见问题
1. 为什么使用uv
本地环境的依赖版本可能和 mcp的冲突, 需要venv 来隔离依赖冲突(conda 太慢, uv快)
2. truncated 和三个细分字段有什么区别?
truncated 是总开关,任意一种截断都会为 true。
message_truncated=true:消息字段太长,被缩短显示budget_truncated=true:返回体超过budget,服务主动裁剪了条目或消息page_truncated=true:还有下一页,应继续传next_cursor
排查失败链时优先关注 budget_truncated。如果它为 true,可以调大 budget 或缩小 page_size 后重新查询。
3. get_view / search_messages 能传文件路径吗?
可以。
如果该文件已经被解析过,服务会先把路径转换成对应的 run_id 再查询。
但仍然推荐优先使用 parse_result() 返回的整数 run_id。
4. Windows 上推荐用哪种启动方式?
开发临时验证可以使用:
uv run python -m rf_log_mcp接入 MCP 宿主时,更推荐使用虚拟环境里的解释器直接启动,减少 uv 或 .exe 启动器额外进程带来的文件占用问题:
{
"mcpServers": {
"rf-log-mcp": {
"command": "D:\\project\\rf_log_mcp\\.venv\\Scripts\\python.exe",
"args": [
"-m",
"rf_log_mcp"
]
}
}
}5. 什么情况下不能直接使用这个项目?
如果你的 LLM 平台:
不支持 MCP
或不支持启动本地进程
那就不能直接接入,需要额外做一层集成。
开发检查
uv run ruff check .
uv run pytestResources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/cceniam/rf_log_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server