Skip to content

Support for R Language #236

Description

@jal1ur

Thank you for running that final test.

That error message, Error: No such option: --language, is the definitive final answer to our investigation. It provides the last piece of the puzzle.
The Conclusion of Our Debugging

You have been incredibly patient and have methodically tested every standard way to configure this tool. Let's summarize what we have proven:

Your R environment is working correctly (R --slave -e "languageserver::run()" runs successfully).
The serena-mcp-server program itself is failing because it cannot determine that your project's language is R (the KeyError: 'language').
We tried to tell Serena the language using a configuration file (serena_config.yml), but for some reason, it is not being read in your environment.
We just proved with your last command that Serena does not have a command-line flag (--language) to force the language setting.

This leads to a firm conclusion: The serena-mcp-server tool, as it is currently packaged and run via uvx, does not have a functioning, discoverable mechanism to be configured for a non-Python language like R in your specific WSL environment. It appears to be defaulting to a Python-centric analysis, and our attempts to override that default are not succeeding because the tool doesn't provide the necessary "hooks" (like a working --config or --language flag).

This is not a user error on your part; it is a limitation or a bug in the Serena tool itself, likely related to how it handles non-Python projects or its configuration loading mechanism in a WSL environment.
The Path Forward: Reporting the Issue

The next and most appropriate step is to report this issue directly to the Serena developers. They are the only ones who can fix the tool or provide a definitive workaround for this specific scenario. You have gathered all the data needed for an excellent bug report.

  1. Go to the Serena GitHub Issues Page:
    https://github.com/oraios/serena/issues

  2. Create a New Issue:
    Click the "New issue" button.

  3. Write the Report:
    You can use the following template. It clearly explains the problem, what you've tried, and provides all the necessary information for the developers.

Issue Title: Bug/Feature: Cannot configure R language server in WSL environment

Body:

Hello Serena Team,

I am trying to use Serena with an R project in a WSL (Windows Subsystem for Linux) environment via Claude Code, but I am running into a persistent configuration issue.

Goal:
To get Serena to use the R languageserver package for an R project.

Environment:

OS: Windows with WSL (Ubuntu/Debian-based)
R and languageserver package are installed and working within WSL.

What I've Confirmed:
The R language server can be started successfully from the WSL bash command line with:
R --slave -e "languageserver::run()"

The Problem:
When I try to add Serena as an MCP server to Claude Code, the serena-mcp-server process always fails with a KeyError: 'language'.

What I Have Tried:

Implicit Config: Creating a serena_config.yml in the project root. The server does not seem to read it and still fails.
YAML

projects:
  - path: .
    language: R

language_servers:
  - language: R
    command: ["R", "--slave", "-e", "languageserver::run()"]

Piping Config: Piping the config file to stdin (cat serena_config.yml | uvx ...) results in the same KeyError.

Command-Line Flags: I have tried to specify the configuration directly, but the server does not recognize the flags:
    --config serena_config.yml results in Error: No such option: --config.
    --language R results in Error: No such option: --language.

It seems the serena-mcp-server process is not picking up any language configuration and fails because it cannot default to Python. Could you please advise on the correct method to configure a custom language server like the one for R?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions