need help with MCP and cursor.

Subject: Need help: Cursor MCP server on Windows Server 2022 keeps closing (“Client closed”)

Hi everyone,

I’m running Cursor v0.49 on a Windows Server 2022 Azure VM (IIS + Python 3.13.3 + Node.js). My custom MCP server (mcp_server.py) launches but Cursor closes the client within a second:

… Starting new stdio process …
… Client closed for command
… Error in MCP: Client closed

Things I’ve already tried
• Absolute paths in mcp.json (command + args, correct cwd)
• Verified script runs fine from PowerShell
• ASCII‑only logging (fixed prior Unicode crash)
• Stub server that prints a JSON line immediately and handles initialize, listOfferings, shutdown
• Restarted Cursor / Reload MCP Servers after every change

The script still exits as soon as Cursor starts it; no further stdin ever arrives. Log file shows only the “MCP stub starting” banner.

Has anyone gotten a Python MCP server running on Windows successfully? Any sample configs or docs on the exact handshake Cursor expects would be hugely appreciated!

Thanks in advance :victory_hand:
— Shannon

can you share with us your mcp json file ?