Skip to main content

MCP server for helping user to resolve Robot Framework code issues detected by Robocop.

Project description

Robocop MCP server

Robocop MCP server helps users to resolve their static code analysis errors and warnings with help of an LLM.

Install

Install with pip: pip install robocop-mcp

Running robocop-mcp server

running MCP server in VS Code workspace:

  1. Create a .vscode/mcp.json file in your workspace.
  2. Add following configuration to the mcp.json file:
{
    "servers": {
        "robocop-mcp":{
            "type": "stdio",
            "command": "${workspaceFolder}/.venv/bin/python",
            "args": [
                "-m",
                "robocop_mcp",
            ],

        }
    }
}
  1. Change your CopPilot chat to Agent mode and select suitable model for your use.
  2. Remember to click start button in the mcp.json file

For general detail about configuring MCP server in VS Code, see the VS Code documentation

Using robocop-mcp

https://github.com/user-attachments/assets/f446f31f-a91e-4cc1-bae0-6b691469dfba

Configuration

The robocop-mcp server can configured by using pyproject.toml file. The robocop-mcp server uses [tool.robocop_mcp] section in the toml file.

Priority of Robocop rules

Some rules are more important to fix than others or perhaps you want to use certain type of LLM to solve certain type of rule violations. In this case you can use rule_priority (list) to define which rule are first selected by the robocop-mcp and given to the LLM model. The rule_priority is a list of robocop rule id's. You can list all the rules with command:

> robocop list rules

And if one one rules looks like this:

Rule - ARG01 [W]: unused-argument: Keyword argument '{name}' is not used (enabled)

Then rule id is the ARG01.

And example if user wants to prioritize the ARG01 and ARG02 to be fixed first, then rule_priority would look like this.

[tool.robocop_mcp]
rule_priority = [
    "ARG01",
    "ARG02"
]

If rule_priority is not defined, robocop-mcp will select take first rule returned by robocop and use it to find similar rule violations.

Maximum amount violations returned

To not to clutter the LLM context with all the rule violations found from the test data, by default robocop-mcp will return twenty (20) violations from robocop. This can be changed by defining different value in the violation_count (int) setting.

To make robocop-mcp return 30 rule violations:

[tool.robocop_mcp]
violation_count = 30

How many rule violations the robocop-mcp should return depends on the LLM model being used, how verbose the proposed fix is and how long the LLM model context have been in use. It is hard to give good guidance on this subject, because LLM models change at fast pace and there are some many different models available.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robocop_mcp-1.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robocop_mcp-1.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file robocop_mcp-1.1.1.tar.gz.

File metadata

  • Download URL: robocop_mcp-1.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for robocop_mcp-1.1.1.tar.gz
Algorithm Hash digest
SHA256 650f8328c0184ff86f1096b6cc1c147c3a98e065001540cc1fe0e2065f72bd9b
MD5 bc041bb378131575123c02ff44f4cf16
BLAKE2b-256 4938c18c28ba434b1f8057dda3bf848204a190442857dafdb0e260c9906de06c

See more details on using hashes here.

File details

Details for the file robocop_mcp-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: robocop_mcp-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for robocop_mcp-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55d8eaf7381fca0f8e0a2e15a74e90ad2656e2150f907f778fdc7fb6d06103de
MD5 b52dc926117eea2e05652ea9ae8792ec
BLAKE2b-256 c0f03c46ce63cc13052dc83db6da263aab27069231c02ac6f884d92786a8bcaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page