﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
19211	REST server returns text/plain MIME type instead of application/json	a.rohou@…	Eric Pettersen	"Alexis Rohou notes that the ChimeraX REST server is returing mime type data text/plain instead of application/json when JSON return values are requested.  This may impair Claude AI from controlling ChimeraX using the REST server.  Seems simple to fix if this really is incorrect.

Begin forwarded message:

From: Alexis Rohou 
Subject: Re: Claude AI controlling ChimeraX
Date: October 21, 2025 at 10:46:28 PM PDT
To: Tom Goddard 
Cc: Zach Pearson , chimerax-programmers

Hi Tom,

...

Incidentally, I think I may have found a bug along the way. The rest_server was returning content with a Content-Type fixed as ""text/plain"" regardless of whether json was true or false. This caused me grief on the MCP bridge side of things. The fix was to change line 292 of rest_server/src/server.py from:
        self._header(200, ""text/plain"", len(data))
to:
        content_type = ""application/json"" if self.server.chimerax_restserver.json else ""text/plain""
        self._header(200, content_type, len(data))

...

Cheers,
Alexis"	defect	closed	moderate		Input/Output		fixed		Tom Goddard				all	ChimeraX
