Skip to content

🔴 Bug: MCP read_repomix_output always take the entire xml file #849

@Nxtivision

Description

@Nxtivision

Description

Hello !

I'm using the MCP server inside Cursor AI to pack and read my repo, in order to create at the end a complete solution for other developers to have access instantly to key information of our Design System.

⚠️ It's a blocking issue since we can't use properly the MCP server with Repomix ⚠️

The packing and the search work fine, however, when it comes to use the read_repomix_output, it breaks my context used.

After some deep dive, here are my observations:

Parameters used by Cursor

{
  "outputId": "fbb7981a4debbdb5",
  "start_line": "943",
  "end_line": "1003"
}

As we can see, start and end are in string

Result

{
  "content": "...",
  "totalLines":23709,
  "linesRead":23709,
  "startLine":1,
  "endLine":23709
}

Using MCP Inspector

I did the same work on the MCP Inspector, and the result are different:

parameters sent

{
  "params": {
    "name": "read_repomix_output"
    "arguments": {
      "outputId": "82de6aeec5e23dc6"
      "startLine": 943
      "endLine": 1003
  }
}

result

{
  "content": "...",
  "totalLines": 23709,
  "linesRead": 61,
  "startLine": 943,
  "endLine": 1003
}

Conclusion

It seems the fact that Cursor is sending the parameters in String are breaking the code. Zod seems to be the best option, maybe we need to use coerce to be sure the result is passed in correctly?

Usage Context

Repomix CLI

Repomix Version

1.5.0

Node.js Version

24.3.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions