I have an endpoint implemented in Rust at http://mcpserver.com/01423badbeef which can respond to JSON over HTTP. Basically 01423badbeef is the address of a module that can respond to requests. I have the following MCP configuration via Cursor:
data: [{“function”:{“description”:“Generated function for foo”,“name”:“foo”,“parameters”:{“properties”:{“x”:{“description”:“Parameter x of type i32”,“type”:“i32”},“y”:{“description”:“Parameter y of type i32”,“type”:“i32”}},“required”:[“x”,“y”],“type”:“object”}},“type”:“function”},{“function”:{“description”:“Generated function for update”,“name”:“update”,“parameters”:{“properties”:{“x”:{“description”:“Parameter x of type String”,“type”:“String”}},“required”:[“x”],“type”:“object”}},“type”:“function”}]
Is the format of the response JSON incorrect? How do I go about debugging this? Thanks in advance.
Hi, curl is good to see what happens on a server call, but as its not visible which parameters you used with curl to call the request, its hard to do a 1:1 comparison.
However since you are making the MCP server, dump the request details (headers and body) of of MCP Inspector because that tells you what a valid MCP request is.
Next you can compare with any MCP demo server made by anthropic and visible on the modelcontextprotocol website/github account. they show exactly the schema and you will be able to see what input and output is sent, even if it is not in the same language you are using.
There is a specific order of requests that MCP relies on for discovery and communication of actual agent requests.
Have a look in the MCP github for issues and other parts. plus you can ask AI any time with the specific error and ask it to search online, its not the first time this happens to someone. You dont even have to let it change your code but analyze code and issue cause.