Fix MCP service response handling to return proper JSON responses
- Change response variable assignments from 'result' to 'response' to match out-parameter definition
- Fix empty response body issue where opencode was receiving '{}' instead of JSON-RPC responses
- Update error handling to use direct HTTP response writing for validation errors
- Add comprehensive debug logging for HTTP request/response handling
- Ensure MCP responses are properly serialized and returned via Moqui REST framework
Resolves content-type complaints from opencode by returning properly formatted JSON-RPC responses instead of empty objects.
Showing
1 changed file
with
39 additions
and
12 deletions
-
Please register or sign in to post a comment