Closed dhruv-bansal closed 3 days ago
Fixed - all HTTP responses now return 200 OK. Give it another try!
BTW. The 422 error indicates that the request value is not the data expected by your API server.
I also provide a FastAPI Petstore implementation
Issue still persist. Same issue as stated above - The complete jsonRPC body is being passed to upstream which is causing an issue.
I don't see code anywhere to modify the body before sending the request to upstream.
Can you try hitting the API endpoint directly to see what it returns? and provide some information about the client version, protocol type, API interface, etc.?
There is no option to re-open the issue - can you unable it?
Also here is the pull request for the fix of this issue. - https://github.com/sxhxliang/mcp-access-point/pull/11
Here is how I am testing. Upstream I am using prism or actual request server Issue Issue in case of tool call for POST/PUT operation of HTTP, complete original JSON RPC method is being forwarded to upstream.
This PR handles that scenario.
Also, earlier upstream actual response code was ignored and only 200 was sent. That is also handled now.
@dhruv-bansal Thank you for providing a PR. I will test it later.
I am using given example of openapi_for_demo.json and try to call addPet tool
The complete jsonRPC body is being passed to upstream which is causing an issue.
Logs of the upstream
< Body: {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"_meta":{"progressToken":2},"name":"addPet","arguments":{"body":{"id":1,"name":"test1","tag":"test2"}}}}