You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fastmcp discover crashes with UnicodeDecodeError on Windows with a non-UTF-8 locale #4689
On Windows where the ANSI codepage is not UTF-8 (Korean cp949 here; cp932/cp936 should behave the same), fastmcp discover exits with an unhandled UnicodeDecodeError if any config file it scans contains a non-ASCII byte. A single em dash in an mcp.json is enough.
Expected: the config is read as UTF-8, which is what the tools writing these files emit. Actual: the command dies with a traceback.
Running the same command with PYTHONUTF8=1 succeeds.
The same failure was fixed in other modules in #3579, #4084, #4164 and #4532; the CLI config scanners aren't covered by those.
File "fastmcp\cli\discovery.py", line 123, in _parse_mcp_config
text = path.read_text()
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 60: illegal multibyte sequence
Plain fastmcp discover fails the same way at discovery.py:161 when ~/.claude.json contains a non-ASCII byte, which is common.
Activity