Setting up Claude Code in Codespace for Robot Framework

How to make Claude Code fit for the RF-MCP-Server

Page content

Robot Framework code generated by ChatGPT? That doesn’t work very well.
The MCP-Server for Robot Framework helps here, because it “understands” the page you want to test and can validate every step.
In the Robotmk-Starter Repo you can try it out directly with Copilot; for using it with Claude Code in Codespace, a few tricks are necessary - in this tutorial I’ll show you how to do it.


The Robotmk-Starter Repo

The Robotmk-Starter Repo is a collection of ready-to-use Robot Framework examples, templates and labs.

I have extensively presented the starter repo in a separate article, where you can find the most important information: Robotmk-Starter: Get Started Immediately with Synthetic Monitoring.


ChatGPT vs. MCP-Server

Why ChatGPT is not ideal

ChatGPT is a great tool, but it is completely unsuitable for generating entire Robot tests/suites.
It doesn’t know the application you want to test, and it can be very “creative” in inventing keywords and even entire libraries.

The result: Frustration, wasted time, and in the worst case even faulty tests that go into production.

MCP: The “USB-Bus”

An MCP server (Model Context Protocol) encapsulates certain capabilities (e.g. finding keywords, analyzing scenarios, generating test cases, executing keywords, etc.) and makes them available to any AI agent via a uniform API.

There is a reason why MCP is called the “USB-Bus” for AI agents…


RF-MCP

Many Kasiriha has built such a server for Robot Framework called RF-MCP.

Using RF-MCP with Copilot and Claude Code

In the RF-MCP-Lab you can try both Github Copilot and Claude Code with Robot Framework.

For both agents I have prepared the configuration files. Essentially, it’s only two files that make the agents aware of the MCP server (pay attention to the directories):

Copilot: .vscode/mcp.json

{
  "servers": {
    "robotmcp-vsc": {
      "type": "stdio",
      "command": "/root/.rcc-env/bin/python",
      "args": ["-m", "robotmcp.server"],
      "env": {
        "PATH": "/root/.rcc-env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      }
    }
  }
}

Claude Code: .mcp.json

{
    "mcpServers": {
        "robotmcp-claude": {
            "type": "stdio",
            "command": "/root/.rcc-env/bin/python",
            "args": [
                "-m",
                "robotmcp.server"
            ],
            "env": {
                "PATH": "/root/.rcc-env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            }
        }
    }
}

(I have given the MCP servers speaking names for safety, so that they are distinguishable.)

Copilot is directly integrated into VS Code, so it immediately registers the MCP server thanks to the JSON file.

Claude Code, on the other hand, must first be installed as an extension - and logging into the Codespace is a bit, let’s say: tricky. But with this tutorial you can do it.

Prerequisites:

  • GitHub account
  • A Claude subscription (Pro Plan or API)

Step 1: Initiate Authentication

Go to the Robotmk-MCP-Lab and start the Codespace.
Wait until the environment is fully built.

Fertige Umgebung

As soon as the Codespace is ready, a notification should appear in the bottom right corner, recommending the installation of the Claude Code Extension for VS Code.

Empfehlung zur Installation von Claude nach dem Start des Codespaces

Now click on the “CLAUDE CODE” tab in the right side panel (not on the “CHAT” tab, which is for Copilot):

Click on “Login with Claude.ai Subscription” and select “Copy” to copy the auth link.


Step 2: Start VNC Session

Open the Ports panel in the Codespace and start the noVNC port (Globe icon):

Opening the VNC Port

By right-clicking on the desktop, you can start the browser (Firefox):

Starting the Browser in the noVNC Desktop

Step 3: Log in

Now paste the copied auth link into the clipboard manager of NoVNC (left edge of the screen); then you can paste it into the address bar of the browser.

NoVNC: Communication with the clipboard via intermediate step. Pasting the auth link

Now log in to the Claude.ai page with your email address.
You will then receive an email with a link that allows you to generate a 6-digit code.
Now enter this code in the VNC browser.

After clicking on “Authorize”, you should see that the chat widget in VS Code (Codespace) is now activated - the login was successful:


Step 4: Test

Has Claude now access to the MCP server? You can test this easily by typing /mcp-servers in the chat window.
You can use this to query all registered tools and capabilities:

The command '/mcp-servers' lists all registered MCP servers

What’s next?

Stay tuned, here in the blog there will be more articles in the coming weeks, in which I show how to use Claude Code and the RF-MCP-Server to generate and execute Robot Framework tests.


Conclusion

VS Code, Github and Copilot are from the same house - and you can tell that in scenarios like this: The integration of Copilot in VS Code is basically “batteries included”.

But nevertheless, the method described here also allows you to connect Claude Code.

This is great, among other things, because Microsoft is currently (mid-May) pretty nasty about the Copilot pricing - and users with exhausted quota are being put off until early June.
That will probably drive quite a few developers towards Gemini or Claude…

👉 Did the setup work? Feel free to write me a comment: