Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When a JSON Array is returned by an MCP server tool, the model only sees the last element in the array.
Steps to Reproduce
Install mcp[cli] via uv or pip.
Create a simple mcp server:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo", json_response=True)
@mcp.tool()
def exampletool() -> list:
return ["123", "456"]
if __name__ == "__main__":
mcp.run(transport="streamable-http")
Run it, add the local server to Tools & MCP and query it. Observe that the model only returns “456” despite the response containing more than one element in the array.
Expected Behavior
The model sees all elements in the array.
Screenshots / Screen Recordings
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.1.49
VSCode Version: 1.105.1
Commit: 21a2ed198584d56a91c0b996d1a09c93f8538440
Date: 2025-12-05T07:49:06.016Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.1.0-18-amd64
For AI issues: which model did you use?
Auto, Grok Code, Gemini 3, and others
Additional Information
The behavior works as expected if you wrap the array in a JSON object like this: {"result": ["123","456"]} but this wrapping should be unnecessary.
Does this stop you from using Cursor
No - Cursor works, but with this issue

