Description
There are several robot libraries implemented, which provide to robot additional functionalies (keywords).
Those same keywords are potential candidates to be used as mcp.tools.
Why should we implement the same functionality twice, let us use already implemented robot libraries as mcp servers.
Here is a very simple example:
from mcp.server.fastmcp import FastMCP
def to_mcp(self):
mcp = FastMCP(self.__class__.__name__)
for kw in self.keywords.values():
mcp.add_tool(kw)
return mcp
i have added these lines in the class after the init of an implemented library
https://github.com/noubar/RobotFramework-MailClientLibrary/blob/55d63296c7e96236041f0ae3310a8bb0f141b3e6/src/MailClientLibrary/__init__.py#L90
this funcionality could also be directly added to the implementation of hybrid core
PythonLibCore/src/robotlibcore/core/hybrid.py
Line 121 in 90a62a0
To run the server localy
from src.MailClientLibrary import MailClientLibrary
a = MailClientLibrary().to_mcp()
a.run(transport='stdio')
And here it is running under vscode insiders version because the relaese version does not have this functionality yet