More information here:
Does this rf-mcp/src/robotmcp/utils/rf_variables_compatibility.py at main · manykarim/rf-mcp · GitHub need a set_local()?
Iâve been trying to figure out whatâs going wrong, adding some logging to RFâs userkeywordrunner.
2025-09-29 12:25:23.719 [warning] [server stderr] [ WARN ] AttributeError: âVariablesâ object has no attribute âset_localâ | kw: robot.running.UserKeyword(name=âGet Dynatrace Test Nameâ) | variables type: <class ârobotmcp.utils.rf_variables_compatibility.CompatibleVariablesâ> | variables: <robotmcp.utils.rf_variables_compatibility.CompatibleVariables object at 0x00000194447A9E40>
In addition, do I need to import everything explicitly to run individual keywords? As in, I canât just tell it to run a keyword, I need to tell it to import the file the keyword is in and all relevant files that imports?
And do I need to restart the mcp server after editing a robot keyword?
Maybe thereâs something wrong with my setup or I donât quite get how to use it.
Thanks for reporting that issues, Iâll look into it.
Just for clarrification:
You imported a Resource File with User Keywords that you wanted to execute, correct?
Yes, I have a keyword for opening a New Persistent Context and logging in, in a *.resource file. It requires various imports, such as user names by environment, variables files with folder names etc
Are you using the latest rf-mcp version 0.20.0 ?
Below is a screenshot from Copilot, while importing a resource and a custom library
Yes, it works if I tell the model to import all the imports. Instead of
âRun the login keywordâ
I have to write
âImport the files xyz.resource, abc.resource, variables.py, paths.py, secrets.py then run the login keywordâ
, which seems like a lot of unnecessary work given that I donât know what keywords need which import without reading the code
Ah, so you want it so first search for the correct keywords (in your existing resource files) and then automatically handle the imports ?
That can be implemented
Yes, that would be nice. And it seems keywords of an imported resource donât refresh after editing unless you restart the server?
Is there some workaround I can use for the imports? Can I run a Python script that imports everything necessary for my login?
I believe you need to reimport resource after applying any changes. But usually the agent can handle such things via prompting. For example, I asked to refactor my code into a page object like pattern and afterward import the necessary resources and rerun stepwise via the MCP.
But Iâll look into updating the current solution and find a way to refresh the resources if possible
Iâve added this to rf_variables_compatibility.py, which seems to work
def set_local(self, name: str, value: Any) -> None:
"""Set suite-scoped variable (compatibility shim)."""
name = self.\_normalize_var_name(name)
logger.debug(f"Variables.set_local({name}, {value}) -> \__setitem_\_")
self.\_original\[name\] = value
Doing some more testing, Iâll give some more feedback later
The debug bridge introduced in version 21 seems to solve any import problems I have, thanks!
get_application_state gives an about:blank page when get_page_source gives the real page (using the debug bridge)
There is a fallback / retry that has caused me problems twice:
a) A keyword that starts with opening a modal fails later, then the retry fails since the modal covers the opening button
b) A keyword with scandinavian letters in the name fails as expected when verifying text on the page, then the fallback fails when BuiltIn.run_keyword canât find a match for the keyword. I can probably configure the text encoding to make this work.
Hi, first of all this is a nice library.
Iâm facing an issue i use the debug bridge after the MCP serve call.
Initially i can do stuff on page as long as everything goes smooth without timeouts or missclicks but as soon as i try to click something over the bridge the MCP Serve will have a red box stating issue and after that seems like the whole session is lost since i cannot click anything in the browser when trying to do it by prompting. Says
The Click keyword is not available in your session, so I cannot click the edit entry for the row with âxyzâ in the email. This is due to a Browser library or session issue.
To resolve this, you may need to restart the browser session and ensure the Browser library is active and loaded. If you want, I can guide you through troubleshooting or restarting the session. Let me know how youâd like to proceed!
Asking it to proceed to fix it just doesnt do anything.
could it be there is some issue in the debug bridge in timeout or any other exception based errors ?
Hi Peter ![]()
To be honest, Iâm sometimes questioning if the debug bridge even makes sense.
The reason being:
I can just âpromptâ the MCP server to execute all keywords until step XYZ. And when I do so, the session remains open and I can still prompt it to execute single steps. This is way simpler than using the debug bridge. So maybe this is also a solution for you.
But I will still look into your reported issue. Just wanted to give you some alternative
Hi,
Yeah, im just learning the mcp concept and as you say it also worked much better as you say.
I was actually able to retrieve the session by re-import browser library and re-attaching bridge session to browser prompt but yeah⊠then it seemed to forget things i did before the session was lost and so on when i tried to generate the whole outcome.
The one thing that i would really need is the login part of my application to be done automatically since it takes much time with all MFAâ's and stuff.
Do i have some possibilities to run the test to a specific point â then hand over the browser to the MCP.
Im having har to fully trust the MCP and i would rather not ask the copilot to sign in using some predefined functions⊠But if thats the only way to acheive what i ask, i need to consider start trusting the MCP
and im not sayinh this library would be a risk but rather all the dependencies needed for that is very hard to try to debug are the vulnerabilities or some data forwardersâŠ
Ofcourse if you have some good research done on the dependencies side and or have some good tools to use to reduce all these risks with some auditing tools, just let me know.
You can of course wrap your MFA login into user keywords (I guess you have already done that) and just put them into a test. Then ask the agent to only execute those keywords (it is able to import resources and run user keywords) and then you can proceed with the session.
Iâll think about possibilities to ensure that certain keywords or arguments are never sent to the agent/LLM. Just running them via execute step should not share any secrets from inside the keywords. But letâs think about an approach to make it bulletproof
yes. i see the keywords can be run from the prompts but that is what i want to avoid even though my agent is capable of sniffing the repository. All secrets are taken from env.variables on run time and thus there is a possibility to vulnerabilities to share that info and thats why i would want to keep that login process outside the MCP stuff as much as possible.
But is it possible to bind any existing browser to the MCP or does the MCP prompts require that browser in use is explicitly opened inside that mcp session ?
The execute_step tool will handle the execution directly via the run_keyword function in robot framework.
The agent will receive the response/output of the execution and the keyword name plus args if the top level keyword (which is called). If there are no secrets in the top level keyword arguments, it should be fine. But I would not bet my right hand on it and it will require some deeper investigation.
After doing some more reading - it is definitely possible to run things via the MCP server without exposing data to the LLM.
We would need to keep our secrets in environment variables or a vault storage and ensure we donât return them in any tool outputs. I think the new robot framework secret handling might be helpful.
Amazing initiative! Tools like this really push the community forward. Would be great to see a comparison with other AI-assisted automation tools, and maybe even some demo workflows. Thanks for sharing!

