Skip to content

The use of robotlibraries as mcp server #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
noubar opened this issue Mar 30, 2025 · 3 comments
Open

The use of robotlibraries as mcp server #157

noubar opened this issue Mar 30, 2025 · 3 comments

Comments

@noubar
Copy link

noubar commented Mar 30, 2025

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

return sorted(self.keywords)

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

Image

@aaltat
Copy link
Contributor

aaltat commented Mar 31, 2025

I am sorry but I do not understand you question or a problem you are trying to solve. Could you explain where your pain point comes from?

@noubar
Copy link
Author

noubar commented Mar 31, 2025

This is a suggestion. Could also be used as a docu.

I was implementing a mcp server and i realised the same implementation what i have done for robot could be taken as it is.
The same code could be turned to a mcp.tool with the following trick. Without changing the code of the library

@noubar
Copy link
Author

noubar commented Mar 31, 2025

My example:
my llm can send and recieve mail using the Mailclient robot library.

Another example:
browser library could be directly accessed by a llm. using this trick.
So potentialy the llm can navigate the browser alone. like the "ChatGPT Operator"

Another example:
Now i am experimenting the clicking in windows (windows automation) using FlauiLibrary. Which is also kind of working.
I ask the llm "click the start button" or "open the calc.exe app"
And it is working like a magic

Image

AND THEN

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants