Skip to content

Text-only MCP file reads silently replace malformed UTF-8 #8

Description

@dajiaohuang

The text-only file reader can decode malformed UTF-8 with replacement characters, changing the original bytes while returning the result as text.

Reproduction: read a text-path file containing an invalid UTF-8 byte such as 0xFF.

Expected: reject invalid text with a clear unsupported-content response, while binary/resource reads preserve the original bytes.
Actual: the invalid byte is silently replaced during UTF-8 decoding.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions