Skip to content

[BUG] Azure MCP server fails in Antigravity with invalid character 'X' and connection closed during tools/call #2439

@BharatSingla12

Description

@BharatSingla12

Describe the bug

When configuring and running the Azure MCP server (both Node.js and Python variants), the MCP client fails to communicate with the server.

Although the server starts without engine/version errors, any tool invocation results in a connection failure with a JSON parsing error.

This appears to indicate that the MCP server is either:

emitting non-JSON output on stdout, or
closing the connection prematurely during MCP protocol communication

Expected behavior

MCP server should successfully initialize via stdio
MCP client should be able to call tools without connection termination
Responses should be valid JSON-RPC messages as per MCP protocol

Actual behavior

On tool invocation, the following error occurs:

Failure in MCP tool execution: connection closed: calling "tools/call": client is closing: invalid character 'X' looking for beginning of value

This happens consistently across both Node and Python implementations.

Reproduction Steps

  1. Configure MCP server (Node version):
{
  "mcpServers": {
    "azure-mcp": {
      "command": "/home/bharat/.nvm/versions/node/v22.21.1/bin/node",
      "args": [
        "/home/bharat/.nvm/versions/node/v22.21.1/bin/azmcp",
        "server",
        "start"
      ]
    }
  }
}
  1. Alternatively, configure using Python (uvx):
{
  "mcpServers": {
    "Azure MCP Server": {
      "command": "uvx",
      "args": [
        "--from",
        "msmcp-azure",
        "azmcp",
        "server",
        "start"
      ]
    }
  }
}
  1. Start Antigravity and ask question regarding azure enviorment like, what are all the function apps in my subscription.
  2. Observe failure

Environment

  • MCP Client: Antigravity

  • OS: Ubuntu (Latitude 5480)

  • Node.js: v22.21.1

  • npm: 10.9.4

  • Python: (via uvx, version can be added if needed)

  • MCP Client: (please specify — e.g., Cursor / Claude Desktop / VS Code MCP extension)

  • Azure MCP package:

    • Node: @azure/mcp@latest
    • Python: msmcp-azure

Metadata

Metadata

Assignees

Labels

customer-reportedneeds-team-attentionWorkflow: This issue needs attention from Azure service team or MCP team.questionFurther information is requestedserver-Azure.McpAzure.Mcp.Servertools-CoreAZMCP Core functionality that all other tools build on top of

Type

No type

Projects

Status

Untriaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions