microsoft / microsoft/mcp

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

Open
#2,439 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug customer-reported needs-team-attention server-Azure.Mcp tools-Core
Dominant language
C#
Stars
3.7k
Forks
624
Avg merge
2d 20h
Merged PRs (30d)
220

Description

### 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):

```json
{
"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"
]
}
}
}
```

2. Alternatively, configure using Python (`uvx`):

```json
{
"mcpServers": {
"Azure MCP Server": {
"command": "uvx",
"args": [
"--from",
"msmcp-azure",
"azmcp",
"server",
"start"
]
}
}
}
```

3. Start Antigravity and ask question regarding azure enviorment like, what are all the function apps in my subscription.
4. 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)
* Azure MCP package:

* Node: `@azure/mcp@latest`
* Python: `msmcp-azure`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the Node @azure/mcp entry point and the Python msmcp-azure command shown in the issue, using Antigravity over stdio. Inspect the server output during initialization and tools/call for the reported invalid character and connection closure. Done means both variants initialize and return valid JSON-RPC responses for tool calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, node.js, python
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.